/* Little Gecko Studio – Website. Schriften liegen lokal (SIL Open Font License, siehe fonts/),
   damit keine Daten an Google Fonts oder andere Dritte gehen. */
@font-face { font-family: 'Mochiy Pop One'; font-weight: 400; font-display: swap; src: url('fonts/mochiy-pop-one-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Zen Maru Gothic'; font-weight: 500; font-display: swap; src: url('fonts/zen-maru-gothic-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Zen Maru Gothic'; font-weight: 900; font-display: swap; src: url('fonts/zen-maru-gothic-latin-900-normal.woff2') format('woff2'); }

:root {
  --page: #ffeaf1;
  --card: #fffaf6;
  --ink: #3b2433;
  --soft: #8a5872;
  --accent: #f78fa7;
  --gold: #ffd45e;
  --green: #5fa873;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #1f1820; --card: #2b2230; --ink: #fff3f7; --soft: #d7b3c6; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: 'Zen Maru Gothic', system-ui, sans-serif; font-weight: 500; line-height: 1.6;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header { padding: 28px 0 8px; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: 'Mochiy Pop One', sans-serif; font-size: 24px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--green); }
nav a { color: var(--soft); font-weight: 900; text-decoration: none; margin-left: 14px; }
nav a:hover { color: var(--ink); }
h1, h2 { font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(30px, 6vw, 44px); margin: 32px 0 8px; }
h2 { font-size: 24px; margin: 36px 0 8px; }
h3 { font-size: 18px; font-weight: 900; margin: 26px 0 4px; }
p.lead { font-size: 19px; color: var(--soft); font-weight: 900; margin: 0 0 24px; }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 22px; margin: 24px 0; }
.game { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.game img.icon { width: 112px; height: 112px; border-radius: 26px; border: 3px solid var(--ink); }
.game h2 { margin: 0 0 4px; }
.hero { width: 100%; height: auto; border-radius: 22px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: block; }
.pill { display: inline-block; background: var(--gold); color: #3b2433; border: 2px solid #3b2433; border-radius: 999px; padding: 2px 12px; font-weight: 900; font-size: 14px; }
a { color: inherit; }
.legal { max-width: 760px; }
.legal p, .legal li { overflow-wrap: anywhere; }
footer { margin: 64px 0 28px; color: var(--soft); font-size: 13px; }
footer a { margin-right: 14px; }
@media (max-width: 520px) {
  .game { grid-template-columns: 1fr; }
  nav a { margin: 0 14px 0 0; }
}
.legal h1 { font-size: clamp(26px, 7.5vw, 44px); hyphens: auto; overflow-wrap: anywhere; }

/* Beta-Test: Knöpfe, Hinweis-Banner, Schritte, FAQ */
nav a[aria-current="page"] { color: var(--ink); }
.btn {
  display: inline-block; background: var(--accent); color: #3b2433; text-decoration: none; text-align: center;
  font-family: 'Mochiy Pop One', sans-serif; font-size: 18px; line-height: 1.3;
  border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); padding: 12px 26px;
  transition: transform .08s, box-shadow .08s;
}
.btn.gold { background: var(--gold); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .beta-banner:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.game .btn { margin-top: 4px; }

.beta-banner {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center;
  background: var(--gold); color: #3b2433; text-decoration: none; padding: 16px 20px; margin: 20px 0 0;
  transition: transform .08s, box-shadow .08s;
}
.beta-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.beta-banner img { width: 72px; height: 72px; border-radius: 18px; border: 3px solid #3b2433; display: block; }
.beta-banner strong { display: block; font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; font-size: 21px; line-height: 1.25; }
.beta-banner span { font-weight: 900; }
.beta-banner u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.beta-banner .go { font-family: 'Mochiy Pop One', sans-serif; font-size: 28px; line-height: 1; }

.steps { list-style: none; padding: 0; margin: 0; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.step .num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: #3b2433;
  border: 3px solid var(--ink); display: grid; place-items: center;
  font-family: 'Mochiy Pop One', sans-serif; font-size: 24px; line-height: 1;
}
.step h2 { font-size: 22px; margin: 10px 0 6px; }
.step p { margin: 0 0 14px; }
.intro-head { display: flex; align-items: center; gap: 16px; }
.intro-head img { width: 80px; height: 80px; border-radius: 20px; border: 3px solid var(--ink); flex: none; }
.intro-head h2 { margin: 0; }
.intro p { margin: 14px 0 0; }
.hint { background: var(--page); border: 2px dashed var(--soft); border-radius: 14px; padding: 8px 14px; font-size: 15px; }
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0 0 4px; }
.faq p, .step p { overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .beta-banner { grid-template-columns: 56px 1fr; padding: 14px 16px; }
  .beta-banner img { width: 56px; height: 56px; border-radius: 14px; }
  .beta-banner strong { font-size: 18px; }
  .beta-banner .go { display: none; }
  .intro-head img { width: 64px; height: 64px; border-radius: 16px; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .step .num { width: 44px; height: 44px; font-size: 20px; }
  .step h2 { margin-top: 4px; }
  .step .btn { display: block; }
}

/* Startseite: Screenshot-Galerie und Features */
.shots {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  list-style: none; margin: 0 -4px; padding: 4px 4px 16px; scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.shots:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 18px; }
.shots li { flex: 0 0 184px; scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; display: block; background: var(--card);
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
}
.shots figcaption { margin-top: 10px; text-align: center; font-weight: 900; font-size: 14px; color: var(--soft); }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 16px 0 0; }
.features .card { margin: 0; }
.features h3 { margin: 0 0 6px; font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; font-size: 19px; }
.features p { margin: 0; }
@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .shots li { flex-basis: 158px; }
}

/* 404-Seite */
.lost { text-align: center; margin-top: 40px; padding: 32px 22px; }
.lost img { width: 112px; height: 112px; border-radius: 26px; border: 3px solid var(--ink); }
.lost h1 { margin: 16px 0 8px; font-size: clamp(26px, 6vw, 36px); }
.lost .btn { margin-top: 10px; }

/* Beta: QR-Codes neben den Schritten (nur auf großen Bildschirmen, am Handy reicht der Knopf) */
.step { grid-template-columns: 52px 1fr auto; }
.qr { margin: 0; width: 132px; text-align: center; align-self: center; }
.qr img { width: 132px; height: 132px; display: block; background: #fff; border: 3px solid var(--ink); border-radius: 14px; }
.qr figcaption { margin-top: 6px; font-size: 13px; font-weight: 900; color: var(--soft); line-height: 1.3; }
@media (max-width: 700px) {
  .step { grid-template-columns: 52px 1fr; }
  .qr { display: none; }
}
@media (max-width: 520px) {
  .step { grid-template-columns: 1fr; }
}

/* ===== Spielereien (app.js) ===== */
:root { --tile: #fff7fa; --tile-edge: rgba(59, 36, 51, .14); --lilac: #c8b4ec; --sky: #a8dcf0; --mint: #8cc79a; }
@media (prefers-color-scheme: dark) {
  :root { --tile: #392c3f; --tile-edge: rgba(255, 243, 247, .12); }
}
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn.small { font-size: 15px; padding: 8px 18px; box-shadow: 0 3px 0 var(--ink); }
.btn.ghost { background: var(--card); color: var(--ink); }

/* Mochi (SVG aus app.js); ohne JS bleibt das App-Icon stehen */
.mochi-slot { display: block; }
.mochi { display: block; width: 100%; height: auto; overflow: visible; cursor: pointer; }
.m-eyes { transform: translate(var(--ex, 0px), var(--ey, 0px)); transition: transform .15s ease-out; }
.m-blink { transform-box: view-box; transform-origin: 60px 67px; animation: blink 5.5s infinite; }
.m-body { transform-box: view-box; transform-origin: 60px 99px; }
.mochi.squish .m-body { animation: squish .5s cubic-bezier(.3, 1.6, .5, 1); }
.beta-banner:hover .m-body { animation: hop .7s ease; }
.beta-banner .mochi-slot { width: 72px; }
.intro-head .mochi-slot { width: 80px; flex: none; }
.lost .mochi-slot { width: 128px; margin: 0 auto; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes squish { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.14, .82); } 60% { transform: scale(.93, 1.1); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-7px) scale(.98, 1.03); } 60% { transform: translateY(0) scale(1.05, .95); } }

/* Startseite: Kopfbereich mit spielbarem Brett und Pixel-Quadraten wie auf der Feature-Grafik */
.intro-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 36px; align-items: center; margin: 28px 0 32px; }
.intro-text, .pz-slot { position: relative; z-index: 1; }
.intro-hero h1 { margin-top: 24px; }
.pz-slot { width: 100%; max-width: 380px; justify-self: end; }
.pz-fallback { display: block; width: 100%; max-width: 256px; height: auto; margin: 0 auto; border: 3px solid var(--ink); border-radius: 48px; box-shadow: 0 5px 0 var(--ink); }
.try-hint { display: inline-block; margin: 0; padding: 8px 14px; border: 2px dashed var(--soft); border-radius: 14px; color: var(--soft); font-weight: 900; }
.try-hint::after { content: " →"; }
.sprinkles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sprinkles i { position: absolute; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 3px; background: var(--gold); animation: float 6s ease-in-out infinite alternate; }
.sprinkles i:nth-child(1) { left: 1%; top: 2%; }
.sprinkles i:nth-child(2) { left: 38%; top: 0; width: 10px; height: 10px; background: var(--lilac); animation-delay: -2s; }
.sprinkles i:nth-child(3) { left: 52%; top: 78%; background: var(--sky); animation-delay: -4s; }
.sprinkles i:nth-child(4) { left: 6%; top: 88%; width: 10px; height: 10px; background: var(--accent); animation-delay: -1s; }
.sprinkles i:nth-child(5) { right: 1%; top: 0; background: var(--mint); animation-delay: -3s; }
.sprinkles i:nth-child(6) { left: 30%; top: 92%; width: 9px; height: 9px; background: var(--card); animation-delay: -5s; }
.sprinkles i:nth-child(7) { right: 0; bottom: 2%; width: 11px; height: 11px; background: var(--lilac); animation-delay: -2.5s; }
@keyframes float { from { transform: translateY(0) rotate(10deg); } to { transform: translateY(-10px) rotate(-12deg); } }
@media (max-width: 760px) {
  .intro-hero { grid-template-columns: 1fr; gap: 20px; }
  .pz-slot { justify-self: center; }
  .try-hint::after { content: " ↓"; }
  .sprinkles i:nth-child(-n+2), .sprinkles i:nth-child(5) { display: none; }
}

/* Mini-Level */
.pz { position: relative; margin: 0; padding: 14px; }
.pz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pz-title strong { display: block; font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; font-size: 20px; line-height: 1.2; }
.pz-title span { color: var(--soft); font-size: 13px; font-weight: 900; }
.pz-reset {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--card); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink);
}
.pz-reset svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pz-reset:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.pz-reset:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.pz-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pz-hearts { display: flex; flex: none; gap: 3px; }
.pz-hearts svg { display: block; width: 24px; height: 22px; }
.pz-hearts path { fill: #f78fa7; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; transition: fill .2s; }
.pz-hearts .lost path { fill: var(--tile); }
.pz-hearts .pop { animation: pop .4s ease; }
@keyframes pop { 40% { transform: scale(1.35) rotate(-12deg); } }
.pz-progress { position: relative; flex: 1; height: 24px; overflow: hidden; background: var(--tile); border: 3px solid var(--ink); border-radius: 999px; }
.pz-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--green); transition: width .25s ease; }
.pz-count { position: relative; display: block; text-align: center; font-size: 13px; font-weight: 900; line-height: 18px; }
.pz-stage { position: relative; }
.pz-board { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tile); border: 3px solid var(--ink); border-radius: 16px; }
.pz-pic { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pz-tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); }
.pz-tile {
  position: relative; z-index: 1; display: grid; place-items: center; margin: 0; padding: 14%; cursor: pointer;
  background: var(--tile); border: 0; border-radius: 0; box-shadow: inset 0 0 0 1px var(--tile-edge); -webkit-tap-highlight-color: transparent;
}
.pz-tile svg { width: 100%; height: 100%; overflow: visible; transform: rotate(var(--rot)); transition: transform .12s ease; }
.pz-tile path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pz-tile .o { stroke: #3b2433; stroke-width: 9; }
.pz-tile .f { stroke: var(--ac); stroke-width: 4.5; }
@media (hover: hover) { .pz-tile:hover svg { transform: rotate(var(--rot)) scale(1.1); } }
.pz-tile:focus-visible { z-index: 3; outline: 3px solid var(--green); outline-offset: -4px; }
.pz-tile.gone { z-index: 2; pointer-events: none; transform: translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%)); transition: transform var(--t) cubic-bezier(.5, 0, .85, .55); }
.pz-tile.out { visibility: hidden; }
.pz-tile.bump { animation: bump .32s ease; }
.pz-tile.hit { animation: hit .45s ease; }
@keyframes bump { 35% { transform: translate(calc(var(--bx) * 16%), calc(var(--by) * 16%)); } 70% { transform: translate(calc(var(--bx) * -4%), calc(var(--by) * -4%)); } }
@keyframes hit { 30% { background: #ffc2d1; } }
.pz-board.won .pz-pic { animation: shine .7s ease; }
@keyframes shine { 40% { filter: brightness(1.12) saturate(1.2); } }
.pz-msg {
  position: relative; margin-top: 12px; padding: 14px 14px 16px; text-align: center;
  background: var(--card); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink);
  animation: rise .35s cubic-bezier(.3, 1.4, .5, 1);
}
.pz-msg strong { display: block; font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; font-size: 20px; line-height: 1.25; }
.pz-msg p { margin: 4px 0 12px; font-size: 15px; line-height: 1.45; }
.pz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pz-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: -2px 0 4px; }
.pz-star { display: inline-block; }
.pz-star svg { display: block; width: 32px; height: 32px; }
.pz-star:nth-child(2) svg { width: 42px; height: 42px; }
.pz-star path { fill: var(--tile); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.pz-star.got path { fill: var(--gold); }
.pz-star.got { animation: starpop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--k, 0) * 140ms + 150ms); }
@keyframes starpop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Beta-Seite: Quest */
.quest { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.quest .mochi-slot { width: 64px; flex: none; }
.quest-info { flex: 1; min-width: 0; }
.quest-info strong { display: block; font-family: 'Mochiy Pop One', sans-serif; font-weight: 400; font-size: 19px; line-height: 1.3; }
.quest-count { display: block; color: var(--soft); font-size: 15px; font-weight: 900; }
.quest-bar { height: 18px; margin-top: 8px; overflow: hidden; background: var(--page); border: 3px solid var(--ink); border-radius: 999px; }
.quest-bar span { display: block; width: calc(var(--p, 0) * 100%); height: 100%; background: var(--green); transition: width .45s cubic-bezier(.3, 1.3, .5, 1); }
.done-toggle {
  display: inline-block; margin: 0 0 0 12px; padding: 6px 12px; vertical-align: middle; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 900; color: var(--soft); background: transparent; border: 2px dashed var(--soft); border-radius: 999px;
}
.done-toggle[aria-pressed="true"] { color: #3b2433; background: var(--green); border: 2px solid var(--ink); }
.done-toggle:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.step .num { position: relative; transition: background .2s; }
.step.done .num { color: transparent; background: var(--green); }
.step.done .num::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #3b2433; font-family: system-ui, sans-serif; font-weight: 900; }
.quest-win { display: flex; align-items: center; gap: 18px; color: #3b2433; background: var(--gold); animation: rise .45s cubic-bezier(.3, 1.4, .5, 1); }
.quest-win .mochi-slot { width: 88px; flex: none; }
.quest-win h2 { margin: 0 0 4px; font-size: 22px; }
.quest-win p { margin: 0; }

/* Pixel-Konfetti (fixierte Ebene, damit nichts seitlich überläuft) */
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; left: var(--ox); top: var(--oy); width: 11px; height: 11px; margin: -5px 0 0 -5px;
  background: var(--c); border: 2px solid #3b2433; border-radius: 2px; animation: burst 1.5s cubic-bezier(.15, .6, .35, 1) var(--d) both;
}
@keyframes burst {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  45% { transform: translate(calc(var(--x) * 150px), calc(var(--y) * -170px)) rotate(calc(var(--r) * .5)); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 230px), calc(var(--y) * -60px + 160px)) rotate(var(--r)); opacity: 0; }
}

/* Feature-Karten mit Pixel-Icons, Screenshots wie Sticker */
.px-icon { display: block; width: 40px; height: 40px; margin: 0 0 10px; image-rendering: pixelated; transition: transform .2s ease; }
@media (hover: hover) { .features .card:hover .px-icon { transform: rotate(-8deg) scale(1.12); } }
.shots { margin: 0 -6px; padding: 12px 6px 18px; }
.shots img { transition: transform .2s ease; }
.shots li:nth-child(odd) img { transform: rotate(-1.6deg); }
.shots li:nth-child(even) img { transform: rotate(1.4deg); }
@media (hover: hover) { .shots li:hover img { transform: rotate(0) translateY(-4px); } }

@media (max-width: 520px) {
  .beta-banner .mochi-slot { width: 56px; }
  .intro-head .mochi-slot { width: 64px; }
  .done-toggle { display: block; margin: 10px auto 0; }
  .quest-win { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sprinkles i, .m-blink, .mochi.squish .m-body, .beta-banner:hover .m-body, .pz-star.got, .pz-msg, .quest-win,
  .pz-tile.bump, .pz-tile.hit, .pz-hearts .pop, .pz-board.won .pz-pic { animation: none !important; }
  .pz-tile.gone { transition: none; }
  .m-eyes, .btn, .beta-banner, .shots img, .px-icon, .quest-bar span, .pz-fill, .pz-tile svg { transition: none; }
}
