@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'More Sugar'; src: url('/fonts/moresugar.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'More Sugar Thin'; src: url('/fonts/moresugar-thin.ttf') format('truetype'); font-display: swap; }
.logo { font-family: 'More Sugar', 'Fredoka', sans-serif; font-weight: 400; letter-spacing: 4px; }
@font-face { font-family: 'Patrick Hand'; src: url('/fonts/patrick-hand-latin-400-normal.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #3b2a20;
  --ink-soft: #6b4f3c;
  --paper: #fbf4e6;
  --paper-2: #f3e6cc;
  --blue: #3f6ea8;
  --blue-dark: #2d5285;
  --red: #c4483b;
  --gold: #e3a93c;
  --green: #5c8a4a;
  --shadow: 0 10px 30px rgba(40, 24, 12, .28);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #2a1d15; overflow: hidden; }
body { font-family: 'Fredoka', system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; touch-action: manipulation; }

#stage { position: absolute; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; background: var(--paper); }
#screen, #overlay { position: absolute; inset: 0; }
#overlay { z-index: 50; background: rgba(42, 29, 21, .55); display: flex; align-items: center; justify-content: center; }
#overlay[hidden], #toast[hidden] { display: none; }
#toast { position: absolute; z-index: 80; left: 50%; bottom: 60px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 22px 40px; border-radius: 40px; font-size: 34px; box-shadow: var(--shadow); }

.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg.blur { filter: blur(10px) brightness(.85); transform: scale(1.06); }
.abs { position: absolute; }

/* Buttons */
button { font-family: inherit; color: inherit; border: 0; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 84px; padding: 0 44px; border-radius: 42px;
  font-size: 36px; font-weight: 600; background: var(--blue); color: #fff; box-shadow: 0 6px 0 var(--blue-dark), var(--shadow); transition: transform .1s; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--blue-dark); }
.btn.red { background: var(--red); box-shadow: 0 6px 0 #8f3027, var(--shadow); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 0 #b17f22, var(--shadow); }
.btn.light { background: var(--paper); color: var(--ink); box-shadow: 0 6px 0 #d8c6a3, var(--shadow); }
.btn.small { min-height: 64px; font-size: 28px; padding: 0 30px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { width: 96px; height: 96px; border-radius: 50%; background: var(--paper); box-shadow: 0 5px 0 #d8c6a3, var(--shadow);
  display: inline-flex; align-items: center; justify-content: center; font-size: 44px; }
.iconbtn img { width: 70%; height: 70%; object-fit: contain; }
.iconbtn .lbl { position: absolute; top: 102px; font-size: 22px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.7); white-space: nowrap; }

/* Karten / Formulare */
.card { background: var(--paper); border-radius: 36px; box-shadow: var(--shadow); padding: 56px 64px; }
.card h1 { margin: 0 0 12px; font-size: 64px; font-weight: 600; }
.card h2 { margin: 0 0 18px; font-size: 46px; font-weight: 600; }
.card p { font-size: 30px; line-height: 1.4; margin: 0 0 22px; color: var(--ink-soft); }
label.f { display: block; font-size: 28px; font-weight: 600; margin: 18px 0 8px; }
input.f, select.f, textarea.f { width: 100%; font-family: inherit; font-size: 34px; padding: 18px 24px; border-radius: 20px; border: 3px solid #d8c6a3; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
input.f:focus, select.f:focus, textarea.f:focus { outline: none; border-color: var(--blue); }
.hint { font-size: 24px; color: var(--ink-soft); margin-top: 6px; }
.err { color: var(--red); font-size: 28px; min-height: 36px; margin-top: 12px; }
.link { background: none; color: var(--blue); font-size: 28px; text-decoration: underline; padding: 8px; }
.row { display: flex; gap: 24px; align-items: center; }
.row > * { flex: 1; }
.brand { font-family: 'Fredoka'; font-weight: 600; letter-spacing: 6px; font-size: 30px; color: var(--ink-soft); }
.footer-links { position: absolute; bottom: 24px; left: 36px; font-size: 22px; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a { color: #fff; margin-left: 24px; text-shadow: 0 2px 4px rgba(0,0,0,.6); }

/* Erzähl-Leiste */
.panel { position: absolute; left: 380px; right: 60px; bottom: 40px; min-height: 250px; max-height: 420px; background: rgba(251, 244, 230, .96);
  border-radius: 32px; box-shadow: var(--shadow); padding: 34px 44px 110px; overflow: hidden; }
.panel.left { left: 60px; right: 380px; }
.panel .txt { font-size: 38px; line-height: 1.45; max-height: 270px; overflow-y: auto; padding: 10px 10px 10px 0; scroll-padding: 20px 0; -webkit-mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.panel .s { transition: background .2s; border-radius: 8px; }
.panel .s.on { background: #ffe39a; box-shadow: 0 0 0 4px #ffe39a; }
.panel .ctrl { position: absolute; left: 44px; right: 44px; bottom: 22px; display: flex; gap: 20px; align-items: center; }
.panel .ctrl .sp { flex: 1; }

/* Figuren */
.fig { position: absolute; bottom: 30px; height: 560px; pointer-events: none; filter: drop-shadow(0 12px 14px rgba(0,0,0,.25)); transition: opacity .3s; }
.fig.small { height: 300px; }
.bob { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px); } }
.fly { animation: fly 2.6s ease-in forwards; }
@keyframes fly { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(900px,-700px) scale(.4); opacity: 0; } }

/* Brief zum Finden */
.peek { position: absolute; width: 150px; transform: translate(-50%, -50%) rotate(-12deg); cursor: pointer; animation: wiggle 1.4s ease-in-out infinite; filter: drop-shadow(0 0 14px #fff6c8) drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.peek.icon { width: 210px; }
@keyframes wiggle { 0%,100% { transform: translate(-50%,-50%) rotate(-12deg); } 50% { transform: translate(-50%,-56%) rotate(8deg); } }

/* Brief */
.letter { position: absolute; left: 50%; top: 46%; width: 1040px; max-height: 760px; transform: translate(-50%, -50%) rotate(-1.2deg);
  background: #fffaf0 var(--liniert) center/cover; border-radius: 12px; box-shadow: var(--shadow);
  padding: 70px 90px; font-family: 'Patrick Hand', cursive; font-size: 42px; line-height: 1.38; color: #2b3a5b; overflow-y: auto; }
.letter .stamp { position: absolute; top: 24px; right: 30px; width: 150px; transform: rotate(6deg); }

/* Postfach-Wand */
.wall { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.door { position: absolute; cursor: pointer; transition: transform .15s; }
.door img.d { width: 100%; height: 100%; object-fit: contain; }
.door .num { position: absolute; transform: translate(-50%,-50%); border-radius: 50%; background: #fbf4e6; box-shadow: 0 0 0 4px #b98a4b, 0 4px 8px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #3b2a20; }
.door .st { position: absolute; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.door.hint { animation: glow 1.6s ease-in-out infinite; }
.door.next:active { transform: scale(.96); }
.door.locked { filter: none; }
@keyframes glow { 50% { filter: drop-shadow(0 0 22px #ffe08a) drop-shadow(0 0 8px #ffe08a); transform: scale(1.04); } }
.topbar { position: absolute; left: 40px; right: 40px; top: 120px; display: flex; gap: 26px; align-items: flex-start; z-index: 5; }
.classname { background: rgba(251,244,230,.95); border-radius: 30px; padding: 14px 34px; font-size: 38px; font-weight: 600; box-shadow: var(--shadow); }
.dock { position: absolute; right: 40px; top: 130px; display: flex; flex-direction: column; gap: 46px; z-index: 6; }

/* Aktionen */
.act-title { position: absolute; left: 0; right: 0; top: 40px; text-align: center; z-index: 4; }
.act-title span { display: inline-block; background: rgba(251,244,230,.96); border-radius: 30px; padding: 16px 40px; font-size: 38px; font-weight: 600; box-shadow: var(--shadow); max-width: 1500px; }
.act-area { position: absolute; left: 140px; right: 140px; top: 170px; bottom: 150px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 34px; }
.tile { background: #fff; border-radius: 28px; box-shadow: 0 6px 0 #d8c6a3, var(--shadow); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: transform .12s, opacity .3s; }
.tile img { width: 82%; height: 82%; object-fit: contain; pointer-events: none; }
.tile:active { transform: scale(.95); }
.tile.sel { outline: 8px solid var(--gold); }
.tile.ok { outline: 8px solid var(--green); }
.tile.done { opacity: .25; pointer-events: none; }
.tile.wrong { animation: shake .35s; }
.tile .badge { position: absolute; top: -18px; left: -18px; width: 62px; height: 62px; border-radius: 50%; background: var(--green); color: #fff; font-size: 34px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
@keyframes shake { 25% { transform: translateX(-12px); } 75% { transform: translateX(12px); } }
.word { font-size: 64px; font-weight: 600; padding: 0 40px; min-height: 140px; }
.q { font-size: 44px; font-weight: 600; text-align: center; background: rgba(251,244,230,.96); border-radius: 30px; padding: 26px 44px; max-width: 1400px; box-shadow: var(--shadow); }
.opts { display: flex; gap: 40px; justify-content: center; width: 100%; }
.opt { min-width: 260px; min-height: 150px; font-size: 56px; font-weight: 600; background: #fff; border-radius: 30px; box-shadow: 0 6px 0 #d8c6a3, var(--shadow); padding: 0 30px; }
.opt.ok { background: #d9f0cf; } .opt.no { background: #f6d2cc; animation: shake .35s; }
.dots { position: absolute; inset: 0; }
.cell { width: 110px; height: 110px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 3px #d8c6a3; cursor: pointer; }
.cell.on { background: var(--blue); box-shadow: inset 0 0 0 3px var(--blue-dark); }
.cell.given { cursor: default; }
.cell.wall { background: #8a6a52; cursor: default; box-shadow: none; }
.grid { display: grid; gap: 8px; }
.progress { position: absolute; right: 60px; bottom: 50px; font-size: 34px; font-weight: 600; background: rgba(251,244,230,.95); padding: 12px 30px; border-radius: 26px; }
.bottombar { position: absolute; left: 60px; right: 60px; bottom: 40px; display: flex; justify-content: space-between; align-items: center; z-index: 6; }

/* Losrad */
.wheelwrap { position: absolute; left: 160px; top: 140px; width: 800px; height: 800px; }
.wheel { width: 100%; height: 100%; transition: transform 4s cubic-bezier(.17,.67,.2,1); }
.pointer { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); width: 0; height: 0; border-left: 38px solid transparent; border-right: 38px solid transparent; border-top: 70px solid var(--red); filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.bignum { font-size: 220px; font-weight: 600; line-height: 1; color: var(--blue); }

/* Album & Karte */
.slot { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.slot .ph { width: 100%; height: 76%; border: 4px dashed #d8c6a3; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #d8c6a3; font-weight: 600; }
.slot img { width: 100%; height: 76%; object-fit: contain; }
.slot .cap { font-family: 'Patrick Hand'; font-size: 30px; color: #2b3a5b; margin-top: 4px; white-space: nowrap; }
.pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 0 5px rgba(255,215,94,.45), 0 0 30px 12px rgba(255,215,94,.8); }
.pin.off { background: rgba(255,255,255,.55); box-shadow: 0 0 0 3px rgba(59,42,32,.35); width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.pin .pl { position: absolute; left: 26px; top: -8px; font-size: 24px; font-weight: 600; white-space: nowrap; background: rgba(251,244,230,.92); padding: 2px 12px; border-radius: 14px; }

/* Klassenliste */
.classgrid { display: flex; gap: 40px; justify-content: center; margin-top: 30px; }
.classcard { width: 560px; min-height: 360px; background: #fff; border-radius: 32px; box-shadow: 0 6px 0 #d8c6a3, var(--shadow); padding: 40px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
.classcard h3 { font-size: 46px; margin: 0; }
.classcard .meta { font-size: 28px; color: var(--ink-soft); }
.classcard.new { align-items: center; justify-content: center; border: 5px dashed #d8c6a3; box-shadow: none; background: transparent; font-size: 40px; color: var(--ink-soft); }
.bar { height: 22px; border-radius: 11px; background: var(--paper-2); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--gold); }
.install { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 16px 30px; border-radius: 26px; font-size: 26px; z-index: 70; display: flex; gap: 20px; align-items: center; }
.confetti { position: absolute; width: 18px; height: 26px; top: -40px; animation: fall linear forwards; z-index: 60; pointer-events: none; }
@keyframes fall { to { transform: translateY(1200px) rotate(720deg); } }
.stampfly { position: absolute; left: 50%; top: 45%; width: 360px; transform: translate(-50%,-50%) scale(.2); animation: stampin 1.8s ease-out forwards; z-index: 40; }
@keyframes stampin { 30% { transform: translate(-50%,-50%) scale(1.15) rotate(-6deg); } 55% { transform: translate(-50%,-50%) scale(1) rotate(4deg); } 100% { transform: translate(-50%,-50%) scale(1) rotate(4deg); } }
.cert { width: 1360px; height: 962px; background: var(--urkunde) center/100% 100% no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 170px 200px 150px; }
.cert h1 { font-size: 72px; margin: 0; }
.cert .cn { font-size: 68px; font-weight: 600; color: var(--blue); margin: 10px 0; }
.cert p { font-size: 32px; margin: 8px 0; }
@media print { body { background: #fff; } #stage { transform: none !important; } .noprint { display: none !important; } }


/* Brief-Suche mit Eis-Zahlen */
.envnum { position: absolute; width: 160px; transform: translate(-50%,-50%) rotate(var(--rot, 0deg)); cursor: pointer; z-index: 3; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); transition: transform .3s, opacity .3s; }
.envnum img { width: 100%; display: block; }
.envnum span { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%); text-align: center; font: 600 58px 'Fredoka'; color: #2b6ea8; -webkit-text-stroke: 6px #fff; paint-order: stroke fill; text-shadow: 0 0 14px #bfe6ff; }
.envnum.wrong { animation: envshake .5s; }
.envnum.found { transform: translate(-50%,-50%) scale(1.6) rotate(0); z-index: 9; }
@keyframes envshake { 0%,100% { transform: translate(-50%,-50%) rotate(var(--rot)); } 25% { transform: translate(-58%,-50%) rotate(var(--rot)); } 75% { transform: translate(-42%,-50%) rotate(var(--rot)); } }
.riddle { position: absolute; left: 50%; top: 18px; transform: translateX(-50%) rotate(-.6deg); width: 900px; background: #fffaf0 var(--liniert) center/cover; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 16px 70px 14px; z-index: 6; text-align: center; }
.riddle .rintro { font-size: 30px; color: var(--ink-soft); }
.riddle .rq { font: 400 46px/1.15 'Patrick Hand'; color: #2b6ea8; text-shadow: 0 0 6px #d6efff; margin-top: 4px; }
.rbubble { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); background: #fff; border-radius: 30px; padding: 16px 34px; font-size: 32px; box-shadow: var(--shadow); z-index: 8; }
.whonum { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 360px; height: 360px; border-radius: 50%; background: var(--gold, #e8b44a); color: #3b2a20; font: 600 170px/1 'Fredoka'; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; box-shadow: 0 20px 60px rgba(0,0,0,.4); animation: pop .3s; }
.whonum small { font-size: 28px; font-weight: 400; margin-bottom: 6px; }
@keyframes pop { from { transform: translate(-50%,-50%) scale(.4); } to { transform: translate(-50%,-50%) scale(1); } }
[hidden] { display: none !important; }
.riddle.left { left: 6%; transform: rotate(-.6deg); } .riddle.right { left: auto; right: 3%; transform: rotate(.6deg); }
.findtools { position: absolute; left: 30px; bottom: 30px; display: flex; gap: 16px; z-index: 7; }
.findtools .btn { white-space: nowrap; }

/* Vorgeschichte */
.pdots { display: flex; gap: 10px; } .pdots i { width: 16px; height: 16px; border-radius: 50%; background: #d8c6a3; } .pdots i.on { background: var(--gold); }
.bg.storm { animation: stormshake .25s 6 1.2s; }
@keyframes stormshake { 25% { transform: translate(-8px, 3px) rotate(-.3deg); } 75% { transform: translate(8px, -3px) rotate(.3deg); } }
.stormenv { position: absolute; width: 110px; opacity: 0; animation: blowaway 2.4s ease-in forwards; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); z-index: 3; }
@keyframes blowaway { 0% { opacity: 0; transform: translate(0,0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
.panel .ctrl .btn { white-space: nowrap; }
/* Belohnung nach dem Tag */
.slot.new img { animation: landin 1.1s cubic-bezier(.3,1.4,.5,1) both; animation-delay: var(--d); }
.slot.new { z-index: 5; }
.slot.new::after { content: ''; position: absolute; inset: -10px -10px 20% -10px; border-radius: 20px; box-shadow: 0 0 0 6px #ffd75e, 0 0 40px 10px rgba(255,215,94,.8); opacity: 0; animation: slotglow 1.6s ease-out forwards; animation-delay: calc(var(--d) + .9s); pointer-events: none; }
@keyframes landin { 0% { transform: translateY(-500px) scale(2.6) rotate(-20deg); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes slotglow { 30% { opacity: 1; } 100% { opacity: .7; } }
.pin.new { animation: pinpop 1.2s ease-out both .5s; z-index: 4; }
.pin.new .pl { font-size: 30px; }
@keyframes pinpop { 0% { transform: scale(0); } 60% { transform: scale(2.2); } 100% { transform: scale(1.3); } }

/* Paare finden (verdeckte Karten) */
.flip { position: relative; cursor: pointer; perspective: 900px; }
.flip .face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0,0,0,.18), 0 10px 24px rgba(0,0,0,.25); }
.flip .back { background: repeating-linear-gradient(45deg, #3f6ea8 0 18px, #4a7bb7 18px 36px); border: 6px solid #fbf4e6; }
.flip .back img { width: 46%; opacity: .9; transform: rotate(-8deg); }
.flip .front { background: #fff; transform: rotateY(180deg); padding: 10%; }
.flip .front img { max-width: 100%; max-height: 100%; object-fit: contain; }
.flip.up .back { transform: rotateY(-180deg); } .flip.up .front { transform: rotateY(0); }
.flip.ok .front { box-shadow: 0 0 0 8px #7cc36b, 0 10px 24px rgba(0,0,0,.25); }
.flip.ok { cursor: default; animation: okpulse .5s; }
@keyframes okpulse { 50% { transform: scale(1.08); } }
.teams { display: flex; gap: 30px; justify-content: center; }
.team { background: rgba(251,244,230,.95); border-radius: 26px; padding: 10px 30px; display: flex; gap: 20px; align-items: center; font-size: 32px; box-shadow: var(--shadow); opacity: .6; }
.team.on { opacity: 1; outline: 6px solid var(--gold); }
.team span { font-size: 44px; font-weight: 600; }
.team.t0 b::before { content: '★ '; color: #e3a93c; } .team.t1 b::before { content: '☾ '; color: #3f6ea8; }
.praise { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 1300px; background: rgba(251,244,230,.97); border-radius: 40px; padding: 40px 70px; font-size: 54px; font-weight: 600; text-align: center; box-shadow: var(--shadow); z-index: 30; animation: pop .35s; }

.classname { white-space: nowrap; }
.btn { white-space: nowrap; }
/* Kleine Bildschirme (iPad): Knöpfe und Text größer, weil die Bühne stark verkleinert wird */
body.compact .btn.small { min-height: 84px; font-size: 32px; padding: 0 30px; }
body.compact .panel .txt { font-size: 42px; }
body.compact .iconbtn { width: 96px; height: 96px; }
.menu { position: absolute; right: 60px; bottom: 120px; background: var(--paper); border-radius: 30px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px; z-index: 30; }
.stormwind { position: absolute; left: -300px; top: 22%; height: 330px; opacity: 0; animation: windthrough 3.2s ease-in-out forwards; z-index: 4; filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); }
@keyframes windthrough { 0% { opacity: 0; transform: translateX(0) rotate(-10deg); } 15% { opacity: .95; } 85% { opacity: .95; } 100% { opacity: 0; transform: translateX(2300px) rotate(20deg); } }
.envnum.empty { opacity: .5; filter: grayscale(1); }
.envnum.empty::after { content: 'leer'; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%) rotate(-8deg); background: #c4483b; color: #fff; font: 600 24px 'Fredoka'; padding: 2px 12px; border-radius: 10px; }
.answerbox { background: rgba(251,244,230,.95); border-radius: 30px; padding: 14px 30px 20px; box-shadow: var(--shadow); text-align: center; }
.answerbox .ab-title { font-size: 32px; font-weight: 600; margin-bottom: 10px; }
.panel { max-height: 500px; }
.panel .txt { max-height: 340px; }
.panel .more { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); font-size: 26px; color: var(--ink-soft); background: rgba(251,244,230,.95); border-radius: 16px; padding: 0 14px; pointer-events: none; animation: bob 1.6s ease-in-out infinite; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff !important; }
  #stage { transform: none !important; left: 0 !important; top: 0 !important; width: 297mm !important; height: 210mm !important; }
  #screen .bg, .noprint, #toast, #overlay { display: none !important; }
  .confetti { display: none !important; }
  .cert { position: fixed !important; left: 0; top: 0; width: 100vw !important; height: 100vh !important; padding: 26mm 34mm 22mm !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert h1 { font-size: 48pt; } .cert .cn { font-size: 40pt; } .cert p { font-size: 16pt; }
}
/* Verschiedene Umschläge und Verstecke */
.envnum.m-tag { width: 220px; }
.envnum.m-tag span { left: auto; right: -14px; top: auto; bottom: -10px; transform: none; min-width: 74px; padding: 2px 12px; border-radius: 22px; background: rgba(235,247,255,.96); box-shadow: 0 0 0 4px #9fd3f5, 0 4px 8px rgba(0,0,0,.3); -webkit-text-stroke: 0; font-size: 44px; text-shadow: none; }
.envnum.m-tag.long span { font-size: 32px; }
.envnum.m-look { width: 170px; }
.envnum.m-center.long span { font-size: 38px; -webkit-text-stroke: 5px #fff; }
.envnum.m-center span { background: rgba(255,255,255,.0); }
.trialtag { background: #c4483b; color: #fff; font-size: 22px; letter-spacing: 3px; padding: 4px 12px; border-radius: 10px; margin-right: 16px; vertical-align: middle; }
.footer-links.dark a { color: #3b2a20; text-shadow: none; }

/* Dashboard „Meine Materialien“: Postkarten-Pinnwand auf Karopapier */
html:has(.dash), body:has(.dash) { background: #fffdf9; }   /* iPad-Ränder in Papierfarbe */
.dash { inset: 0; background: #fffdf9 url('/img/dashboard-bg.webp') center/cover no-repeat; }

/* Kopf: Logo links, ruhige Werkzeug-Knöpfe rechts */
.dashhead { position: absolute; left: 340px; right: 340px; top: 54px; height: 62px; display: flex; justify-content: space-between; align-items: center; }
.brand.logo { font-family: 'More Sugar Thin', 'More Sugar', sans-serif; font-weight: 400; font-size: 32px; letter-spacing: 6px; line-height: 1; color: #3b2a20; display: flex; align-items: flex-start; }
.brand .spark { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 26px; letter-spacing: 0; color: #c98f2a; margin: -5px 0 0 2px; line-height: 1; }
.dashhead .tools { display: flex; gap: 14px; }
.tbtn { display: inline-flex; align-items: center; gap: 10px; height: 62px; padding: 0 26px 0 20px; border-radius: 999px; border: 2px solid #e6dccb;
  background: rgba(255,255,255,.9); color: #4a3426; font: 600 24px 'Fredoka'; cursor: pointer; box-shadow: 0 2px 0 #e6dccb; }
.tbtn .ico, .tbtn svg { width: 26px; height: 26px; display: inline-flex; }
.tbtn.icon { width: 62px; padding: 0; justify-content: center; }
.tbtn.gold { background: #e3a93c; border-color: #d59b2e; color: #3b2a20; box-shadow: 0 2px 0 #b98226; padding: 0 26px 0 14px; }
.tbtn.gold .plus { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.5); font-size: 28px; line-height: 32px; display: inline-flex; justify-content: center; }
.tbtn:active { transform: translateY(2px); box-shadow: none; }

/* Inhalt */
.dashmain { position: absolute; left: 340px; right: 340px; top: 128px; bottom: 92px; display: flex; flex-direction: column; }
.titlerow { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex: none; }
.dashtitle { font: 600 64px/1.05 'Fredoka', sans-serif; color: #3b2a20; margin: 0; }
.dashsub { font-size: 26px; color: #8a6f58; margin: 10px 0 0; }
.btn.d-redeem { background: #e3a93c; color: #3b2a20; box-shadow: 0 5px 0 #b98226; }
.btn.d-redeem:active { box-shadow: 0 2px 0 #b98226; }
.addbtn { min-height: 66px; font-size: 26px; padding: 0 30px 0 22px; flex: none; }
.addbtn .plus { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.55); font-size: 30px; line-height: 32px; display: inline-flex; justify-content: center; }

.boardwrap { flex: 1; min-height: 0; margin: 18px -40px 0; padding: 40px 40px 30px; }
.boardwrap.scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9c7a8 transparent; }
.boardwrap.scroll::-webkit-scrollbar { width: 10px; } .boardwrap.scroll::-webkit-scrollbar-thumb { background: #d9c7a8; border-radius: 5px; }
.boardwrap.more { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.board { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 50px 46px; }
.board.many { display: grid; grid-template-columns: repeat(4, 1fr); gap: 54px 34px; align-items: start; }

/* Postkarte */
.pcard { position: relative; width: 384px; padding: 12px; background: #fffdf8; border-radius: 6px; cursor: pointer; text-align: left;
  transform: rotate(var(--r, 0deg)); box-shadow: 0 1px 0 #ece0cb, 0 16px 32px rgba(110,75,40,.18); transition: transform .15s; }
.pcard:active { transform: rotate(var(--r)) scale(.98); }
.board.many .pcard { width: auto; }
.pcard.soon { opacity: .6; }
.pcov { position: relative; aspect-ratio: 16 / 9; border-radius: 3px; background: #cfd9e6 center/cover no-repeat; overflow: hidden; }
.trialband { position: absolute; left: -25%; right: -25%; top: 50%; transform: translateY(-50%) rotate(-11deg); background: #c4483b; color: #fff;
  font: 600 36px/1 'Fredoka'; letter-spacing: 8px; text-align: center; padding: 10px 0; box-shadow: 0 6px 16px rgba(80,30,20,.32); }
.board.many .trialband { font-size: 26px; letter-spacing: 5px; padding: 8px 0; }

.pback { display: grid; grid-template-columns: 1fr 104px; gap: 18px; padding: 18px 6px 6px 8px; }
.pleft { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pkind { font-size: 18px; font-weight: 600; letter-spacing: .4px; color: #a0703c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ptitle { font: 600 30px/1.12 'Fredoka', sans-serif; color: #3b2a20; margin: 6px 0 16px; text-wrap: balance; }
.ptitle .nb { white-space: nowrap; }
.popen { display: inline-flex; align-items: center; height: 60px; padding: 0 34px; border-radius: 999px; background: #3f6ea8; color: #fff;
  font: 600 26px 'Fredoka'; box-shadow: 0 4px 0 #2d5285; margin-top: auto; }
.pright { border-left: 2px dashed #e6d6bb; padding-left: 16px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stamp { width: 84px; height: 98px; padding: 5px; background: #fff; border: 2px dashed #e0c393; transform: rotate(3deg); box-shadow: 0 2px 5px rgba(110,75,40,.16); }
.stamp span { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f6e4c6; color: #8a5a2b; border-radius: 2px; }
.stamp small { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.stamp b { font: 600 30px/1.05 'Fredoka'; }
.addr { width: 100%; display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.addr i { display: block; height: 2px; background: #e6d8bf; border-radius: 1px; }

.board.many .pback { grid-template-columns: 1fr 78px; gap: 12px; padding: 14px 4px 4px 6px; }
.board.many .pkind { font-size: 15px; white-space: normal; line-height: 1.2; }
.board.many .ptitle { font-size: 23px; margin: 4px 0 12px; }
.board.many .ptitle .nb { white-space: normal; }
.board.many .popen { height: 50px; padding: 0 24px; font-size: 22px; }
.board.many .pright { padding-left: 10px; gap: 12px; }
.board.many .stamp { width: 64px; height: 76px; padding: 4px; }
.board.many .stamp small { font-size: 12px; } .board.many .stamp b { font-size: 23px; }
.board.many .addr { gap: 13px; }

.prod-del { position: absolute; right: 22px; top: 22px; width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255,253,248,.96);
  color: #4a3426; font-size: 22px; line-height: 1; box-shadow: 0 3px 10px rgba(40,24,12,.28); cursor: pointer; z-index: 5; }
.prod-del::after { content: ''; position: absolute; inset: -14px; }
.board.many .prod-del { width: 46px; height: 46px; font-size: 19px; right: 18px; top: 18px; }

/* Washi-Tape */
.tape { position: absolute; left: 50%; top: -20px; width: 128px; height: 38px; transform: translateX(-50%) rotate(-3deg); z-index: 4;
  clip-path: polygon(3% 0, 97% 5%, 100% 50%, 96% 100%, 4% 95%, 0 50%); background: rgba(227,169,60,.45); }
.tape.t2 { background: rgba(110,155,205,.4); transform: translateX(-50%) rotate(4deg); }
.tape.t3 { background: rgba(214,96,84,.36); transform: translateX(-50%) rotate(-5deg); }
.tape.t4 { background: rgba(110,170,110,.4); transform: translateX(-50%) rotate(2deg); }
.board.many .tape { width: 100px; height: 32px; top: -17px; }

/* Gutschein zum Einlösen */
.coupon { position: relative; width: 340px; transform: rotate(var(--r, 0deg)); margin-top: 10px; }
.cbody { background: #fff8ea; border: 3px dashed #dcc59e; border-radius: 18px; padding: 36px 30px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  box-shadow: 0 14px 30px rgba(110,75,40,.14); }
.ctag { font-size: 18px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: #a0703c; }
.coupon .ptitle { font-size: 30px; margin: 0; }
.cp { font-size: 22px; line-height: 1.32; color: #85664e; margin: 0 0 6px; }
.dashmain input.f, .authmain input.f, .redeemcard input.f { height: 70px; font-size: 27px; text-align: center; letter-spacing: 3px; padding: 0 18px; border-radius: 999px; border: 3px solid #e6d3b2; background: #fffdf8; }
.dashmain input.f::placeholder, .authmain input.f::placeholder, .redeemcard input.f::placeholder { text-transform: none; letter-spacing: .5px; color: #b49a7f; }
.dashmain input.f:focus, .authmain input.f:focus, .redeemcard input.f:focus { border-color: #e3a93c; box-shadow: 0 0 0 5px rgba(227,169,60,.18); }
.coupon .btn.d-redeem { width: 100%; min-height: 70px; font-size: 28px; }
.dashmain .err, .authmain .err, .redeemcard .err { color: #c4483b; font-size: 21px; margin: 2px 0 0; }
.dashmain .err:empty, .authmain .err:empty, .redeemcard .err:empty { display: none; }
.board.empty .coupon { width: 600px; margin-top: 30px; }
.board.empty .cbody { padding: 50px 60px 44px; }
.board.empty .ptitle { font-size: 40px; }
.redeemcard { width: 820px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.redeemcard h2 { margin: 0; } .redeemcard input.f { width: 100%; }
.redeemcard .row { gap: 20px; margin-top: 8px; width: 100%; }
.redeemcard .row .btn { flex: 1; }

/* Fuß */
.dash ~ .footer-links { bottom: 30px; font-size: 22px; white-space: nowrap; }
.dash ~ .footer-links a { color: #9a7d63; text-decoration: none; margin-left: 0; }
.dash ~ .footer-links a + a::before { content: '·'; margin: 0 16px; color: #c9b08e; }

/* iPad (verkleinerte Bühne): etwas größer */
body.compact .tbtn { height: 72px; font-size: 27px; } body.compact .tbtn.icon { width: 72px; }
body.compact .dashsub { font-size: 29px; } body.compact .pkind { font-size: 20px; }
body.compact .board.many .pkind { font-size: 17px; } body.compact .board.many .ptitle { font-size: 25px; }
body.compact .dash ~ .footer-links { font-size: 25px; }

/* Anmeldung im selben Stil: zwei große Karten nebeneinander */
.authmain { position: absolute; left: 340px; right: 340px; top: 96px; bottom: 92px; display: flex; flex-direction: column; align-items: center; }
.authtitle { text-align: center; margin-bottom: 50px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.authtitle .brand.logo { color: #3b2a20; display: flex; align-items: flex-start; }
.authgrid { display: flex; gap: 60px; justify-content: center; align-items: stretch; }
.acard { position: relative; width: 560px; display: flex; }
.acard.login { transform: rotate(-.8deg); } .acard.login .abody { justify-content: center; } .acard.new { transform: rotate(.9deg); }
.acard.single { width: 760px; }
.abody { flex: 1; background: #fffdf8; border-radius: 8px; padding: 46px 48px 38px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 0 #ece0cb, 0 18px 36px rgba(110,75,40,.18); }
.acard.new .abody { background: #fff8ea; border: 3px dashed #dcc59e; border-radius: 18px; box-shadow: 0 14px 30px rgba(110,75,40,.14); }
.abody .ptitle { font-size: 38px; margin: 0 0 8px; }
.abody h2 { font: 600 38px/1.12 'Fredoka'; margin: 0 0 6px; color: #3b2a20; }
.abody p { font-size: 24px; line-height: 1.4; color: #85664e; margin: 0 0 6px; }
.abody label.f { font-size: 22px; margin: 6px 0 -4px; color: #6b4f3c; }
.authmain input.f { text-align: left; letter-spacing: .3px; padding: 0 28px; }
.authmain input.f.code, .acard.single input.f[autocapitalize] { text-align: center; letter-spacing: 3px; }
.abody .btn.wide { width: 100%; min-height: 74px; font-size: 30px; margin-top: 8px; }
.abody .link.small { font-size: 22px; color: #6b88b0; align-self: center; margin-top: 2px; }
.steps { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 14px; font-size: 23px; color: #6b4f3c; }
.steps li::before { content: counter(s); flex: none; width: 38px; height: 38px; border-radius: 50%; background: #f6e4c6; color: #8a5a2b; font: 600 21px/38px 'Fredoka'; text-align: center; }

/* Ladebildschirm */
.loadbox { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.loadbox .brand.logo { font-family: 'More Sugar Thin', 'More Sugar', sans-serif; font-size: 80px; letter-spacing: 10px; color: #3b2a20; display: flex; align-items: flex-start; }
.loadbox .spark { font-size: 70px; }

/* Hochformat (Handy): Bühne 1080×1920, Karten untereinander */
body.portrait .dashhead { left: 60px; right: 60px; top: 50px; }
body.portrait .brand.logo { font-size: 40px; }
body.portrait .dashmain { left: 60px; right: 60px; top: 160px; bottom: 110px; } body.portrait .authmain { left: 60px; right: 60px; top: 120px; bottom: 110px; }
body.portrait .titlerow { flex-direction: column; align-items: flex-start; gap: 24px; }
body.portrait .dashtitle { font-size: 72px; } body.portrait .dashsub { font-size: 32px; }
body.portrait .boardwrap { overflow-y: auto; margin: 10px -60px 0; padding: 40px 60px 40px; }
body.portrait .board { gap: 60px; }
body.portrait .board.many { grid-template-columns: repeat(2, 1fr); gap: 60px 40px; }
body.portrait .pcard { width: 820px; } body.portrait .board.many .pcard { width: auto; }
body.portrait .coupon, body.portrait .board.empty .coupon { width: 820px; }
body.portrait .authgrid { flex-direction: column; gap: 60px; align-items: center; }
body.portrait .acard, body.portrait .acard.single { width: 880px; }
body.portrait .authtitle { margin-bottom: 40px; }
body.portrait .abody input.f { height: 86px; font-size: 32px; }
body.portrait .abody .btn.wide { min-height: 88px; font-size: 34px; }
body.portrait .dash ~ .footer-links { font-size: 28px; bottom: 40px; }
