@font-face { font-family: "Nunito"; src: url("assets/schrift/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("assets/schrift/nunito-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("assets/schrift/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("assets/schrift/caveat-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("assets/schrift/caveat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --pink: #951459;
  --pink-hell: #c8478a;
  --creme: #ffffff;
  --papier: #ffffff;
  --nacht: #1d1a1c;
  --tinte: #2e2a2d;
  --grau: #7b7379;
  --rand: #eadfe5;
  --rosa: #fbf1f6;
  --taste: #f6f0f3;
  --taste-schatten: #dccfd6;
  --gold: #e8b24a;
  --ui: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --sicher-u: env(safe-area-inset-bottom, 0px);
  --sicher-o: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--nacht); color: var(--tinte); font-family: var(--ui);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; overscroll-behavior: none; }
#buehne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.versteckt { display: none !important; }

.ebene { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s; z-index: 20; }
.ebene.sichtbar { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .45s ease; }

/* Laden */
#laden { background: #fff; z-index: 40; text-align: center; align-content: center; gap: 18px; }
#laden p { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--pink); }
.flocke { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 6px solid var(--rand); border-top-color: var(--pink); animation: dreh 1s linear infinite; }
.balken { width: min(280px, 70vw); height: 8px; border-radius: 8px; background: var(--rand); overflow: hidden; margin: 0 auto; }
.balken i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .3s; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* Titel */
#titel { align-items: end; justify-items: start; padding: clamp(16px, 4vw, 48px); background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.28) 100%); }
.titel-karte { max-width: 520px; background: #fff;
  border: 0; border-radius: 26px; padding: clamp(20px, 3.4vw, 36px); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.titel-karte .logo { height: 26px; display: block; }
.titel-karte h1 { font-family: var(--hand); font-weight: 700; font-size: clamp(3.2rem, 9vw, 5.2rem); line-height: .95; margin: 14px 0 4px; color: var(--pink); }
.titel-karte .unter { margin: 0 0 14px; font-weight: 800; letter-spacing: .02em; color: var(--grau); }
.titel-karte .geschichte { margin: 0 0 12px; font-size: 1.05rem; line-height: 1.5; }
.titel-karte .einsatz { margin: 0 0 20px; font-size: 1rem; line-height: 1.45; padding: 12px 14px; border-radius: 14px; background: var(--rosa); font-weight: 700; }

.knopf { font: 800 1.05rem var(--ui); color: #fff; background: var(--pink); border: 0; border-radius: 999px; padding: 14px 26px; cursor: pointer;
  box-shadow: 0 6px 0 #5f0c38, 0 14px 24px rgba(0,0,0,.35); transition: transform .12s, box-shadow .12s, background .2s; touch-action: manipulation; }
.knopf:hover { background: #a91a67; }
.knopf:active { transform: translateY(4px); box-shadow: 0 2px 0 #5f0c38, 0 6px 12px rgba(0,0,0,.35); }
.knopf.gross { font-size: 1.25rem; padding: 16px 34px; }
.knopf.hell { background: #fff; color: var(--pink); box-shadow: inset 0 0 0 2px var(--pink), 0 6px 0 var(--taste-schatten), 0 14px 24px rgba(0,0,0,.14); }
.knopf.hell:hover { background: var(--rosa); }
.knopf:focus-visible, .rund:focus-visible, .aktion:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
.tafel { position: absolute; right: max(12px, env(safe-area-inset-right)); top: calc(12px + var(--sicher-o)); background: rgba(255,255,255,.96);
  border: 0; border-radius: 18px; padding: 10px 14px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); pointer-events: none !important; }
.tafel-titel { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); margin-bottom: 6px; }
#zettel-liste { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
#zettel-liste li { width: 54px; text-align: center; font-size: .68rem; font-weight: 700; line-height: 1.15; color: var(--grau); }
#zettel-liste li i { display: block; width: 30px; height: 38px; margin: 0 auto 4px; border-radius: 5px 5px 7px 5px; border: 2px dashed var(--rand); position: relative; transition: transform .4s cubic-bezier(.3,1.6,.5,1), background .3s, border-color .3s; }
#zettel-liste li.da { color: #fff; }
#zettel-liste li.da i { background: var(--papier); border: 2px solid #fff; transform: rotate(-4deg) scale(1.06); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
#zettel-liste li.da i::before { content: ""; position: absolute; left: 5px; right: 5px; top: 8px; height: 3px; border-radius: 2px; background: var(--pink); box-shadow: 0 7px 0 #d9b9c9, 0 14px 0 #d9b9c9; }
#zettel-liste li.da i::after { content: "✓"; position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--pink); color: #fff; font: 800 12px/18px var(--ui); }
#zettel-liste li.neu i { animation: hops .7s cubic-bezier(.3,1.6,.5,1); }
/* Jedes Geschenk lässt einen Stern aufleuchten */
#zettel-liste li svg { display: block; width: 32px; height: 32px; margin: 0 auto 3px; fill: #f6eef2; stroke: #d9c6d0; stroke-width: 2; stroke-linejoin: round;
  transition: transform .4s cubic-bezier(.3,1.6,.5,1), fill .3s, stroke .3s, filter .3s; }
#zettel-liste li.da svg { fill: var(--gold); stroke: #c9962f; transform: scale(1.14) rotate(-6deg); filter: drop-shadow(0 0 7px rgba(242,189,92,.95)); }
#zettel-liste li.neu svg { animation: sternhops .8s cubic-bezier(.3,1.6,.5,1); }
@keyframes sternhops { 0% { transform: translateY(20px) scale(.3) rotate(60deg); } 55% { transform: translateY(-8px) scale(1.5) rotate(-14deg); } 100% { transform: scale(1.14) rotate(-6deg); } }
#minikarte { position: absolute; left: max(18px, env(safe-area-inset-left, 0px)); bottom: calc(20px + var(--sicher-u)); width: 172px; height: 172px; border-radius: 50%; background: #eeeaf0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--pink), 0 14px 34px rgba(0,0,0,.4); pointer-events: none !important; }
.klein-knopf { position: absolute; display: none; place-items: center; width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--pink); background: rgba(255,255,255,.96); color: var(--pink);
  box-shadow: 0 8px 20px rgba(0,0,0,.4); touch-action: manipulation; }
.klein-knopf svg { width: 32px; height: 32px; }
.klein-knopf:active { background: var(--pink); color: #fff; }
body.touch .klein-knopf { display: grid; }
#springen { right: calc(124px + env(safe-area-inset-right, 0px)); bottom: calc(40px + var(--sicher-u)); }
#staub { right: calc(34px + env(safe-area-inset-right, 0px)); bottom: calc(136px + var(--sicher-u)); }
#schneeball { right: calc(116px + env(safe-area-inset-right, 0px)); bottom: calc(122px + var(--sicher-u)); }
body.zielt #schneeball { background: var(--pink); color: #fff; }
.aktion.werfen { display: none; animation: none; background: #fff; color: var(--pink); border-color: var(--pink); box-shadow: 0 8px 0 var(--taste-schatten), 0 16px 30px rgba(0,0,0,.35); }
body.touch.zielt .aktion.werfen { display: block; }
#visier { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(149,20,89,.9), 0 0 0 9px rgba(255,255,255,.16), 0 0 12px rgba(255,255,255,.7); pointer-events: none !important; }
#visier[hidden] { display: none; }
#blende { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 30; }
#blende.an { opacity: 1; }
/* nach dem Drohnenflug kommen Karte, Knöpfe und Sterne nacheinander herein */
#hud.rein .ecke { animation: reinLinks .6s cubic-bezier(.2,.9,.3,1) both; }
#hud.rein .tafel { animation: reinOben .6s .15s cubic-bezier(.2,.9,.3,1) both; }
#hud.rein #minikarte { animation: reinUnten .7s .3s cubic-bezier(.2,1.2,.4,1) both; }
#hud.rein .klein-knopf { animation: reinUnten .6s .4s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes reinLinks { from { opacity: 0; transform: translateX(-40px); } }
@keyframes reinOben { from { opacity: 0; transform: translateY(-40px); } }
@keyframes reinUnten { from { opacity: 0; transform: translateY(60px) scale(.8); } }
/* Steuerung mit den echten Tasten, unten rechts */
.legende { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + var(--sicher-u)); display: grid; gap: 6px; padding: 11px 15px 13px; border-radius: 18px;
  background: rgba(255,255,255,.96); border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.28);
  font-size: .84rem; font-weight: 700; color: var(--tinte); pointer-events: none !important; }
.legende[hidden] { display: none; }
.legende h3 { margin: 0 0 2px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); }
.legende .zeile { display: flex; align-items: center; gap: 10px; }
.legende .tasten { display: flex; align-items: center; gap: 4px; min-width: 126px; }
.legende kbd { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 7px; background: var(--taste); color: var(--tinte); font: 800 .76rem var(--ui); box-shadow: 0 3px 0 var(--taste-schatten); }
.legende kbd.breit { padding: 0 10px; }
.legende .oder { font-size: .72rem; opacity: .75; }
.legende svg { width: 19px; height: 27px; flex: none; }
body.zielt .legende .zeile[data-k="E"] kbd, body.zielt .legende .zeile[data-k="R"] kbd { background: var(--gold); box-shadow: 0 3px 0 #b88a34; }
body.touch .legende { display: none; }
@media (max-width: 940px), (max-height: 600px) { .legende { display: none; } }
#hud.rein .legende { animation: reinUnten .7s .45s cubic-bezier(.2,1.2,.4,1) both; }
.klein-knopf::after { content: attr(data-kurz); position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); font: 800 .62rem var(--ui); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); white-space: nowrap; }
.grusskarte .augenbraue { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); }
@keyframes hops { 0% { transform: translateY(18px) scale(.4) rotate(20deg); } 60% { transform: translateY(-6px) scale(1.25) rotate(-8deg); } 100% { transform: rotate(-4deg) scale(1.06); } }
.schluessel { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rand); color: var(--pink); font-weight: 800; font-size: .86rem; }
.schluessel svg { width: 34px; height: 17px; }
.schluessel[hidden] { display: none; }
.schluessel.benutzt { color: #b9aeb4; text-decoration: line-through; }
.sterne { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rand); font-size: .8rem; font-weight: 700; color: var(--grau); letter-spacing: .02em; }
.sterne b { color: var(--pink); }
.raum { position: absolute; left: 50%; top: calc(14px + var(--sicher-o)); transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.96); color: var(--pink);
  font-weight: 800; font-size: .95rem; box-shadow: 0 8px 20px rgba(0,0,0,.3); opacity: 0; transition: opacity .4s; pointer-events: none !important; white-space: nowrap; }
.raum.an { opacity: 1; }
.ecke { position: absolute; left: max(12px, env(safe-area-inset-left)); top: calc(12px + var(--sicher-o)); display: flex; gap: 8px; }
.rund { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.96); color: var(--pink); font: 800 1.2rem var(--ui); cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.28); touch-action: manipulation; }
.rund:hover { background: var(--pink); color: #fff; }
#ton::before { content: "♪"; }
#ton[aria-pressed="false"] { color: #c9bfc4; }
#ton[aria-pressed="false"]::before { content: "♪"; text-decoration: line-through; }

.hinweis { position: absolute; left: 50%; bottom: calc(34px + var(--sicher-u)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 22px 12px 12px; border-radius: 999px;
  background: var(--papier); color: var(--tinte); font-weight: 800; font-size: 1.12rem; box-shadow: 0 0 0 3px var(--pink), 0 14px 34px rgba(0,0,0,.45); animation: auf .28s cubic-bezier(.3,1.5,.5,1); white-space: nowrap; cursor: pointer; }
.hinweis[hidden] { display: none; }
.hinweis kbd { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; background: var(--pink); color: #fff; font: 800 1.1rem var(--ui); box-shadow: 0 4px 0 #5f0c38; animation: puls 1.3s ease-in-out infinite; }
@keyframes auf { from { transform: translateX(-50%) translateY(16px) scale(.9); opacity: 0; } }
@keyframes puls { 50% { transform: translateY(-3px); } }
.meldung { position: absolute; left: 50%; top: calc(64px + var(--sicher-o)); transform: translateX(-50%); max-width: min(92vw, 560px); padding: 12px 20px; border-radius: 16px; background: var(--pink); color: #fff;
  font-weight: 800; font-size: 1.05rem; text-align: center; box-shadow: 0 14px 34px rgba(0,0,0,.45); animation: auf .35s cubic-bezier(.3,1.5,.5,1); pointer-events: none !important; }
.meldung[hidden] { display: none; }
.hilfe-text { position: absolute; left: max(12px, env(safe-area-inset-left)); top: calc(68px + var(--sicher-o)); max-width: min(86vw, 380px); padding: 12px 16px; border-radius: 14px; background: #fff; color: var(--tinte); font-size: .95rem; line-height: 1.5; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.hilfe-text[hidden] { display: none; }

/* Touch */
.stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.4); pointer-events: none !important; }
.stick[hidden] { display: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--papier); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.aktion { position: absolute; right: calc(22px + env(safe-area-inset-right, 0px)); bottom: calc(30px + var(--sicher-u)); width: 86px; height: 86px; border-radius: 50%; border: 4px solid #fff; background: var(--pink); color: #fff;
  box-shadow: 0 8px 0 #5f0c38, 0 16px 30px rgba(0,0,0,.45); animation: puls 1.3s ease-in-out infinite; touch-action: manipulation; }
.aktion[hidden] { display: none; }
.aktion svg { width: 44px; height: 44px; }
body.touch .hinweis { bottom: calc(214px + var(--sicher-u)); padding: 10px 18px; font-size: 1rem; }
body.touch .hinweis kbd { display: none; }

/* Karten */
.reihe { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Gruß */
#frage { background: rgba(30,20,26,.35); }
#gruss { align-items: center; justify-items: end; padding: clamp(14px, 4vw, 60px); pointer-events: none; }
#gruss.sichtbar .grusskarte { pointer-events: auto; }
.grusskarte { width: min(470px, 100%); background: #fff; color: var(--tinte); border-radius: 24px; padding: clamp(22px, 3.6vw, 38px); text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transform: translateY(26px); transition: transform .9s cubic-bezier(.2,.9,.3,1); }
.sichtbar .grusskarte { transform: none; }
.grusskarte h2 { margin: 0 0 10px; font-family: var(--hand); font-weight: 700; font-size: clamp(2.6rem, 8vw, 3.8rem); line-height: 1; color: var(--pink); }
.grusskarte p { margin: 0 0 16px; font-size: clamp(1.02rem, 3.3vw, 1.18rem); line-height: 1.55; font-weight: 700; }
.grusskarte .absender { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-family: var(--hand); font-size: 1.6rem; color: var(--grau); margin-bottom: 22px; }
.grusskarte .absender img { height: 24px; }
@media (max-width: 760px), (max-height: 560px) {
  #gruss { align-items: end; justify-items: center; }
  .grusskarte { padding: 18px; }
  .grusskarte h2 { font-size: 2.3rem; }
  .grusskarte p { font-size: .98rem; margin-bottom: 10px; }
  .grusskarte .absender { margin-bottom: 12px; font-size: 1.3rem; }
  #zettel-liste li { width: 28px; font-size: 0; }
  #zettel-liste li svg { width: 24px; height: 24px; margin-bottom: 0; }
  #zettel-liste { gap: 4px; }
  #minikarte { width: 104px; height: 104px; bottom: calc(14px + var(--sicher-u)); }
  .raum { left: auto; right: max(12px, env(safe-area-inset-right, 0px)); transform: none; top: calc(86px + var(--sicher-o)); bottom: auto; }
  .tafel { padding: 8px 10px 10px; }
  .rund { width: 42px; height: 42px; }
  .raum { top: auto; bottom: calc(14px + var(--sicher-u)); font-size: .82rem; }
  .meldung { top: calc(88px + var(--sicher-o)); }
  #titel { justify-items: center; }
}
@media (max-width: 520px) {
  .ecke { flex-direction: column; }
  .meldung { font-size: .95rem; padding: 10px 14px; top: calc(128px + var(--sicher-o)); max-width: 86vw; }
}
@media (max-height: 480px) {
  .titel-karte { padding: 14px 18px; max-width: 480px; }
  .titel-karte h1 { font-size: 2.6rem; margin: 6px 0 2px; }
  .titel-karte .geschichte { display: none; }
  .titel-karte .einsatz { margin-bottom: 12px; padding: 8px 12px; font-size: .92rem; }
}
#fehler { background: #fff; z-index: 60; }
@media (prefers-reduced-motion: reduce) { .hinweis kbd, .aktion { animation: none; } }

/* ---------- Auftragszeile unten (klar lesbar über dem Bild), Tastenhinweis, Banner */
.ziel { position: absolute; left: 50%; bottom: calc(96px + var(--sicher-u)); transform: translateX(-50%); max-width: min(92vw, 760px); text-align: center; pointer-events: none !important;
  font: 800 clamp(1.05rem, 2.3vw, 1.45rem)/1.3 var(--ui); color: #fff; text-shadow: 0 2px 0 #1d1a1c, 0 -1px 0 #1d1a1c, 2px 0 0 #1d1a1c, -2px 0 0 #1d1a1c, 0 6px 18px rgba(0,0,0,.75); animation: zielRein .45s cubic-bezier(.2,.9,.3,1); }
.ziel[hidden] { display: none; }
.ziel b { margin-left: .55em; color: var(--gold); white-space: nowrap; }
.ziel b:empty { display: none; }
.ziel.neu { animation: zielNeu .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes zielRein { from { opacity: 0; transform: translateX(-50%) translateY(12px); } }
@keyframes zielNeu { 0% { transform: translateX(-50%) scale(.9); opacity: 0; } 55% { transform: translateX(-50%) scale(1.06); opacity: 1; } }
body.touch .ziel { bottom: auto; top: calc(108px + var(--sicher-o)); font-size: 1rem; }
.banner { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; text-align: center; pointer-events: none !important; animation: bannerRein 3.4s cubic-bezier(.2,.9,.3,1) both; }
.banner[hidden] { display: none; }
.banner small { font: 800 .92rem var(--ui); letter-spacing: .28em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.banner strong { font: 700 clamp(3rem, 9vw, 6rem)/.95 var(--hand); color: var(--gold); text-shadow: 0 3px 0 var(--pink), 0 6px 0 #5f0c38, 0 14px 40px rgba(0,0,0,.7); transform: rotate(-3deg); }
.banner i { font-style: normal; font-size: 1.5rem; letter-spacing: .2em; color: var(--gold); text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.banner i:empty { display: none; }
@keyframes bannerRein { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 82% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1.02); } }
.maushinweis { position: absolute; left: 50%; top: calc(64px + var(--sicher-o)); transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.96); color: var(--tinte); box-shadow: 0 8px 20px rgba(0,0,0,.28);
  font-weight: 800; font-size: .92rem; white-space: nowrap; pointer-events: none !important; }
.maushinweis[hidden], body.touch .maushinweis { display: none; }
.reiter { position: absolute; left: max(18px, env(safe-area-inset-left, 0px)); bottom: calc(204px + var(--sicher-u)); display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255,255,255,.96); color: var(--tinte); box-shadow: 0 8px 20px rgba(0,0,0,.28); font-weight: 800; font-size: .88rem; pointer-events: none !important; }
.reiter[hidden], body.touch .reiter { display: none; }
.reiter kbd { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 7px; background: var(--taste); color: var(--tinte); font: 800 .78rem var(--ui); box-shadow: 0 3px 0 var(--taste-schatten); }
body.fang #buehne { cursor: none; }
body.fang .ecke { opacity: .55; }

/* ---------- Sprechblasen über Figuren */
#blasen { position: absolute; inset: 0; overflow: hidden; pointer-events: none !important; }
.blase { position: absolute; left: 0; top: 0; padding: 7px 14px; border-radius: 16px; background: var(--papier); color: var(--tinte); font: 700 1.35rem/1.1 var(--hand); white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.4), 0 0 0 2px var(--pink); transform-origin: 50% 100%; animation: blaseAuf .3s cubic-bezier(.3,1.6,.5,1); will-change: transform; }
.blase::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; margin-left: -7px; background: var(--papier); transform: rotate(45deg); box-shadow: 2px 2px 0 var(--pink); }
@keyframes blaseAuf { from { opacity: 0; scale: .5; } }


  transform: scale(.9) translateY(14px); transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.sichtbar .popup-karte { transform: none; }
/* Mini-Animation „zielen und werfen“ */
.anim-ziellinie { stroke-dasharray: 5 7; animation: animLinie 4s linear infinite; }
.anim-ball { animation: animBall 4s cubic-bezier(.3,.1,.6,1) infinite; }
.anim-geschenk { animation: animFall 4s ease-in infinite; transform-box: fill-box; transform-origin: center; }
.anim-maus-r { animation: animR 4s linear infinite; }
.anim-maus-l { animation: animL 4s linear infinite; }
.anim-stern { animation: animStern 4s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes animLinie { 0%, 8% { opacity: 0; } 14%, 62% { opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes animR { 0%, 8% { fill: #fff8ea; } 12%, 62% { fill: #f2bd5c; } 70%, 100% { fill: #fff8ea; } }
@keyframes animL { 0%, 40% { fill: #fff8ea; } 44%, 54% { fill: #f2bd5c; } 60%, 100% { fill: #fff8ea; } }
@keyframes animBall { 0%, 44% { offset-distance: 0%; opacity: 0; } 46% { opacity: 1; } 64% { offset-distance: 100%; opacity: 1; } 66%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes animFall { 0%, 64% { transform: none; } 68% { transform: rotate(-14deg); } 88%, 96% { transform: translateY(74px) rotate(24deg); opacity: 1; } 100% { transform: translateY(74px) rotate(24deg); opacity: 0; } }
@keyframes animStern { 0%, 63% { opacity: 0; transform: scale(.2); } 67% { opacity: 1; transform: scale(1.3); } 78%, 100% { opacity: 0; transform: scale(1.8); } }
.anim-taste { animation: animTaste 2.4s ease-in-out infinite; }
@keyframes animTaste { 0%, 100% { transform: none; } 12% { transform: translateY(3px); filter: brightness(.86); } 24% { transform: none; } }
@media (max-height: 560px) { .popup-karte { padding: 14px 20px; } .popup-karte h2 { font-size: 1.9rem; } #popup-bild { width: 240px; } .popup-karte .zeilen { gap: 5px; margin-bottom: 10px; } .ziel { bottom: calc(74px + var(--sicher-u)); } }
@media (prefers-reduced-motion: reduce) { .anim-ball, .anim-geschenk, .anim-ziellinie, .anim-stern, .banner { animation-duration: .01s; } }

/* ---------- Popups und Karten: Weiß, Überschrift in SURMA-Pink, oben ein Tannenzweig mit Kugeln */
#popup { background: rgba(30,20,26,.34); z-index: 22; }
.popup-karte, .papier { position: relative; width: min(480px, 100%); background: #fff; color: var(--tinte); border-radius: 22px; padding: 46px clamp(20px, 4vw, 36px) 28px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.42); transform: scale(.92) translateY(14px); transition: transform .4s cubic-bezier(.3,1.5,.5,1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-14 -14 28 28'%3E%3Cg stroke='%23f3dfe9' stroke-width='1.6' stroke-linecap='round' fill='none'%3E%3Cpath d='M0-11V11M-9.5-5.5 9.5 5.5M-9.5 5.5 9.5-5.5M0-7l-2.6-2.6M0-7l2.6-2.6M0 7l-2.6 2.6M0 7l2.6 2.6M-6-3.5l-3.6 1M-6-3.5l-1-3.6M6 3.5l3.6-1M6 3.5l1 3.6M-6 3.5l-3.6-1M-6 3.5l-1 3.6M6-3.5l3.6 1M6-3.5l1-3.6'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-14 -14 28 28'%3E%3Cg stroke='%23f3dfe9' stroke-width='1.6' stroke-linecap='round' fill='none'%3E%3Cpath d='M0-11V11M-9.5-5.5 9.5 5.5M-9.5 5.5 9.5-5.5M0-7l-2.6-2.6M0-7l2.6-2.6M0 7l-2.6 2.6M0 7l2.6 2.6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px bottom 14px, left 18px top 54px; background-size: 54px, 30px; }
.sichtbar .popup-karte, .sichtbar .papier { transform: none; }
.papier { padding-top: 30px; background-image: none; }
.papier.klein { width: min(440px, 100%); }
.papier .text { margin: 0 0 18px; font-weight: 700; font-size: clamp(1.05rem, 3.4vw, 1.2rem); line-height: 1.5; }
.schmuck { position: absolute; left: 50%; top: -30px; width: 250px; max-width: 78%; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.14)); }
.schmuck svg { display: block; width: 100%; height: auto; }
.popup-karte .kopf { margin: 0 0 6px; font-size: .76rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--grau); }
.popup-karte .kopf:empty { display: none; }
.popup-karte h2 { margin: 0 0 12px; font: 800 clamp(1.55rem, 4.6vw, 2.05rem)/1.12 var(--ui); color: var(--pink); }
.popup-karte .text { margin: 0 0 16px; font-size: clamp(1rem, 2.6vw, 1.12rem); line-height: 1.5; font-weight: 700; }
.popup-karte .text:empty, .popup-karte .ps:empty { display: none; }
.popup-karte .ps { margin: -4px 0 18px; font-size: .95rem; line-height: 1.45; color: var(--grau); font-weight: 700; }
.popup-karte .zeilen { display: grid; gap: 9px; margin: 0 auto 20px; width: fit-content; text-align: left; }
.popup-karte .zeilen:empty { display: none; }
.popup-karte .zeile { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 1.02rem; }
.popup-karte .tasten { display: flex; align-items: center; gap: 5px; min-width: 150px; justify-content: flex-end; }
.popup-karte .zeile kbd { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 9px; background: var(--taste); color: var(--tinte); font: 800 .95rem var(--ui); box-shadow: 0 4px 0 var(--taste-schatten); }
.popup-karte .zeile svg { width: 26px; height: 36px; flex: none; }
.popup-karte .oder { font-size: .8rem; color: var(--grau); }
.popup-karte .knopf { display: inline-flex; align-items: center; gap: 10px; }
.popup-karte .knopf kbd { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 7px; background: #fff; color: var(--pink); font: 800 .78rem var(--ui); }
.popup-karte .knopf kbd[hidden] { display: none; }
#popup-bild { margin: 0 auto 14px; width: min(340px, 100%); }
#popup-bild:empty { display: none; }
#popup-bild svg { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--rosa); }
/* Das Briefing sieht aus wie ein Brief: Umschlagklappe mit Siegel, Handschrift */
.popup-karte.brief { padding-top: 92px; border-radius: 8px 8px 22px 22px; background-image: none; }
.popup-karte.brief::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; background: var(--rosa); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 8px 8px 0 0; }
.popup-karte.brief .schmuck { top: 28px; width: 68px; filter: drop-shadow(0 5px 6px rgba(0,0,0,.22)); }
.popup-karte.brief h2 { font: 700 clamp(2.1rem, 6vw, 2.7rem)/1 var(--hand); text-align: left; }
.popup-karte.brief .text { font: 700 clamp(1.5rem, 4.4vw, 1.9rem)/1.22 var(--hand); text-align: left; }
.popup-karte.brief .ps { font-size: .98rem; text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--rosa); color: var(--tinte); }
@media (max-height: 560px) { .popup-karte { padding: 34px 20px 16px; } .popup-karte h2 { font-size: 1.5rem; } #popup-bild { width: 230px; } .popup-karte .zeilen { gap: 5px; margin-bottom: 10px; } .popup-karte.brief { padding-top: 70px; } .popup-karte.brief .text { font-size: 1.35rem; } }

/* =====================================================================================================================
   Handy und Tablet (body.touch): Der linke Daumen läuft, der rechte schaut sich um, tippt und drückt die Knöpfe.
   Unten bleibt links alles frei für den Stick; Karte, Auftrag und Sterne stehen oben.
   ===================================================================================================================== */
body.touch .ecke { flex-direction: row; gap: 7px; }
body.touch .rund { width: 42px; height: 42px; }
.rund svg { width: 22px; height: 22px; vertical-align: middle; }
#vollbild[hidden] { display: none; }
body.touch #minikarte { left: max(12px, env(safe-area-inset-left, 0px)); top: calc(64px + var(--sicher-o)); bottom: auto; width: 92px; height: 92px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pink), 0 8px 20px rgba(0,0,0,.4); pointer-events: auto !important; touch-action: manipulation; }
body.touch .tafel { padding: 7px 10px 8px; border-radius: 16px; }
body.touch .tafel-titel { display: none; }
body.touch #zettel-liste { gap: 3px; }
body.touch #zettel-liste li { width: 27px; font-size: 0; }
body.touch #zettel-liste li svg { width: 24px; height: 24px; margin-bottom: 0; }
body.touch .schluessel { margin-top: 6px; padding-top: 5px; font-size: .78rem; }
body.touch .sterne { display: none; }
/* Auftrag oben; antippen dreht die Kamera in Wegrichtung */
body.touch .ziel { top: calc(60px + var(--sicher-o)); bottom: auto; max-width: min(54vw, 520px); font-size: .98rem; pointer-events: auto !important; touch-action: manipulation; }
body.touch .raum { left: 50%; right: auto; top: auto; bottom: calc(10px + var(--sicher-u)); transform: translateX(-50%); font-size: .8rem; padding: 5px 13px; }
body.touch .meldung { top: calc(112px + var(--sicher-o)); font-size: .95rem; padding: 9px 15px; max-width: 80vw; }
body.touch .hilfe-text { top: calc(62px + var(--sicher-o)); z-index: 3; }
body.touch .banner { top: 34%; }
body.touch .banner strong { font-size: clamp(2.6rem, 11vw, 4.6rem); }
@media (orientation: portrait) {
  /* hochkant: oben die Knöpfe, darunter links die Karte und rechts die Sterne */
  body.touch .tafel { top: calc(64px + var(--sicher-o)); }
  body.touch .ziel { top: calc(170px + var(--sicher-o)); max-width: 92vw; font-size: 1.02rem; }
  body.touch .meldung { top: calc(232px + var(--sicher-o)); }
  body.touch .banner { top: 38%; }
}
body.touch.kann .klein-knopf::after { display: none; }
/* Stick: entsteht unter dem Daumen */
body.touch .stick { width: 128px; height: 128px; margin: -64px 0 0 -64px; background: radial-gradient(circle, rgba(255,255,255,.10) 55%, rgba(255,255,255,.22)); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(149,20,89,.35); }
body.touch .stick i { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: #fff; box-shadow: 0 0 0 3px var(--pink), 0 6px 14px rgba(0,0,0,.4); }
/* Knöpfe rechts unten: Der große Knopf in der Ecke wirft; steht Fips vor etwas, wird er zur beschrifteten Anpack-Taste */
body.touch .aktion.werfen { display: grid; place-items: center; }
#hud.rein .aktion.werfen { animation: reinUnten .6s .45s cubic-bezier(.2,1.2,.4,1) both; }
body.touch.zielt .aktion.werfen { background: var(--gold); border-color: #fff; color: #5f0c38; box-shadow: 0 8px 0 #b88a34, 0 16px 30px rgba(0,0,0,.4); animation: puls 1.3s ease-in-out infinite; }
body.touch.kann .aktion.werfen, body.touch.kann #springen { display: none; }
#aktion { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: auto; min-width: 86px; max-width: min(66vw, 330px); padding: 0 17px 0 24px; border-radius: 43px; font: 800 1.02rem/1.15 var(--ui); text-align: right; }
#aktion[hidden] { display: none; }
#aktion svg { flex: none; }
#aktion-text:empty { display: none; }
.aktion:active, #aktion:active { transform: translateY(4px); box-shadow: 0 4px 0 #5f0c38, 0 8px 18px rgba(0,0,0,.45); animation: none; }
body.touch .klein-knopf { width: 58px; height: 58px; }
body.touch .klein-knopf svg { width: 30px; height: 30px; }
body.touch .hinweis { left: 50%; bottom: calc(16px + var(--sicher-u)); padding: 8px 16px; font-size: .92rem; box-shadow: 0 0 0 2px var(--pink), 0 10px 24px rgba(0,0,0,.4); pointer-events: none !important; }
body.touch.kann .hinweis { display: none; }
body.touch .reiter { display: flex; left: auto; right: calc(22px + env(safe-area-inset-right, 0px)); bottom: calc(214px + var(--sicher-u)); padding: 9px 16px; font-size: .92rem; box-shadow: 0 0 0 2px var(--pink), 0 8px 20px rgba(0,0,0,.35); pointer-events: auto !important; touch-action: manipulation; }
body.touch .reiter[hidden] { display: none; }
body.touch .reiter kbd { display: none; }
/* Zielpunkt und Ringe um das, was sich antippen lässt */
body.touch #visier { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
#marken { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
#marken i { position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; display: none; }
#marken i::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(149,20,89,.9), 0 0 20px rgba(255,255,255,.7), inset 0 0 14px rgba(255,255,255,.35); animation: marke 1.1s ease-in-out infinite; }
@keyframes marke { 50% { transform: scale(1.16); opacity: .65; } }
/* Einweisung: wo welcher Daumen hingehört */
#einweisung { position: absolute; inset: 0; display: grid; grid-template-columns: 42% 1fr; pointer-events: none !important; }
#einweisung[hidden] { display: none; }
#einweisung > div { display: grid; align-content: center; justify-items: center; gap: 6px; padding-top: 22vh; color: #fff; font: 800 1rem var(--ui); text-align: center; text-shadow: 0 2px 0 #1d1a1c, 0 4px 14px rgba(0,0,0,.8); transition: opacity .5s; animation: auf2 .5s both; }
#einweisung svg { width: 72px; height: 72px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
#einweisung small { font: 800 .86rem var(--ui); opacity: .92; }
#einweisung.stick-ok .links, #einweisung.blick-ok .rechts { opacity: 0; }
@keyframes auf2 { from { opacity: 0; } }
@media (orientation: portrait) { #einweisung { grid-template-columns: 50% 1fr; } #einweisung > div { padding-top: 34vh; } }
.anim-stick { animation: animStick 2.6s ease-in-out infinite; }
@keyframes animStick { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(0, -8px); } 45% { transform: translate(8px, -3px); } 70% { transform: translate(-7px, 4px); } }
/* Popups: Gestenbilder statt Tasten */
.popup-karte .zeile svg.geste { width: 42px; height: 42px; }
.nur-touch { display: none; }
body.touch .nur-touch { display: inline; }
body.touch .nur-maus { display: none; }
.anim-tipp, .anim-tipp2 { transform-box: fill-box; transform-origin: center; animation: animTipp 4s ease-out infinite; }
.anim-tipp2 { animation-name: animTipp2; }
@keyframes animTipp { 0% { transform: scale(.3); opacity: 0; } 6% { opacity: 1; } 22% { transform: scale(1.15); opacity: 0; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes animTipp2 { 0% { opacity: 0; } 4% { opacity: .9; } 16% { opacity: 0; } 100% { opacity: 0; } }
body.touch .popup-karte .tasten { min-width: 46px; }
body.touch .popup-karte .knopf { min-height: 52px; padding-left: 30px; padding-right: 30px; }
/* kleine Bildschirme: quer gehaltenes Handy (wenig Höhe) und schmales Hochformat */
@media (max-height: 460px) {
  body.touch .aktion { width: 78px; height: 78px; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(20px + var(--sicher-u)); }
  body.touch #aktion { width: auto; min-width: 78px; border-radius: 39px; font-size: .96rem; }
  body.touch .aktion svg { width: 38px; height: 38px; }
  body.touch .klein-knopf { width: 54px; height: 54px; }
  body.touch #springen { right: calc(112px + env(safe-area-inset-right, 0px)); bottom: calc(24px + var(--sicher-u)); }
  body.touch #schneeball { right: calc(100px + env(safe-area-inset-right, 0px)); bottom: calc(100px + var(--sicher-u)); }
  body.touch #staub { right: calc(26px + env(safe-area-inset-right, 0px)); bottom: calc(116px + var(--sicher-u)); }
  body.touch .reiter { bottom: calc(190px + var(--sicher-u)); }
  body.touch .klein-knopf::after { font-size: .56rem; top: calc(100% + 1px); }
  body.touch #minikarte { width: 84px; height: 84px; top: calc(60px + var(--sicher-o)); }
  body.touch .ziel { top: calc(14px + var(--sicher-o)); max-width: calc(100vw - 440px); min-width: 240px; font-size: .92rem; }
  body.touch .meldung { top: calc(64px + var(--sicher-o)); }
  body.touch .popup-karte { padding: 30px 22px 14px; max-height: calc(100vh - 16px); overflow: auto; }
  body.touch .popup-karte h2 { font-size: 1.4rem; margin-bottom: 8px; }
  body.touch .popup-karte .text { font-size: .96rem; margin-bottom: 10px; line-height: 1.4; }
  body.touch .popup-karte .zeilen { gap: 4px; margin-bottom: 10px; }
  body.touch .popup-karte .zeile svg.geste { width: 34px; height: 34px; }
  body.touch #popup-bild { width: 190px; margin-bottom: 6px; }
  body.touch .popup-karte .knopf { min-height: 46px; }
}
@media (max-height: 460px) and (min-width: 560px) {
  /* quer: Bild links, Text rechts, damit nichts abgeschnitten wird */
  body.touch .popup-karte:not(.brief) { width: min(620px, 100%); }
}
