@font-face { font-family: 'Baloo 2'; src: url('../fonts/baloo2-latin.woff2') format('woff2'); font-weight: 400 800; font-display: block; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #7cc4ff; font-family: 'Baloo 2', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; color: #fff; }
#ui button { font-family: inherit; pointer-events: auto; cursor: pointer; border: 0; }
.hidden { display: none !important; }

/* BOOT:START – Ladebildschirm, generiert von tools/bootgen.js (dort ändern, nicht hier).
   Alles Bewegte animiert nur transform/opacity eigener HTML-Elemente → läuft im Compositor weiter, auch wenn der
   Hauptthread beim Laden blockiert. Die Säule (.bd-col), das Bohrloch (.bd-shaft) und der Balken (.bd-fill, .bd-knob)
   bewegt js/boot.js per Web Animations; bis das Skript da ist, kriechen sie per CSS (bd-pre*) schon ein Stück. */
#boot { position: fixed; inset: 0; z-index: 50; overflow: hidden; contain: strict; background: #5aaef2; transition: opacity .45s ease; --deb: #6b4226; --deb2: #9a6640; }
#boot.done { opacity: 0; }
#boot.win, #boot.done { pointer-events: none; } /* bei 100 % schon durchklickbar: der erste Klick gräbt */
#boot[data-s=clay] { --deb: #a95f2c; --deb2: #d6914f; }
#boot[data-s=stone] { --deb: #6f7884; --deb2: #a9b2bf; }
#boot[data-s=coal] { --deb: #1d2028; --deb2: #555d74; }
#boot[data-s=gem] { --deb: #2c3058; --deb2: #7ee6ff; }
.bd-col { position: absolute; left: 0; top: 0; width: 100%; height: 340vh; overflow: hidden; transform: translateY(0); will-change: transform; animation: bd-pre0 5s cubic-bezier(.2,.6,.3,1) .3s both;
  background: linear-gradient(#4aa6f2 0, #cdeeff 47vh, #6fd046 47vh, #6fd046 52vh, #7a4a2a 52vh, #7a4a2a 90vh, #b46a36 90vh, #b46a36 126vh, #7d8794 126vh, #7d8794 170vh, #333845 170vh, #333845 218vh, #20233f 218vh); }
@keyframes bd-pre0 { to { transform: translateY(-9.2vh); } }
@keyframes bd-pre1 { to { transform: scaleY(.04); } }
@keyframes bd-pre2 { to { transform: translateX(-96%); } }
.bd-earth { position: absolute; left: 50%; top: 0; width: 400vh; height: 340vh; margin-left: -200vh; display: block; }
.bd-earth .eh { fill: none; stroke-opacity: .55; stroke-width: 2.2; stroke-linecap: round; }
.bd-earth .ck { fill: #0b0c10; stroke: #0b0c10; stroke-width: 6; stroke-linejoin: round; }
.bd-shaft { position: absolute; left: 50%; top: 52vh; width: 12.4vh; height: 230vh; margin-left: -6.2vh; transform: scaleY(0); transform-origin: 50% 0; will-change: transform; animation: bd-pre1 5s cubic-bezier(.2,.6,.3,1) .3s both;
  background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(16,11,8,.66) 15%, rgba(16,11,8,.58) 50%, rgba(16,11,8,.66) 85%, rgba(0,0,0,.85)); box-shadow: inset 3px 0 0 rgba(255,255,255,.1), inset -3px 0 0 rgba(255,255,255,.1); }
.bd-cave { position: absolute; left: 50%; top: 302.0vh; width: 0; height: 0; }
.bd-glow { position: absolute; left: -32vh; top: -32vh; width: 64vh; height: 64vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(200,248,255,.8), rgba(90,185,255,.3) 40%, rgba(60,140,255,0)); animation: bd-pulse 2.4s ease-in-out infinite; }
@keyframes bd-pulse { 50% { transform: scale(1.12); opacity: .8; } }
.bd-raysw { position: absolute; left: -45vh; top: -45vh; width: 90vh; height: 90vh; }
.bd-rays { width: 100%; height: 100%; border-radius: 50%; background: repeating-conic-gradient(rgba(205,246,255,.34) 0deg 6deg, rgba(205,246,255,0) 6deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 16%, rgba(0,0,0,0)); mask: radial-gradient(closest-side, #000 16%, rgba(0,0,0,0)); animation: bd-turn 24s linear infinite; }
@keyframes bd-turn { to { transform: rotate(360deg); } }
.bd-gemw { position: absolute; left: -11.5vh; top: -11vh; width: 23vh; height: 20.5vh; }
.bd-gem { display: block; width: 100%; height: 100%; overflow: visible; animation: bd-bob 2.6s ease-in-out infinite; }
@keyframes bd-bob { 50% { transform: translateY(-1vh); } }
.bd-tw { position: absolute; width: 3vh; height: 3vh; margin: -1.5vh 0 0 -1.5vh; background: #fff; transform: scale(0); pointer-events: none;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); animation: bd-tw 2.3s ease-in-out infinite; }
@keyframes bd-tw { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 45% { transform: scale(1) rotate(45deg); opacity: 1; } 62% { transform: scale(.6) rotate(60deg); opacity: .7; } }
.bd-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 90% 85% at 50% 50%, rgba(0,0,0,0) 58%, rgba(4,6,18,.4) 100%); }
/* Bohrer: Spitze genau auf 52 vh, Gewinde dreht sich (schräge Streifen wandern), alles zittert leicht */
.bd-drill { position: absolute; left: 50%; top: 52vh; width: 14vh; height: 27.5vh; margin: -27.5vh 0 0 -7vh; }
.bd-shake { position: absolute; inset: 0; animation: bd-shake .16s linear infinite; }
@keyframes bd-shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(.14vh, -.1vh); } 50% { transform: translate(-.1vh, .06vh); } 75% { transform: translate(.08vh, .1vh); } }
.bd-body { position: absolute; left: 0; top: 0; width: 14vh; height: 16.5vh; overflow: visible; }
.bd-bito { position: absolute; left: 50%; top: 16vh; width: 10.2vh; height: 11.5vh; margin-left: -5.1vh; background: #262a34; clip-path: polygon(0 0, 100% 0, 57% 93%, 50% 100%, 43% 93%); }
.bd-bit { position: absolute; left: .32vh; right: .32vh; top: 0; bottom: .45vh; overflow: hidden; clip-path: polygon(0 0, 100% 0, 57% 93%, 50% 100%, 43% 93%);
  background: linear-gradient(90deg, #4c5464, #aeb8c6 26%, #eef3f9 40%, #9aa5b5 62%, #3e4452); }
.bd-bit i { position: absolute; left: -30%; right: -30%; top: -4vh; bottom: -4vh; transform: skewY(-26deg); animation: bd-screw .2s linear infinite;
  background: repeating-linear-gradient(rgba(255,255,255,0) 0 3px, rgba(16,20,30,.5) 3px 8px, rgba(255,255,255,.55) 8px 10px, rgba(255,255,255,0) 10px 14px); }
@keyframes bd-screw { from { transform: skewY(-26deg) translateY(0); } to { transform: skewY(-26deg) translateY(14px); } }
.bd-bit b { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,0) 30%, rgba(255,255,255,.16) 42%, rgba(0,0,0,0) 58%, rgba(0,0,0,.55)); }
.bd-beacon { position: absolute; left: 50%; top: .05vh; width: 1.5vh; height: 1.5vh; margin-left: -.75vh; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff 0 16%, #ff6a4a 42%, #d42a1a 100%);
  box-shadow: 0 0 1.4vh .4vh rgba(255,80,50,.75); animation: bd-blink .9s steps(1) infinite; }
@keyframes bd-blink { 50% { opacity: .2; } }
.bd-dust { position: absolute; left: 50%; bottom: -2.2vh; width: 16vh; height: 5vh; margin-left: -8vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,238,205,.5), rgba(255,222,170,0)); animation: bd-dust .28s ease-in-out infinite alternate; }
@keyframes bd-dust { to { transform: scale(1.2, 1.35); opacity: .65; } }
.bd-deb, .bd-spk { position: absolute; left: 50%; top: 52vh; width: 0; height: 0; transition: opacity .25s; }
.bd-deb i { position: absolute; left: 0; top: 0; border-radius: 24%; background: var(--deb); opacity: 0; box-shadow: inset -.2vh -.2vh 0 rgba(0,0,0,.25); }
.bd-deb i.b { background: var(--deb2); }
.bd-spk { opacity: 0; }
#boot[data-s=stone] .bd-spk, #boot[data-s=coal] .bd-spk, #boot[data-s=gem] .bd-spk { opacity: 1; }
.bd-spk i { position: absolute; left: 0; top: 0; width: .36vh; height: 1.7vh; margin: -.85vh 0 0 -.18vh; border-radius: 1vh; background: #ffe58a; box-shadow: 0 0 .8vh #ffb800; opacity: 0; }
@keyframes bd-d0{0%{transform:translate(-2.75vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-5.11vh,-6.74vh) rotate(-208deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-7.03vh,0.33vh) rotate(-417deg) scale(.85);opacity:0}}@keyframes bd-d1{0%{transform:translate(0.86vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(5.82vh,-5.50vh) rotate(258deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(9.88vh,0.45vh) rotate(516deg) scale(.85);opacity:0}}@keyframes bd-d2{0%{transform:translate(-1.52vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-5.93vh,-10.61vh) rotate(-226deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-9.54vh,-0.06vh) rotate(-453deg) scale(.85);opacity:0}}@keyframes bd-d3{0%{transform:translate(0.67vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(3.00vh,-7.88vh) rotate(190deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(4.90vh,0.21vh) rotate(379deg) scale(.85);opacity:0}}@keyframes bd-d4{0%{transform:translate(-2.35vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-5.21vh,-10.16vh) rotate(-152deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-7.55vh,-0.02vh) rotate(-304deg) scale(.85);opacity:0}}@keyframes bd-d5{0%{transform:translate(2.28vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(7.09vh,-4.18vh) rotate(123deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(11.02vh,0.58vh) rotate(245deg) scale(.85);opacity:0}}@keyframes bd-d6{0%{transform:translate(-2.15vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-5.76vh,-4.69vh) rotate(-195deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-8.71vh,0.53vh) rotate(-390deg) scale(.85);opacity:0}}@keyframes bd-d7{0%{transform:translate(1.91vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(5.11vh,-5.73vh) rotate(108deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(7.72vh,0.43vh) rotate(216deg) scale(.85);opacity:0}}@keyframes bd-d8{0%{transform:translate(-1.16vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-4.24vh,-4.12vh) rotate(-251deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-6.76vh,0.59vh) rotate(-502deg) scale(.85);opacity:0}}@keyframes bd-d9{0%{transform:translate(2.50vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(5.49vh,-4.10vh) rotate(162deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(7.93vh,0.59vh) rotate(323deg) scale(.85);opacity:0}}@keyframes bd-d10{0%{transform:translate(-2.49vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-4.44vh,-10.20vh) rotate(-276deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-6.05vh,-0.02vh) rotate(-553deg) scale(.85);opacity:0}}@keyframes bd-d11{0%{transform:translate(1.24vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(4.71vh,-8.27vh) rotate(273deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(7.55vh,0.17vh) rotate(546deg) scale(.85);opacity:0}}@keyframes bd-d12{0%{transform:translate(-2.08vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(-5.56vh,-4.71vh) rotate(-118deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(-8.41vh,0.53vh) rotate(-237deg) scale(.85);opacity:0}}@keyframes bd-d13{0%{transform:translate(1.10vh,-.6vh) rotate(0) scale(.4);opacity:0;animation-timing-function:cubic-bezier(.2,.7,.4,1)}12%{opacity:1}48%{transform:translate(4.82vh,-4.87vh) rotate(238deg) scale(1);animation-timing-function:cubic-bezier(.5,0,.8,.5)}85%{opacity:1}100%{transform:translate(7.87vh,0.51vh) rotate(476deg) scale(.85);opacity:0}}@keyframes bd-s0{0%{transform:rotate(54deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(54deg) translateY(-7.14vh) scaleY(1);opacity:0}}@keyframes bd-s1{0%{transform:rotate(2deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(2deg) translateY(-8.09vh) scaleY(1);opacity:0}}@keyframes bd-s2{0%{transform:rotate(-59deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(-59deg) translateY(-8.05vh) scaleY(1);opacity:0}}@keyframes bd-s3{0%{transform:rotate(50deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(50deg) translateY(-5.99vh) scaleY(1);opacity:0}}@keyframes bd-s4{0%{transform:rotate(-32deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(-32deg) translateY(-5.97vh) scaleY(1);opacity:0}}@keyframes bd-s5{0%{transform:rotate(61deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(61deg) translateY(-5.49vh) scaleY(1);opacity:0}}@keyframes bd-s6{0%{transform:rotate(-4deg) translateY(-.6vh) scaleY(.5);opacity:1}100%{transform:rotate(-4deg) translateY(-7.15vh) scaleY(1);opacity:0}}
/* Logo wie auf dem Cover: „FIND THE“ weiß, „DIAM◆ND“ eisblau mit Diamant als O */
.bd-logo { position: absolute; left: 0; right: 0; top: max(3vh, 10px); text-align: center; font-weight: 800; line-height: .86; pointer-events: none; animation: bd-logo .7s cubic-bezier(.3,1.5,.55,1) both; }
@keyframes bd-logo { from { transform: translateY(-3vh) scale(.88); opacity: 0; } }
.bd-l1 { font-size: min(6.6vh, 9.4vw); color: #fff; letter-spacing: .02em; text-shadow: 0 .06em 0 #233457, 0 .1em 0 #182544, 0 .16em .22em rgba(8,16,40,.4); }
.bd-l2w { position: relative; display: inline-block; }
.bd-l2 { display: flex; align-items: center; font-size: min(14vh, 19vw); letter-spacing: .005em; padding: 0 .06em .04em;
  background: linear-gradient(#f4fdff 0%, #c6f1ff 36%, #74ccff 52%, #3a98ec 74%, #2066cc 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 .045em 0 #154aa0) drop-shadow(0 .085em 0 #0d2f6e) drop-shadow(0 .13em .12em rgba(6,16,44,.45)); }
.bd-o { width: .8em; height: .72em; margin: 0 .01em; overflow: visible; transform: translateY(.02em); flex: none; }
.bd-l2w .bd-tw { left: 66%; top: 24%; width: 4.5vh; height: 4.5vh; margin: -2.25vh 0 0 -2.25vh; animation-delay: -.8s; }
/* Ladebalken mit Diamant-Knopf an der Spitze */
.bd-ui { position: absolute; left: 50%; bottom: max(3.6vh, 14px); width: min(440px, 84vw); margin-left: max(-220px, -42vw); animation: bd-fade .5s .25s both; }
@keyframes bd-fade { from { opacity: 0; } }
.bd-bar { position: relative; height: 20px; }
.bd-track { position: absolute; inset: 0; border-radius: 99px; overflow: hidden; background: rgba(9,12,26,.8); box-shadow: 0 0 0 3px #fff, 0 5px 0 3px rgba(12,24,60,.5), inset 0 3px 5px rgba(0,0,0,.6); }
.bd-fill { position: absolute; inset: 0; border-radius: 99px; overflow: hidden; transform: translateX(-100%); will-change: transform; animation: bd-pre2 5s cubic-bezier(.2,.6,.3,1) .3s both;
  background: linear-gradient(#cff8ff, #6dd0ff 42%, #2f93f0 58%, #2168d6); }
.bd-fill::before { content: ''; position: absolute; top: 0; bottom: 0; left: -24px; right: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.3) 0 8px, rgba(255,255,255,0) 8px 16px); animation: bd-stripe .6s linear infinite; }
@keyframes bd-stripe { to { transform: translateX(22.63px); } }
.bd-fill::after { content: ''; position: absolute; left: 8px; right: 10px; top: 3px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.6); }
.bd-knob { position: absolute; inset: 0; transform: translateX(-100%); will-change: transform; animation: bd-pre2 5s cubic-bezier(.2,.6,.3,1) .3s both; pointer-events: none; }
.bd-knob svg { position: absolute; right: -18px; top: -12px; width: 38px; height: 36px; overflow: visible; filter: drop-shadow(0 2px 0 #0d2f6e) drop-shadow(0 0 6px rgba(140,220,255,.9)); animation: bd-kn 1.2s ease-in-out infinite; }
@keyframes bd-kn { 50% { transform: scale(1.14) rotate(-7deg); } }
.bd-txt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 13px; padding: 0 4px; font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 2px 0 #14213f, 0 0 6px rgba(0,0,0,.55); }
.bd-txt b { font-size: 20px; color: #ffe066; }
/* Fund: Bohrer saust nach oben weg, Diamant springt, Licht flutet */
.bd-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 72%, #fff 0, rgba(215,247,255,.85) 16%, rgba(140,215,255,.35) 40%, rgba(255,255,255,0) 70%); }
#boot.win .bd-flash { animation: bd-flash .9s .26s ease-out both; }
@keyframes bd-flash { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
#boot.win .bd-drill { animation: bd-up .55s .18s cubic-bezier(.55,0,.75,.3) forwards; }
@keyframes bd-up { to { transform: translateY(-75vh) rotate(-8deg); opacity: 0; } }
#boot.win .bd-deb, #boot.win .bd-spk { opacity: 0; }
#boot.win .bd-gemw { animation: bd-pop .7s .26s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes bd-pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1.15); } }
#boot.win .bd-raysw { animation: bd-rw .9s .26s ease-out both; }
@keyframes bd-rw { from { transform: scale(.8); } to { transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .bd-shake, .bd-bit i, .bd-deb i, .bd-spk i, .bd-tw, .bd-rays, .bd-gem, .bd-glow, .bd-knob svg, .bd-fill::before, .bd-beacon, .bd-dust { animation: none; } }
/* BOOT:END */

/* Vorspann */
#intro { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#intro .lb { position: absolute; left: 0; right: 0; height: 0; background: #05070d; transition: height .7s cubic-bezier(.3,.8,.3,1); }
#intro .lb.top { top: 0; } #intro .lb.bot { bottom: 0; }
#intro.on .lb { height: 10.5vh; }
#intro.out .lb { height: 0; transition-duration: .5s; }
#intro .skip { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(10.5vh + 14px); display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 14px 0 18px; border: 0; border-radius: 14px; font-family: inherit; font-size: 19px; font-weight: 800; letter-spacing: 1px; color: #fff; cursor: pointer; pointer-events: auto;
  background: rgba(12,16,30,.62); box-shadow: 0 0 0 2px rgba(255,255,255,.28), 0 4px 12px rgba(0,0,0,.3); text-shadow: 0 2px 0 rgba(0,0,0,.4); opacity: 0; transition: opacity .4s, transform .1s; }
#intro .skip i { width: 0; height: 0; border-left: 9px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
#intro .skip i:first-of-type { margin-left: 8px; }
#intro .skip:hover { background: rgba(30,40,70,.75); }
#intro .skip:active { transform: scale(.95); }
#intro .skip.show { opacity: 1; }
#intro.out .skip { opacity: 0; }
#intro .bubble { position: absolute; transform: translate(-50%, -100%) scale(0); transform-origin: 50% 120%; background: #fff; color: #2a2d3a; font-size: min(34px, 7vw); font-weight: 800; padding: 6px 22px 4px; border-radius: 26px; box-shadow: 0 6px 0 rgba(0,0,0,.18), 0 10px 24px rgba(0,0,0,.3); white-space: nowrap; transition: transform .25s cubic-bezier(.3,1.6,.6,1); }
#intro .bubble::after { content: ''; position: absolute; left: 50%; bottom: -14px; margin-left: -12px; border: 12px solid transparent; border-top: 16px solid #fff; border-bottom: 0; }
#intro .bubble.show { transform: translate(-50%, -100%) scale(1) rotate(-3deg); }

/* ---------------- HUD */
.hud-left { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
/* Upgrades-Knopf: Symbol-Kachel + Schrift, kleine U-Taste; erscheint nach dem Schaufelkauf */
#ui .upg-btn { position: relative; display: flex; align-items: center; gap: 9px; height: 56px; padding: 0 18px 0 8px; margin-bottom: 6px; border-radius: 19px; color: #fff;
  background: linear-gradient(180deg, #84fb9b 0%, #42d968 45%, #26bb4f 55%, #1fa845 100%); border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 5px 0 #127a30, 0 9px 16px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(0,0,0,.07); transition: transform .1s; }
.upg-btn .ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(#1c9a41, #158236); box-shadow: inset 0 2px 4px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.5); }
.upg-btn .ic svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 rgba(0,50,15,.45)); }
.upg-btn span { font-size: 20px; font-weight: 800; letter-spacing: .7px; line-height: 1; padding-top: 3px; text-shadow: 0 2px 0 rgba(0,90,30,.55); }
.upg-btn kbd { position: absolute; right: -8px; bottom: -10px; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 7px; background: #fff; color: #23262e; font: 800 14px/20px 'Baloo 2', system-ui, sans-serif; text-align: center; border: 2px solid #23262e; box-shadow: 0 2px 0 #23262e; }
body.touch .upg-btn kbd { display: none; }
#ui .upg-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #127a30, inset 0 2px 0 rgba(255,255,255,.55); }
.upg-btn.pop { animation: upgpop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes upgpop { from { transform: scale(.3); opacity: 0; } }
/* bis zum ersten gekauften Upgrade: weißer Rand glüht, Ring läuft nach außen */
#ui .upg-btn.attn { animation: upgattn 1.2s ease-in-out infinite; }
#ui .upg-btn.attn.pop { animation: upgpop .55s cubic-bezier(.3,1.6,.5,1), upgattn 1.2s .55s ease-in-out infinite; }
.upg-btn.attn::after { content: ''; position: absolute; inset: -5px; border-radius: 23px; border: 3px solid #fff; animation: upgring 1.2s ease-out infinite; pointer-events: none; }
@keyframes upgattn { 0%, 100% { box-shadow: 0 5px 0 #127a30, 0 0 0 3px #fff, 0 0 14px 3px rgba(255,255,255,.5), inset 0 2px 0 rgba(255,255,255,.55); }
  50% { box-shadow: 0 5px 0 #127a30, 0 0 0 3px #fff, 0 0 30px 10px rgba(255,255,255,.9), inset 0 2px 0 rgba(255,255,255,.55); } }
@keyframes upgring { from { transform: scale(1); opacity: .95; } to { transform: scale(1.18, 1.5); opacity: 0; } }
.badge { position: absolute; top: -7px; right: -7px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #ff3b4e; color: #fff; font-size: 16px; font-weight: 800; line-height: 26px; text-align: center; box-shadow: 0 2px 0 #b8122a; border: 2px solid #fff; }
.badge.zero { display: none; }
.pill { position: relative; display: flex; align-items: center; height: 42px; padding: 0 16px 0 50px; min-width: 132px; border-radius: 21px;
  background: linear-gradient(rgba(28,34,60,.78), rgba(16,20,38,.78)); box-shadow: 0 3px 10px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 23px; font-weight: 800; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.pill img { position: absolute; left: -6px; top: 50%; width: 52px; height: 52px; transform: translateY(-50%); filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.pill .fill { position: absolute; left: 44px; right: 12px; bottom: 5px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.pill .fill i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8f9bb5, #e8eefc); border-radius: 2px; transition: width .15s; }
.pill.full { animation: fullpulse .7s ease-in-out infinite; }
.pill.full span { color: #ff6b6b; }
.pill.full .fill i { background: #ff5a5a; }
@keyframes fullpulse { 50% { transform: scale(1.06); } }
.pill.bump { animation: bump .25s ease-out; }
@keyframes bump { 40% { transform: scale(1.12); } }
.pill.gem span { color: #ffd1f1; }
.pill.coin span { color: #fff1b8; }

.hud-top { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pilebar { position: relative; width: 300px; height: 44px; border-radius: 14px; background: linear-gradient(rgba(28,34,60,.8), rgba(16,20,38,.8)); box-shadow: 0 3px 10px rgba(0,0,0,.18); padding: 3px 12px 0 46px; }
.pilebar img { position: absolute; left: 2px; top: -6px; width: 46px; height: 46px; }
.pilebar .lbl { font-size: 14px; font-weight: 800; letter-spacing: 1px; color: #cfd6ea; }
.pilebar b { position: absolute; right: 12px; top: 2px; font-size: 16px; color: #ffe066; }
.pilebar .bar { height: 10px; margin-top: -2px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.pilebar .bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #ffb33a, #ffe066); box-shadow: 0 0 8px rgba(255,210,80,.6); transition: width .3s; }
.round-tag { font-size: 13px; font-weight: 800; color: #fff; background: rgba(255,120,40,.95); border-radius: 9px; padding: 0 9px; position: absolute; left: 50%; transform: translateX(-50%); bottom: -13px; box-shadow: 0 2px 0 #b8501a; }

#toasts { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; }
.toast { font-size: 22px; font-weight: 800; color: #7dff8c; letter-spacing: .3px; text-shadow: 0 2px 0 rgba(8,40,16,.8), 0 0 8px rgba(0,0,0,.35); animation: toastin .25s ease-out; white-space: nowrap; }
.toast.red { color: #ff7070; text-shadow: 0 2px 0 rgba(60,8,8,.8), 0 0 8px rgba(0,0,0,.35); }
.toast.gold { color: #ffe066; text-shadow: 0 2px 0 rgba(70,42,0,.8), 0 0 8px rgba(0,0,0,.35); font-size: 26px; }
/* Aufgabe oben (wie „KAUFE EINE HEUGABEL · $10“ im Vorbild) */
#objective { font-size: 25px; font-weight: 800; color: #ffe066; letter-spacing: .5px; text-transform: uppercase; text-align: center; margin-top: 22px; text-shadow: 0 2px 0 rgba(70,42,0,.85), 0 0 10px rgba(0,0,0,.35); white-space: nowrap; animation: toastin .3s ease-out; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all .4s; }
@keyframes toastin { from { opacity: 0; transform: scale(.7); } }

.hud-right { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.round-btn { width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(rgba(28,34,60,.78), rgba(16,20,38,.78)); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.round-btn svg { width: 28px; height: 28px; fill: #fff; }
/* Taste P am Zahnrad (wie U am Upgrades-Knopf) */
#b-set { position: relative; }
#b-set kbd { position: absolute; left: -9px; bottom: -9px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; background: #fff; color: #23262e; font: 800 13px/19px 'Baloo 2', system-ui, sans-serif; text-align: center; border: 2px solid #23262e; box-shadow: 0 2px 0 #23262e; }
body.touch #b-set kbd { display: none; }

/* Rucksack ohne Grenze (Belohnungs-Video): Restzeit rechts neben der Kohle-Anzeige, Balken läuft violett ab */
.pill.inf .fill i { background: linear-gradient(90deg, #8f7bff, #c7b8ff); transition: width .5s linear; }
.pill .unl { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 7px; border-radius: 15px;
  background: linear-gradient(#8f7bff, #5a4fe8); box-shadow: 0 3px 0 #3a2fb0, 0 3px 10px rgba(0,0,0,.2); font-size: 18px; font-weight: 800; color: #fff; white-space: nowrap; text-shadow: 0 2px 0 rgba(30,20,120,.5); }
.pill .unl .clk { position: relative; width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid #fff; flex: none; }
.pill .unl .clk::before, .pill .unl .clk::after { content: ''; position: absolute; left: 50%; top: 50%; width: 2.5px; margin-left: -1.25px; background: #fff; border-radius: 2px; transform-origin: 50% 0; }
.pill .unl .clk::before { height: 5px; transform: rotate(180deg); }
.pill .unl .clk::after { height: 4px; transform: rotate(-90deg); animation: clk 4s linear infinite; }
@keyframes clk { to { transform: rotate(270deg); } }
.pill .unl.low { animation: unllow .6s ease-in-out infinite; background: linear-gradient(#ff7a8a, #e83a55); box-shadow: 0 3px 0 #a81f35; }
@keyframes unllow { 50% { transform: translateY(-50%) scale(1.08); } }

#cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#cross i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.45); }
#cross b { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.95); box-shadow: 0 0 0 1.5px rgba(0,0,0,.3), inset 0 0 0 1.5px rgba(0,0,0,.25); opacity: 0; transform: scale(.6); transition: all .12s; }
#cross.on b { opacity: 1; transform: scale(1); }
#cross.far b { opacity: .45; transform: scale(.8); border-style: dashed; }
#cross.gem b { border-color: #ff7ad9; }
#cross.dia b { border-color: #8ff3ff; transform: scale(1.25); }
#cross.pulse b { animation: cpulse .18s ease-out; }
@keyframes cpulse { 50% { transform: scale(1.35); } }

/* Bedien-Hinweis: schlichter weißer Text ohne Kasten, Maus- und Tastensymbol */
#hint { position: absolute; left: 50%; top: 70%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 8px rgba(0,0,0,.35); }
#hint img { width: 34px; height: 34px; }
#hint .sep { font-weight: 700; opacity: .9; }
#hint .key { display: inline-block; min-width: 30px; height: 30px; line-height: 27px; padding: 0 6px; border-radius: 7px; background: #fff; color: #23262e; font-size: 17px; text-align: center; border: 2px solid #23262e; box-shadow: 0 3px 0 #23262e; text-shadow: none; }
#hint .mouse { display: inline-block; width: 22px; height: 32px; border-radius: 11px; background: #fff; border: 2px solid #23262e; position: relative; box-shadow: 0 2px 0 rgba(0,0,0,.35); overflow: hidden; }
#hint .mouse::before { content: ''; position: absolute; left: 0; top: 0; width: 50%; height: 44%; background: #ff5a6e; border-right: 1.5px solid #23262e; border-bottom: 1.5px solid #23262e; }

#slots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 12px; align-items: flex-end; }
.slot { position: relative; width: 74px; height: 74px; border-radius: 20px; background: linear-gradient(rgba(28,34,60,.8), rgba(16,20,38,.8)); box-shadow: 0 3px 10px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.12); pointer-events: auto; overflow: hidden; }
.slot img { position: absolute; inset: 6px; width: 62px; height: 62px; }
.slot .cd { position: absolute; inset: 0; background: conic-gradient(rgba(0,0,0,.6) var(--p, 0%), transparent 0); }
.slot .k { position: absolute; right: 5px; bottom: 3px; font-size: 14px; font-weight: 800; color: #fff; background: rgba(0,0,0,.45); border-radius: 6px; padding: 0 5px; }
.slot .t { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 22px; font-weight: 800; text-shadow: 0 2px 0 #000; }
.slot.ready { box-shadow: 0 0 0 3px #ffd23f, 0 3px 10px rgba(0,0,0,.2); }
.slot.small { width: 58px; height: 58px; border-radius: 16px; }
.slot.small img { inset: 4px; width: 50px; height: 50px; }

#detector { position: absolute; right: 18px; bottom: 22px; width: 150px; padding: 8px 12px; border-radius: 16px; background: linear-gradient(rgba(28,34,60,.8), rgba(16,20,38,.8)); font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #cfe8ff; }
#detector .m { height: 12px; border-radius: 6px; margin-top: 4px; background: linear-gradient(90deg, #3aa7ff, #9b6bff 50%, #ff3b4e); position: relative; }
#detector .m i { position: absolute; top: -4px; width: 6px; height: 20px; border-radius: 3px; background: #fff; box-shadow: 0 0 6px #fff; transition: left .15s; }
/* noch kein Signal: Balken lädt mit dem Abtragen (--c), kein Zeiger */
#detector.idle { color: #8fa3bf; }
#detector.idle .m { background: rgba(255,255,255,.12); overflow: hidden; }
#detector.idle .m::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--c, 0%); border-radius: 6px; background: linear-gradient(90deg, #2c6fb0, #3aa7ff); transition: width .4s; }
#detector.idle .m i { display: none; }

/* fliegende Zahlen */
#floaters, #flycoins { position: absolute; inset: 0; overflow: hidden; }
.floater { position: absolute; display: flex; align-items: center; gap: 4px; font-size: 26px; font-weight: 800; color: #fff; transform: translate(-50%, -50%);
  text-shadow: 0 2px 0 rgba(0,0,0,.55), 1px 1px 0 rgba(0,0,0,.45), -1px -1px 0 rgba(0,0,0,.45); animation: floatup 0.9s ease-out forwards; white-space: nowrap; }
.floater img { width: 30px; height: 30px; }
.floater.coin { color: #ffe066; }
.floater.gem { color: #ff9ae4; font-size: 30px; }
.floater.big { font-size: 40px; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.flycoin { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; transition: transform .55s cubic-bezier(.5,-0.3,.7,1), opacity .55s; }

/* mobile Knöpfe */
#mob { position: absolute; inset: 0; }
.mbtn { position: absolute; border-radius: 50%; pointer-events: auto; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
#m-grab { right: 26px; bottom: 30px; width: 110px; height: 110px; background: radial-gradient(circle at 50% 35%, #ffb04a, #ff7a14); box-shadow: 0 6px 0 #c4520a, 0 8px 18px rgba(0,0,0,.25); font-size: 20px; flex-direction: column; }
#m-grab img { width: 56px; height: 56px; margin-bottom: -6px; }
#m-grab.on { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 #c4520a; }
#m-jump { right: 148px; bottom: 34px; width: 68px; height: 68px; background: rgba(28,34,60,.6); font-size: 13px; }
#m-jump svg { width: 34px; height: 34px; fill: #fff; }
/* Joystick links unten: durchsichtig, steht immer da (Gegenstück zum GRAB-Knopf); aktiv rückt die Basis unter den Finger
   (Transform aus ui.updateStick) und gleitet beim Loslassen zurück. Fängt keine Berührungen ab, die gehen ans Canvas. */
#stick { position: absolute; left: max(26px, calc(env(safe-area-inset-left) + 14px)); bottom: 30px; width: 124px; height: 124px; pointer-events: none; }
#stick .base { position: absolute; inset: 0; border-radius: 50%; opacity: .85; background: radial-gradient(circle, rgba(16,22,40,.10) 0 54%, rgba(16,22,40,.24) 56% 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.6), 0 4px 14px rgba(0,0,0,.16); transition: transform .24s cubic-bezier(.3,1.3,.5,1), opacity .2s; }
#stick.on .base { transition: opacity .2s; opacity: 1; }
#stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.78), rgba(255,255,255,.42)); box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.5); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
#stick.on i { transition: none; background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.95), rgba(255,255,255,.62)); }
#stick .ar { position: absolute; width: 0; height: 0; border: 7px solid transparent; opacity: .75; }
#stick .ar.u { left: 50%; top: 9px; margin-left: -7px; border-top-width: 0; border-bottom-color: #fff; }
#stick .ar.d { left: 50%; bottom: 9px; margin-left: -7px; border-bottom-width: 0; border-top-color: #fff; }
#stick .ar.l { top: 50%; left: 9px; margin-top: -7px; border-left-width: 0; border-right-color: #fff; }
#stick .ar.r { top: 50%; right: 9px; margin-top: -7px; border-right-width: 0; border-left-color: #fff; }
body.touch #slots { left: auto; right: 150px; transform: none; bottom: 120px; }
body.touch #hint { top: 64%; font-size: 17px; }

/* ---------------- Ladenschild: klein, rechts neben dem Fadenkreuz, nur beim Anschauen (blockiert nichts) */
/* Lage (left/top) und Seite (data-side r|b|t|l) setzt ui.placeCard(): neben das Fadenkreuz, ohne Bedienelemente zu
   verdecken; --tip = Lage der Spitze entlang der Kante, die zum Fadenkreuz zeigt */
#card { position: absolute; left: 0; top: 0; width: 318px; padding: 11px 12px 12px; border-radius: 20px; background: rgba(255,250,240,.96); color: #3b2a1a;
  box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.55); pointer-events: none; }
#card::before { content: ''; position: absolute; border: 10px solid transparent; }
#card[data-side="r"]::before { left: -10px; top: var(--tip, 50%); margin-top: -10px; border-left: 0; border-right-color: rgba(255,250,240,.96); }
#card[data-side="l"]::before { right: -10px; top: var(--tip, 50%); margin-top: -10px; border-right: 0; border-left-color: rgba(255,250,240,.96); }
#card[data-side="b"]::before { top: -10px; left: var(--tip, 50%); margin-left: -10px; border-top: 0; border-bottom-color: rgba(255,250,240,.96); }
#card[data-side="t"]::before { bottom: -10px; left: var(--tip, 50%); margin-left: -10px; border-bottom: 0; border-top-color: rgba(255,250,240,.96); }
#card.in { animation: cardpop .16s ease-out; }
@keyframes cardpop { from { opacity: 0; transform: scale(.96); } }
body.touch #card { pointer-events: auto; }
#card .c-top { display: flex; align-items: center; gap: 10px; }
#card .ic { flex-shrink: 0; width: 58px; height: 58px; border-radius: 15px; background: radial-gradient(circle at 50% 40%, #fff, #ffe8bd); display: flex; align-items: center; justify-content: center; }
#card .ic img { width: 54px; height: 54px; }
#card h3 { margin: 0; font-size: 23px; line-height: 1.05; }
#card p { margin: 6px 2px 0; font-size: 14px; color: #7a5c3e; line-height: 1.2; }
#card .stat { font-size: 15px; font-weight: 800; color: #1f9e3c; line-height: 1.2; }
#card .btns { display: flex; gap: 8px; margin-top: 10px; }
#card .btn { height: 44px; font-size: 19px; border-radius: 13px; gap: 4px; }
#card .btn img { width: 25px; height: 25px; }
#card .btn .key { order: -1; margin: 0 4px 0 0; }
#card .btn.ad { gap: 7px; }
#card .btn .two { display: flex; flex-direction: column; align-items: flex-start; font-size: 16px; line-height: 1; padding-top: 2px; }
#card .btn .two small { font-size: 12px; opacity: .85; }
.btn { flex: 1; height: 54px; border-radius: 16px; font-size: 22px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(#5cf07c, #22b44a); box-shadow: 0 5px 0 #138434, inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 rgba(0,80,20,.5); }
.btn img { width: 30px; height: 30px; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #138434; }
.btn.gem { background: linear-gradient(#c58bff, #8f4dff); box-shadow: 0 5px 0 #5f22c4, inset 0 2px 0 rgba(255,255,255,.4); text-shadow: 0 2px 0 rgba(50,0,110,.5); }
.btn.ad { background: linear-gradient(#8f7bff, #5a4fe8); box-shadow: 0 5px 0 #3a2fb0, inset 0 2px 0 rgba(255,255,255,.35); font-size: 18px; }
.btn.off { background: linear-gradient(#c9ccd3, #a8adb8); box-shadow: 0 5px 0 #80858f; text-shadow: none; color: #f4f5f7; }
.btn.own { background: linear-gradient(#ffe27a, #ffc21e); box-shadow: 0 5px 0 #c98a00; color: #6b4600; text-shadow: none; }
.btn .key { font-size: 13px; background: rgba(0,0,0,.25); border-radius: 6px; padding: 0 6px; line-height: 20px; margin-left: 4px; }
.btn .tv { width: 30px; height: 22px; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; }
.btn .tv::after { content: ''; border-left: 9px solid #5a4fe8; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; }
body.touch .btn .key { display: none; }

/* ---------------- Fenster */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(12,18,36,.42); backdrop-filter: blur(3px); pointer-events: auto; animation: fadein .18s; }
@keyframes fadein { from { opacity: 0; } }
.panel { position: relative; width: min(560px, 94vw); max-height: 92vh; display: flex; flex-direction: column; border-radius: 28px; background: #fffaf0; color: #3b2a1a; box-shadow: 0 16px 40px rgba(0,0,0,.35); animation: popin .22s cubic-bezier(.3,1.4,.6,1); }
@keyframes popin { from { transform: scale(.85); opacity: 0; } }
.panel .head { position: relative; height: 66px; border-radius: 28px 28px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 32px; font-weight: 800; color: #fff;
  background: linear-gradient(#ffb43a, #ff8a14); text-shadow: 0 3px 0 rgba(150,60,0,.45); }
.panel .head img { width: 54px; height: 54px; margin-top: -6px; }
.panel.gemp .head { background: linear-gradient(#c58bff, #8f4dff); text-shadow: 0 3px 0 rgba(60,0,130,.45); }
.panel.setp .head { background: linear-gradient(#6fb6ff, #3d7ff0); text-shadow: 0 3px 0 rgba(10,40,120,.45); }
.close { position: absolute; right: -10px; top: -10px; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(#ff6b6b, #e83a3a); box-shadow: 0 4px 0 #a81f1f; color: #fff; font-size: 28px; font-weight: 800; line-height: 48px; text-align: center; border: 3px solid #fff !important; z-index: 2; }
.panel .body { padding: 14px 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; touch-action: pan-y; overscroll-behavior: contain; }
/* Scrollbalken im Stil der Fenster: cremefarbene Rinne, Griff wie der Fensterkopf (orange, violett bei Edelsteinen,
   blau in den Einstellungen) mit hellem Glanz und weißem Rand */
.panel .body::-webkit-scrollbar { width: 14px; }
.panel .body::-webkit-scrollbar-track { margin: 10px 0; border-radius: 7px; background: #f3e4c6; box-shadow: inset 0 2px 3px rgba(150,100,40,.25); }
.panel .body::-webkit-scrollbar-thumb { border-radius: 7px; border: 2px solid #fffaf0; background: linear-gradient(90deg, #ffc15a, #ff8a14); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(160,70,0,.25); }
.panel .body::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #ffcf75, #ff9a2c); }
.panel .body::-webkit-scrollbar-button { display: none; height: 0; }
.panel .body::-webkit-scrollbar-corner { background: transparent; }
.panel.gemp .body::-webkit-scrollbar-track { background: #efe2ff; box-shadow: inset 0 2px 3px rgba(90,40,160,.2); }
.panel.gemp .body::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #d0a0ff, #8f4dff); }
.panel.setp .body::-webkit-scrollbar-track { background: #dbe8fb; box-shadow: inset 0 2px 3px rgba(20,60,140,.2); }
.panel.setp .body::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #8cc4ff, #3d7ff0); }
/* Chrome/Edge ignorieren ::-webkit-scrollbar, sobald scrollbar-color gesetzt ist → die Standard-Eigenschaften nur für
   Browser ohne ::-webkit-scrollbar (Firefox) */
@supports not selector(::-webkit-scrollbar) {
  .panel .body { scrollbar-width: thin; scrollbar-color: #ff9a1f #f3e4c6; }
  .panel.gemp .body { scrollbar-color: #a36bff #efe2ff; }
  .panel.setp .body { scrollbar-color: #4f8ff2 #dbe8fb; }
}
.tabs { display: flex; gap: 8px; }
.tab { flex: 1; height: 50px; border-radius: 15px; background: #f3e4c6; color: #8a6440; font-size: 19px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 3px 0 #dcc49a; }
.tab img { width: 36px; height: 36px; }
.tab.on { background: linear-gradient(#ffd25a, #ffaa1e); color: #fff; box-shadow: 0 3px 0 #c97a00; text-shadow: 0 2px 0 rgba(150,70,0,.4); }
.tab.lock { opacity: .55; }
.row { display: grid; grid-template-columns: 62px 1fr 128px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; background: #fff3dc; border: 2px solid #f1dfb8; }
.row .ri { width: 62px; height: 62px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #fff, #ffe3ad); display: flex; align-items: center; justify-content: center; }
.row .ri img { width: 56px; height: 56px; }
.row h4 { margin: 0; font-size: 20px; line-height: 1.05; }
.row .ch { font-size: 17px; font-weight: 800; color: #24a443; }
.row .ds { font-size: 13px; color: #8a6a48; line-height: 1.15; }
.pips { display: flex; gap: 3px; margin-top: 3px; }
.pips i { flex: 1; max-width: 22px; height: 7px; border-radius: 4px; background: #e8d4ad; }
.pips i.on { background: linear-gradient(#5cf07c, #22b44a); }
.gemp .pips i.on { background: linear-gradient(#e0a8ff, #9a52ff); }
.row .btn { height: 50px; font-size: 20px; }
.lockmsg { text-align: center; font-size: 18px; color: #8a6a48; padding: 26px 10px; font-weight: 700; }
.lockmsg img { width: 90px; height: 90px; display: block; margin: 0 auto 6px; }

.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 16px; background: #eef5ff; font-size: 20px; font-weight: 800; color: #24406e; }
.setrow > span { display: flex; flex-direction: column; line-height: 1.1; }
.setrow small { font-size: 13px; font-weight: 700; color: #d0465a; }
.setrow.pmute .seg { opacity: .5; }
.seg { display: flex; gap: 6px; }
.seg button { height: 40px; padding: 0 14px; border-radius: 12px; background: #d6e4fa; color: #3d5a8a; font-size: 16px; font-weight: 800; }
.seg button.on { background: linear-gradient(#6fb6ff, #3d7ff0); color: #fff; }
.setrow input[type=range] { width: 170px; pointer-events: auto; accent-color: #3d7ff0; }
.keys { font-size: 15px; color: #4a6288; line-height: 1.6; padding: 4px 6px; }
.keys b { display: inline-block; min-width: 26px; padding: 0 6px; margin-right: 3px; border-radius: 6px; background: #24406e; color: #fff; text-align: center; font-size: 13px; }

/* Diamant gefunden */
.winp .head { background: linear-gradient(#5fe0ff, #2aa1f0); text-shadow: 0 3px 0 rgba(0,60,130,.45); font-size: 36px; }
.winp .rew { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 54px; font-weight: 800; color: #b13bd6; margin: 4px 0; }
.winp .rew img { width: 74px; height: 74px; }
.winp .sub { text-align: center; font-size: 15px; color: #8a6a48; margin-top: -8px; }
.winp .st { display: flex; justify-content: space-between; font-size: 19px; font-weight: 800; padding: 6px 14px; border-radius: 12px; background: #fff3dc; }
.winp .btns { display: flex; gap: 10px; margin-top: 6px; }
.winp .btn { height: 60px; font-size: 22px; }

/* Titel */
#title { position: absolute; left: 0; right: 0; top: 12%; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
#title.card .logo { animation: cardin .6s cubic-bezier(.3,1.5,.6,1) both; }
#title.gone .logo { animation: cardout .6s ease-in both; }
@keyframes cardin { from { transform: rotate(-3deg) scale(.3); opacity: 0; } }
@keyframes cardout { to { transform: rotate(-3deg) scale(1.25); opacity: 0; } }
.logo { position: relative; text-align: center; line-height: .86; font-weight: 800; transform: rotate(-3deg); animation: logoin .6s cubic-bezier(.3,1.5,.6,1); }
@keyframes logoin { from { transform: rotate(-3deg) scale(.4); opacity: 0; } }
.logo .l1 { font-size: 64px; color: #fff; text-shadow: 0 5px 0 #2a2d3a, 0 8px 18px rgba(0,0,0,.35); letter-spacing: 2px; }
.logo .l2 { display: flex; align-items: center; justify-content: center; font-size: 104px; letter-spacing: 1px; background: linear-gradient(#ffffff 8%, #b9f3ff 40%, #45c8ff 70%, #2a8cf0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 #1b3f8f) drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
.logo .l2 img { width: 104px; height: 104px; margin: 0 -4px; filter: drop-shadow(0 6px 0 #1b3f8f); animation: gemspin 2.4s ease-in-out infinite; }
@keyframes gemspin { 50% { transform: translateY(-8px) rotate(6deg); } }
#resume { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-size: 22px; font-weight: 800; color: #fff; background: rgba(10,20,50,.55); padding: 10px 22px; border-radius: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.4); pointer-events: none; }

@media (max-height: 560px) {
  .pill { height: 36px; font-size: 19px; min-width: 112px; padding-left: 44px; }
  .pill img { width: 44px; height: 44px; }
  #ui .upg-btn { height: 46px; padding: 0 14px 0 6px; border-radius: 16px; gap: 7px; }
  .upg-btn .ic { width: 32px; height: 32px; border-radius: 10px; } .upg-btn .ic svg { width: 22px; height: 22px; }
  .upg-btn span { font-size: 16px; }
  .hud-left { gap: 6px; }
  .pilebar { width: 240px; height: 40px; }
  .panel .head { height: 54px; font-size: 26px; }
  .row { grid-template-columns: 50px 1fr 112px; padding: 5px 8px; }
  .row .ri { width: 50px; height: 50px; } .row .ri img { width: 46px; height: 46px; }
  .row .btn { height: 44px; font-size: 18px; }
  .logo .l1 { font-size: 46px; } .logo .l2 { font-size: 74px; } .logo .l2 img { width: 74px; height: 74px; }
  #m-grab { width: 92px; height: 92px; } #m-grab img { width: 46px; height: 46px; }
  #stick { width: 106px; height: 106px; } #stick i { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .slot { width: 62px; height: 62px; } .slot img { inset: 5px; width: 52px; height: 52px; }
  #hint { font-size: 16px; }
  body.touch #slots { bottom: 100px; right: 128px; }
}
.panel.winp { margin-top: clamp(90px, 33vh, calc(100vh - 520px)); width: min(500px, 94vw); }
@media (max-height: 560px) { .panel.winp { margin-top: clamp(80px, 30vh, calc(100vh - 380px)); } .winp .rew { font-size: 40px; margin: 0; } .winp .rew img { width: 50px; height: 50px; } .winp .st { padding: 3px 12px; font-size: 16px; } .winp .btn { height: 50px; } }
/* schmale Bildschirme (Handy hochkant) */
.pilebar { width: min(300px, calc(100vw - 190px)); }
.logo .l1 { font-size: min(64px, 11vw); }
.logo .l2 { font-size: min(104px, 17vw); }
.logo .l2 img { width: min(104px, 17vw); height: min(104px, 17vw); }
/* Handy (hoch oder flach quer): Ladenkarte kompakt, ohne Beschreibungszeile – sie muss zwischen Fadenkreuz und
   Joystick/GRAB passen */
@media (max-width: 640px), (max-height: 420px) {
  #card { width: min(286px, calc(100vw - 24px)); padding: 8px 10px 10px; border-radius: 17px; }
  #card p { display: none; }
  #card .ic { width: 46px; height: 46px; border-radius: 12px; } #card .ic img { width: 42px; height: 42px; }
  #card h3 { font-size: 20px; }
  #card .stat { font-size: 14px; }
  #card .btns { margin-top: 7px; }
  #card .btn { height: 40px; font-size: 17px; }
}
@media (max-width: 520px) {
  .pilebar .lbl { font-size: 12px; }
  .pilebar b { font-size: 14px; }
  .pill { min-width: 104px; }
  .toast { font-size: 19px; white-space: normal; text-align: center; max-width: 92vw; }
  .toast.gold { font-size: 22px; }
  #hint { white-space: normal; max-width: 88vw; font-size: 15px; flex-wrap: wrap; justify-content: center; }
  #objective { font-size: 19px; white-space: normal; max-width: 92vw; }
}
#hint .key, #hint img, #hint .mouse { flex-shrink: 0; }
.modal.clear { backdrop-filter: none; background: radial-gradient(ellipse at 50% 22%, rgba(120,220,255,.18), rgba(12,18,36,.3) 70%); }
.btn .tag { font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 6px; background: rgba(0,0,0,.22); letter-spacing: .5px; }
/* leichte Vignette über dem 3D-Bild */
#vig { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 88% 80% at 50% 46%, rgba(8,16,40,0) 58%, rgba(8,16,40,.3) 100%); }
/* Hochformat: Upgrades-Knopf nur als Symbol-Kachel, sonst stößt er an die Haufen-Anzeige */
@media (max-width: 560px) {
  #ui .upg-btn { padding: 0 7px; }
  .upg-btn span { display: none; }
}

/* ---------------- Erste Schaufel: Zielanzeige oben, Randpfeil, Kauf-Fenster */
/* Zielanzeige: klein oben rechts unter dem Zahnrad, damit sie nichts vom Bild verdeckt */
#goal { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; row-gap: 3px;
  width: 214px; padding: 5px 10px 6px 50px; border-radius: 14px; transform-origin: 100% 50%;
  background: linear-gradient(rgba(28,34,60,.8), rgba(16,20,38,.8)); border: 2px solid rgba(255,224,102,.5); box-shadow: 0 3px 10px rgba(0,0,0,.18); }
#goal .gi { position: absolute; left: -6px; top: 50%; width: 54px; height: 54px; transform: translateY(-50%) rotate(-8deg); filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); animation: goalbob 1.6s ease-in-out infinite; }
#goal .gt { grid-column: 1 / 3; font-size: 13px; line-height: 1.15; font-weight: 800; color: #ffe066; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(70,42,0,.85); }
#goal .gb { height: 8px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; }
#goal .gb i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #3ed86a, #a4ff7c); box-shadow: 0 0 8px rgba(110,255,130,.6); transition: width .2s; }
#goal .gn { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 800; color: #fff1b8; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
#goal .gn img { width: 18px; height: 18px; }
#goal .gn.bump { animation: bump .25s ease-out; }
#goal.popin { animation: goalpop .45s cubic-bezier(.3,1.6,.5,1); }
#goal[data-step="sell"] { border-color: #7dff8c; }
#goal[data-step="buy"] { border-color: #fff; animation: goalready .9s ease-in-out infinite; }
#goal[data-step="buy"].popin { animation: goalpop .45s cubic-bezier(.3,1.6,.5,1), goalready .9s .45s ease-in-out infinite; }
#goal[data-step="buy"] .gt { color: #7dff8c; text-shadow: 0 2px 0 rgba(8,40,16,.85); }
@keyframes goalpop { from { transform: scale(.6); opacity: 0; } }
@keyframes goalready { 50% { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(125,255,140,.45), 0 0 16px 4px rgba(125,255,140,.5); } }
@keyframes goalbob { 50% { transform: translateY(-58%) rotate(4deg); } }

#ptr { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 3; }
#ptr .pc { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(#fffbe6, #ffd23a); border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.25), 0 0 14px 4px rgba(255,220,80,.55); animation: ptrpulse .8s ease-in-out infinite; }
#ptr .pc img { width: 44px; height: 44px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.3)); }
#ptr .ar { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; transform-origin: 14px 14px; }
#ptr .ar::before { content: ''; position: absolute; left: 2px; top: 1px; border-left: 19px solid #ffd23a; border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(0 2px 2px rgba(0,0,0,.45)); animation: ptrpoke .6s ease-in-out infinite; }
#ptr b { position: absolute; left: -70px; top: 28px; width: 140px; text-align: center; font-size: 14px; font-weight: 800; color: #fff; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 8px rgba(0,0,0,.4); }
@keyframes ptrpulse { 50% { transform: scale(1.1); } }
@keyframes ptrpoke { 50% { transform: translateX(7px); } }

.panel.offerp { width: min(420px, 92vw); }
.offerp .head { background: linear-gradient(#5fe07a, #22b34a); text-shadow: 0 3px 0 rgba(0,90,30,.45); font-size: 34px; letter-spacing: 1px; }
.offerp .body { align-items: center; gap: 6px; padding: 6px 18px 20px; overflow: visible; }
.offerp .ofx { position: relative; width: 190px; height: 160px; display: flex; align-items: center; justify-content: center; }
.offerp .rays { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,200,40,.5) 0 10deg, rgba(255,200,40,0) 10deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: offerspin 9s linear infinite; }
.offerp .ofx img { position: relative; width: 168px; height: 168px; filter: drop-shadow(0 8px 6px rgba(0,0,0,.3)); animation: offerbob 1.4s ease-in-out infinite; }
.offerp .oname { font-size: 38px; font-weight: 800; color: #3b2a1a; letter-spacing: 1px; margin-top: -4px; line-height: 1; }
.offerp .ocmp { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 26px; font-weight: 800; color: #8a6a48; }
.offerp .ocmp span { display: flex; align-items: center; gap: 2px; padding: 2px 12px 2px 4px; border-radius: 12px; background: #fff3dc; }
.offerp .ocmp span img { width: 38px; height: 38px; }
.offerp .ocmp .big { color: #1f9a45; background: #dcffe4; font-size: 30px; }
.offerp .ocmp i { font-style: normal; color: #c9a77f; }
.offerp .ocmp em { width: 100%; font-style: normal; font-size: 17px; text-align: center; margin-top: -4px; text-transform: uppercase; letter-spacing: .5px; }
.offerp .obuy { flex: none; width: 100%; height: 72px; margin-top: 8px; font-size: 34px; gap: 12px; animation: buypulse 1s ease-in-out infinite; }
.offerp .obuy .pr { display: flex; align-items: center; gap: 4px; padding: 2px 12px 2px 6px; border-radius: 12px; background: rgba(0,0,0,.18); font-size: 28px; }
.offerp .obuy .pr img { width: 34px; height: 34px; }
.offerp .obuy .key { font-size: 16px; line-height: 26px; padding: 0 9px; margin-left: 0; }
@keyframes buypulse { 50% { transform: scale(1.04); } }
@keyframes offerbob { 50% { transform: translateY(-8px) rotate(5deg); } }
@keyframes offerspin { to { transform: rotate(360deg); } }
@media (max-height: 560px) {
  .offerp .head { height: 50px; font-size: 28px; } .offerp .ofx { width: 130px; height: 100px; } .offerp .rays { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
  .offerp .ofx img { width: 108px; height: 108px; } .offerp .oname { font-size: 28px; } .offerp .ocmp { font-size: 22px; } .offerp .ocmp span img { width: 30px; height: 30px; }
  .offerp .obuy { height: 56px; font-size: 26px; margin-top: 4px; }
}
/* Hochformat: Zielanzeige unter die Münz-/Kohle-Anzeige links schieben */

@media (max-width: 560px) { #goal { width: 196px; } #toasts { margin-top: 62px; } }

/* Belohnungs-Video-Fenster + Sperre während eine Werbung lädt (CrazyGames Full Launch) */
.panel.rewp { width: min(440px, 92vw); }
.rewp .head { background: linear-gradient(#8f7bff, #5a4fe8); text-shadow: 0 3px 0 rgba(30,20,120,.45); font-size: 28px; }
.rewp .body { align-items: center; gap: 8px; }
.rewp .rwi { position: relative; width: 120px; height: 104px; display: flex; align-items: center; justify-content: center; }
.rewp .rwi img { width: 104px; height: 104px; filter: drop-shadow(0 6px 5px rgba(0,0,0,.28)); }
.rewp .rwi b { position: absolute; right: -6px; bottom: -4px; min-width: 44px; height: 44px; border-radius: 22px; background: #5a4fe8; color: #fff; font-size: 34px; line-height: 40px; text-align: center; box-shadow: 0 3px 0 #3a2fb0; }
.rewp .rwt { font-size: 19px; font-weight: 800; color: #6b5238; text-align: center; line-height: 1.2; }
.rewp .btns { display: flex; gap: 10px; width: 100%; margin-top: 6px; }
.rewp .btn { height: 58px; font-size: 20px; }
.adnote { font-size: 15px; font-weight: 700; color: #8a6a48; text-align: center; line-height: 1.25; }
.panel.busy .btn, .panel.busy .close { pointer-events: none; filter: grayscale(.7); opacity: .55; }
.panel.busy::after { content: ''; position: absolute; left: 50%; bottom: 30px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; border: 5px solid rgba(60,40,20,.25); border-top-color: #3b2a1a; animation: busyspin .8s linear infinite; }
@keyframes busyspin { to { transform: rotate(360deg); } }
@media (max-height: 560px) { .rewp .head { font-size: 24px; } .rewp .rwi { width: 84px; height: 70px; } .rewp .rwi img { width: 70px; height: 70px; } .rewp .rwi b { min-width: 34px; height: 34px; font-size: 26px; line-height: 31px; } .rewp .rwt { font-size: 16px; } .rewp .btn { height: 48px; font-size: 18px; } }

/* ---- Full-Launch-Prüfung 10.11. (tools/scenes/uisizes.js): nichts abgeschnitten, nichts überlappt ---- */
/* Gewinn-Fenster auf niedrigen Bildern (800×450 … 907×510): kompakt und unten angelegt – die Knöpfe waren abgeschnitten.
   Der Diamant schwebt darüber. */
@media (max-height: 560px) {
  .modal.clear { align-items: flex-end; }
  .panel.winp { margin: 0 0 10px; max-height: calc(100vh - 20px); }
  .winp .head { height: 46px; font-size: 26px; border-radius: 22px 22px 0 0; }
  .winp .body { padding: 8px 14px 12px; gap: 5px; }
  .winp .sub { display: none; }
  .winp .rew { font-size: 32px; margin: 0; } .winp .rew img { width: 40px; height: 40px; }
  .winp .st { padding: 1px 12px; font-size: 15px; }
  .winp .btns { margin-top: 4px; }
  .winp .btn { height: 46px; font-size: 20px; }
  /* höchstens zwei Meldungen, kleiner: sonst reichen drei Zeilen bis ins Ladenschild */
  .toast { font-size: 19px; } .toast.gold { font-size: 21px; }
  #toasts .toast:nth-last-child(n+3) { display: none; }
}
/* Meldungen bleiben in der freien Mitte zwischen linker Spalte und Zielanzeige/Zahnrad und brechen dort um */
#toasts { max-width: calc(100vw - 472px); }
.toast { white-space: normal; text-align: center; }
/* Hochformat (Handy): linke Spalte = Anzeigen, rechte Spalte = Zielanzeige und darunter die Meldungen */
@media (max-width: 560px) {
  .hud-top { left: 0; right: 0; transform: none; }
  #toasts { align-self: flex-end; width: calc(100vw - 172px); max-width: none; margin-right: 10px; }
  .toast { max-width: 100%; }
  #b-upg.hidden + .pill { margin-top: 50px; } /* ohne Upgrades-Kachel läge die Edelstein-Anzeige unter der Haufen-Anzeige */
  body.touch #slots { right: 22px; bottom: 152px; } /* über dem GRAB-Knopf statt auf dem Steuerknüppel */
}
/* Touch: Detektor-Anzeige lag auf GRAB/Springen → links über den Steuerknüppel */
body.touch #detector { left: max(26px, calc(env(safe-area-inset-left) + 14px)); right: auto; bottom: 170px; }
@media (max-width: 560px) { #toasts { margin-top: 72px; } }
/* Ladekreis oben rechts im Fensterkopf (unten lag er auf den Knöpfen / dem Werbeblocker-Hinweis) */
.panel.busy::after { left: auto; bottom: auto; right: 14px; top: 10px; width: 26px; height: 26px; margin: 0; border-width: 4px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }

/* ---- CrazyGames-Prüfung 11.11. (iPhone 14) ---- */
/* Hochformat: Reiter im Upgrades-Fenster schnitten „Dynamite“ ab → Symbol über der Schrift; Zeilen enger */
@media (max-width: 560px) {
  .panel .body { padding: 12px 12px 16px; }
  .tabs { gap: 6px; }
  .tab { min-width: 0; height: 58px; flex-direction: column; gap: 0; padding: 4px 2px 3px; font-size: 15px; line-height: 1.05; white-space: nowrap; }
  .tab img { width: 30px; height: 30px; }
  .row { grid-template-columns: 48px minmax(0, 1fr) 96px; gap: 8px; padding: 6px 8px; }
  .row .ri { width: 48px; height: 48px; border-radius: 13px; } .row .ri img { width: 44px; height: 44px; }
  .row h4 { font-size: 18px; } .row .ch { font-size: 15px; }
  .row .btn { height: 44px; font-size: 18px; gap: 3px; } .row .btn img { width: 24px; height: 24px; }
  #card { width: min(262px, calc(100vw - 24px)); }
}
/* Querformat mit wenig Höhe (iPhone 14 quer im Browser ≈ 790×290): die Anzeigen links waren zu groß und lagen auf dem
   Joystick. Alles skaliert mit der Höhe; Spalte links endet sicher über dem Joystick. */
@media (max-height: 420px) {
  .hud-left { top: 8px; gap: 4px; }
  #ui .upg-btn { height: clamp(34px, 12.5vh, 46px); margin-bottom: 2px; padding: 0 12px 0 5px; border-radius: 13px; gap: 6px; }
  .upg-btn .ic { width: clamp(24px, 9vh, 32px); height: clamp(24px, 9vh, 32px); border-radius: 8px; }
  .upg-btn .ic svg { width: 18px; height: 18px; }
  .upg-btn span { font-size: 14px; }
  .badge { min-width: 22px; height: 22px; padding: 0 5px; line-height: 19px; font-size: 13px; top: -6px; right: -6px; }
  .pill { height: clamp(26px, 10.2vh, 36px); min-width: 92px; padding: 0 12px 0 clamp(32px, 12vh, 44px); border-radius: 15px; font-size: clamp(14px, 5.4vh, 19px); }
  .pill img { left: -4px; width: clamp(30px, 12vh, 44px); height: clamp(30px, 12vh, 44px); }
  .pill .fill { left: clamp(28px, 11vh, 40px); right: 9px; bottom: 3px; height: 3px; }
  .pill .unl { height: 24px; padding: 0 8px 0 6px; font-size: 15px; gap: 4px; }
  .pill .unl .clk { width: 14px; height: 14px; border-width: 2px; }
  .hud-top { top: 6px; }
  .pilebar { height: 36px; }
  .hud-right { top: 8px; gap: 6px; }
  .round-btn { width: 40px; height: 40px; border-radius: 13px; } .round-btn svg { width: 24px; height: 24px; }
  #stick { width: clamp(84px, 31vh, 106px); height: clamp(84px, 31vh, 106px); bottom: clamp(8px, 3.5vh, 30px); }
  #stick i { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  #m-grab { right: 18px; bottom: clamp(10px, 4vh, 30px); width: clamp(76px, 29vh, 92px); height: clamp(76px, 29vh, 92px); font-size: 16px; }
  #m-grab img { width: 38px; height: 38px; margin-bottom: -4px; }
  #m-jump { right: calc(32px + clamp(76px, 29vh, 92px)); bottom: clamp(12px, 5vh, 34px); width: 54px; height: 54px; }
  #m-jump svg { width: 28px; height: 28px; }
  body.touch #slots { right: 18px; bottom: calc(clamp(10px, 4vh, 30px) + clamp(76px, 29vh, 92px) + 10px); gap: 8px; }
  .slot { width: 52px; height: 52px; border-radius: 15px; } .slot img { inset: 4px; width: 44px; height: 44px; }
  .slot.small { width: 46px; height: 46px; border-radius: 13px; } .slot.small img { inset: 3px; width: 40px; height: 40px; }
  .slot .t { font-size: 18px; }
  /* Detektor: unten in der Mitte, zwischen Joystick und Springen (links lag er auf den Anzeigen) */
  body.touch #detector { left: 50%; right: auto; bottom: 8px; transform: translateX(-50%); width: 172px; padding: 5px 10px; }
  body.touch #hint { top: 60%; }
}
/* flaches Querformat, Fortsetzung: Slots (Drohne/Dynamit) unten zwischen Springen und Detektor statt über GRAB – dort
   lagen sie der Ladenkarte im Weg. Fenster kompakter, damit möglichst wenig scrollt. */
@media (max-height: 420px) {
  body.touch #slots { right: calc(42px + clamp(76px, 29vh, 92px) + 54px); bottom: clamp(10px, 4vh, 30px); }
  .panel { max-height: 96vh; border-radius: 22px; }
  .panel .head { height: 44px; font-size: 22px; border-radius: 22px 22px 0 0; }
  .panel .head img { width: 40px; height: 40px; margin-top: -4px; }
  .panel .head svg { width: 30px !important; height: 30px !important; }
  .close { width: 40px; height: 40px; line-height: 38px; font-size: 24px; right: -6px; top: -6px; }
  .panel .body { padding: 8px 12px 12px; gap: 6px; }
  .tab { height: 40px; font-size: 16px; } .tab img { width: 28px; height: 28px; }
  .row { padding: 4px 8px; } .row .ri { width: 42px; height: 42px; } .row .ri img { width: 38px; height: 38px; }
  .row { grid-template-columns: 42px 1fr 108px; }
  .row h4 { font-size: 17px; } .row .ch { font-size: 14px; } .row .btn { height: 38px; font-size: 17px; }
  .setrow { padding: 5px 12px; font-size: 17px; } .seg button { height: 32px; font-size: 14px; padding: 0 11px; }
  .keys { font-size: 13px; line-height: 1.5; }
  .offerp .head { height: 42px; font-size: 24px; }
  .offerp .body { padding: 2px 16px 12px; gap: 2px; }
  .offerp .ofx { width: 110px; height: 62px; } .offerp .rays { width: 130px; height: 130px; margin: -65px 0 0 -65px; }
  .offerp .ofx img { width: 70px; height: 70px; }
  .offerp .oname { font-size: 22px; } .offerp .ocmp { font-size: 18px; gap: 6px; } .offerp .ocmp .big { font-size: 20px; }
  .offerp .ocmp span img { width: 24px; height: 24px; } .offerp .ocmp em { font-size: 13px; margin-top: -2px; }
  .offerp .obuy { height: 46px; font-size: 22px; margin-top: 4px; } .offerp .obuy .pr { font-size: 20px; } .offerp .obuy .pr img { width: 24px; height: 24px; }
  .rewp .rwi { width: 70px; height: 56px; } .rewp .rwi img { width: 56px; height: 56px; }
  .rewp .btn { height: 44px; }
}
/* Hochformat: Restzeit-Anzeige in der Kohle-Anzeige selbst (rechts daneben lag sie unter Zielanzeige/Meldungen) */
@media (max-width: 560px) {
  .pill .unl { position: static; transform: none; height: 24px; margin: 0 -8px 0 8px; padding: 0 8px 0 6px; font-size: 15px; gap: 4px; box-shadow: 0 2px 0 #3a2fb0; }
  .pill .unl .clk { width: 14px; height: 14px; border-width: 2px; }
  @keyframes unllow { 50% { transform: scale(1.08); } }
}
/* schmale Handys (360 px und weniger): Joystick, Springen und GRAB kleiner, damit sie sich nicht berühren;
   Zielanzeige schmaler (lag auf der linken Spalte) */
@media (max-width: 400px) {
  #stick { left: max(14px, env(safe-area-inset-left)); width: 104px; height: 104px; }
  #stick i { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  #m-grab { right: 14px; width: 96px; height: 96px; font-size: 18px; } #m-grab img { width: 48px; height: 48px; }
  #m-jump { right: 120px; width: 58px; height: 58px; bottom: 30px; } #m-jump svg { width: 30px; height: 30px; }
  body.touch #slots { right: 14px; bottom: 138px; }
  #goal { width: min(196px, calc(100vw - 150px)); padding-left: 42px; } #goal .gi { width: 44px; height: 44px; }
  body.touch #detector { left: max(14px, env(safe-area-inset-left)); width: 124px; bottom: 150px; padding: 6px 10px; }
  .round-tag { white-space: nowrap; }
}
.round-tag { white-space: nowrap; }
@media (max-width: 560px) {
  /* mit Restzeit ist die Kohle-Anzeige breiter: Meldungen rechts erst darunter beginnen */
  body:has(#v-unl:not(.hidden)) #toasts { margin-top: 124px; }
}
@media (max-width: 400px) { body.touch #hint { top: 60%; } }

/* Laden fehlgeschlagen (WebGL-Kontext verloren, auch nach den automatischen Neustarts – glguard.js) */
#glfail { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12,18,36,.42); }
#glfail .panel { width: min(420px, 100%); }
#glfail .body { align-items: stretch; text-align: center; font-size: 18px; font-weight: 600; line-height: 1.3; }
#glfail p { margin: 4px 6px 6px; }
#glfail .btns { display: flex; }
#glfail .btn { border: 0; font-family: inherit; cursor: pointer; }
#glfail small { min-height: 1em; font-size: 12px; font-weight: 500; color: #9a8a76; overflow-wrap: anywhere; }
