/* Wunschpizza zum Selberbauen (wunschpizza.js, nur Demo) */

/* Einstieg in der Karte */
.wp-start{
  display:flex; align-items:center; gap:14px; width:100%; margin:0 0 14px; padding:12px 14px;
  border:0; border-radius:18px; cursor:pointer; text-align:left; font:inherit; color:#FFF4E6;
  background:radial-gradient(120% 140% at 0% 0%, #4A2A17 0%, #22170F 60%);
  box-shadow:0 6px 18px rgba(34,23,17,.25);
}
.wp-start-bild{ flex:0 0 auto; width:72px; height:72px; display:block; }
.wp-start-bild img{ width:100%; height:100%; display:block; animation:wpDreh 24s linear infinite; }
.wp-start-t{ flex:1; display:flex; flex-direction:column; gap:3px; }
.wp-start-t b{ font-size:17px; }
.wp-start-t span{ font-size:13px; line-height:1.35; color:#F3D9BD; }
.wp-start-go{ font-size:28px; line-height:1; color:#FF9A4D; }
.wp-mini{ background:#22170F; border-radius:16px; display:flex; align-items:center; justify-content:center; }
.wp-mini img{ width:92%; height:92%; object-fit:contain; }
@keyframes wpDreh{ to{ transform:rotate(360deg); } }

/* Blatt */
html.wp-offen, html.wp-offen body{ overflow:hidden; }
.wp-bg{
  position:fixed; inset:0; z-index:400; background:rgba(10,6,4,.55);
  display:flex; align-items:flex-end; justify-content:center; opacity:0; transition:opacity .25s;
}
.wp-bg.auf{ opacity:1; }
.wp-bg[hidden]{ display:none; }
.wp-blatt{
  width:100%; max-width:460px; max-height:100%; overflow-y:auto; box-sizing:border-box;
  background:linear-gradient(180deg, #2A1B12 0%, #1A110C 100%); color:#FFF4E6;
  border-radius:24px 24px 0 0; padding:14px 16px calc(14px + env(safe-area-inset-bottom));
  transform:translateY(40px); transition:transform .3s cubic-bezier(.2,.8,.2,1);
  font-family:inherit;
}
.wp-bg.auf .wp-blatt{ transform:none; }
@media (min-width:700px){ .wp-bg{ align-items:center; } .wp-blatt{ border-radius:24px; max-height:94vh; } }

.wp-kopf{ display:flex; align-items:center; justify-content:space-between; }
.wp-kopf h3{ margin:0; font-size:22px; font-weight:800; letter-spacing:-.01em; }
.wp-kopf em{ font-style:italic; color:#FF8A3D; font-family:Georgia, serif; }
.wp-x{
  width:38px; height:38px; border-radius:50%; border:0; background:rgba(255,255,255,.12); color:#FFF4E6;
  font-size:24px; line-height:1; cursor:pointer;
}

/* Pizza */
.wp-buehne{ position:relative; display:flex; justify-content:center; padding:6px 0 0; }
.wp-pizza{ position:relative; z-index:1; width:min(64vw, 34vh, 250px); aspect-ratio:1; border-radius:50%; transition:transform .2s, box-shadow .2s; }
.wp-boden{ position:absolute; inset:0; width:100%; height:100%; display:block; user-select:none; -webkit-user-drag:none; }
.wp-belag, .wp-lage{ position:absolute; inset:0; }
.wp-st{
  position:absolute; height:auto; aspect-ratio:1; transform:translate(-50%,-50%) rotate(var(--r)); pointer-events:none; user-select:none;
  animation:wpFall .5s cubic-bezier(.3,1.35,.5,1) var(--d) both;
}
.wp-pizza.hops{ animation:wpHops .35s ease-out; }
.wp-pizza.ziel{ box-shadow:0 0 0 3px rgba(255,138,61,.35); }
.wp-pizza.drueber{ transform:scale(1.04); box-shadow:0 0 0 5px #FF8A3D, 0 0 30px rgba(255,138,61,.6); }
@keyframes wpHops{ 40%{ transform:scale(1.035); } }
@keyframes wpFall{ from{ transform:translate(-50%,-110%) rotate(calc(var(--r) - 40deg)) scale(1.8); opacity:0; } 45%{ opacity:1; } to{ transform:translate(-50%,-50%) rotate(var(--r)); opacity:1; } }
.weg .wp-st{ animation:wpWeg .25s ease-in both; }
@keyframes wpWeg{ from{ transform:translate(-50%,-50%) rotate(var(--r)); } to{ transform:translate(-50%,-50%) rotate(var(--r)) scale(0); opacity:0; } }

/* Ofen: Glut und Flammen */
.wp-glut{
  position:absolute; left:50%; top:50%; width:min(80vw, 44vh, 320px); aspect-ratio:1; border-radius:50%;
  transform:translate(-50%,-46%) scale(.6); opacity:0; pointer-events:none;
  background:radial-gradient(circle, rgba(255,190,80,.9) 0%, rgba(255,90,20,.55) 40%, rgba(160,30,0,0) 70%);
  transition:opacity .4s, transform .6s;
}
.wp-flammen{ position:absolute; inset:0; pointer-events:none; z-index:2; overflow:hidden; }
.wp-flammen span{
  position:absolute; bottom:-10px; width:26px; height:46px; border-radius:50% 50% 45% 45% / 65% 65% 35% 35%;
  background:radial-gradient(ellipse at 50% 80%, #FFF2A8 0%, #FFB13B 35%, #FF5A1F 65%, rgba(255,60,0,0) 75%);
  opacity:0; transform:scale(var(--s)); filter:blur(.5px);
}
.ofen .wp-glut{ opacity:1; transform:translate(-50%,-46%) scale(1); animation:wpGlut .5s ease-in-out infinite alternate; }
.ofen .wp-flammen span{ animation:wpFlamme 1.1s ease-out var(--v) infinite; }
.ofen .wp-pizza{ animation:wpBacken 2.1s ease-in forwards; }
.fertig .wp-glut{ opacity:0; animation:none; }
.fertig .wp-flammen span{ animation:none; opacity:0; }
@keyframes wpGlut{ to{ opacity:.75; } }
@keyframes wpFlamme{
  0%{ opacity:0; transform:translateY(0) scale(var(--s)); }
  20%{ opacity:.95; }
  100%{ opacity:0; transform:translateY(-190px) scale(calc(var(--s) * .3)); }
}
@keyframes wpBacken{ 0%{ filter:none; } 60%{ filter:brightness(1.12) saturate(1.2); transform:scale(1.03); } 100%{ filter:brightness(.97) saturate(1.15) sepia(.12); transform:scale(1); } }

.wp-tipp{ text-align:center; margin:10px 0 8px; min-height:20px; font-size:14px; color:#F3D9BD; }

/* Groessen */
.wp-groessen{ display:flex; gap:8px; justify-content:center; margin-bottom:10px; }
.wp-groessen button{
  flex:1; max-width:120px; border:1.5px solid rgba(255,244,230,.22); background:transparent; color:#FFF4E6;
  border-radius:14px; padding:7px 6px; font:inherit; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:1px;
}
.wp-groessen b{ font-size:14px; }
.wp-groessen small{ font-size:12px; color:#E8C9A8; }
.wp-groessen .an{ border-color:#FF8A3D; background:rgba(255,138,61,.16); }

/* Zutaten: zwei Reihen, waagrecht wischen; nach oben ziehen = auf die Pizza */
.wp-zutaten{
  display:grid; grid-template-rows:repeat(2, auto); grid-auto-flow:column; grid-auto-columns:94px; gap:8px;
  overflow-x:auto; padding:2px 2px 8px; margin:0 -16px; padding-left:16px; padding-right:16px;
  scrollbar-width:none;
}
.wp-zutaten::-webkit-scrollbar{ display:none; }
.wp-z{
  touch-action:pan-x; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
  display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 4px 7px;
  border:1.5px solid rgba(255,244,230,.14); border-radius:16px; background:rgba(255,255,255,.06); color:#FFF4E6;
  font:inherit; cursor:grab; position:relative; transition:transform .15s, background .15s, border-color .15s;
}
.wp-z:active{ transform:scale(.95); }
.wp-z-bild{
  width:46px; height:46px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.14), rgba(255,255,255,.04)); display:flex; align-items:center; justify-content:center;
}
.wp-z-bild img{ width:44px; height:44px; pointer-events:none; -webkit-user-drag:none; }
.wp-z-n{ font-size:11.5px; max-width:100%; overflow:hidden; text-overflow:ellipsis; font-weight:700; line-height:1.15; text-align:center; }
.wp-z small{ font-size:11px; color:#E8C9A8; }
.wp-z.an{ border-color:#FF8A3D; background:rgba(255,138,61,.18); }
.wp-z.an small{ color:#FFB27A; font-weight:700; }
.wp-z:disabled{ opacity:.35; cursor:not-allowed; }
.wp-geist{
  position:fixed; left:0; top:0; z-index:500; pointer-events:none; width:64px; height:64px;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.45));
}

/* Fuss */
.wp-fuss{ display:flex; align-items:center; gap:12px; margin-top:6px; }
.wp-summe{ display:flex; flex-direction:column; min-width:96px; }
.wp-summe small{ font-size:12px; color:#E8C9A8; }
.wp-summe b{ font-size:20px; font-variant-numeric:tabular-nums; }
.wp-summe b.hops{ animation:wpHops .3s ease-out; }
.wp-ofen{
  flex:1; border:0; border-radius:999px; padding:15px 18px; font:inherit; font-size:16.5px; font-weight:800; color:#fff; cursor:pointer;
  background:linear-gradient(90deg, #FF7A2F, #E8361F); box-shadow:0 8px 22px rgba(232,54,31,.4);
}
.wp-ofen:disabled{ cursor:default; opacity:.92; }
.fertig .wp-ofen{ background:linear-gradient(90deg, #3DAA5C, #2E8B4A); box-shadow:none; }

@media (prefers-reduced-motion: reduce){
  .wp-start-bild svg, .wp-st, .ofen .wp-flammen span, .ofen .wp-pizza, .ofen .wp-glut{ animation:none !important; }
}
