/* Ninja Rock – Gestaltung: düster, Nacht, Gold, Grün, Orange. Kein Rosa. */
@font-face { font-family: 'Bangers'; src: url(../fonts/bangers.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; font-weight: 800; src: url(../fonts/nunito-800.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; font-weight: 900; src: url(../fonts/nunito-900.woff2) format('woff2'); font-display: swap; }

:root {
  --night: #0b1020;
  --night2: #121a33;
  --gold: #ffc93c;
  --gold2: #ff9d1c;
  --green: #3fe05a;
  --orange: #ff9a1f;
  --red: #e5372f;
  --ink: #f4f1e8;
  --muted: #b9c2d8;
  --panel: rgba(10, 15, 32, .78);
  --line: rgba(255, 201, 60, .55);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); overflow: hidden; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 800;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  overscroll-behavior: none;
}
img { -webkit-user-drag: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }

#app { position: fixed; inset: 0; overflow: hidden; }
.screen { position: absolute; inset: 0; display: none; overflow: hidden; }
.screen.active { display: block; animation: fadeIn .35s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.bg { position: absolute; inset: -2%; background-size: cover; background-position: center; }
#screen-menu .bg, #screen-ninja .bg { background-image: url(../assets/bg-menu.jpg); }
#screen-tuner .bg { background-image: url(../assets/bg-tuner.jpg); }
#screen-menu .bg { animation: drift 40s ease-in-out infinite alternate; }
#screen-menu .bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,8,20,.15) 0%, rgba(5,8,20,0) 40%, rgba(5,8,20,.55) 75%, rgba(5,8,20,.75) 100%),
              linear-gradient(0deg, rgba(5,8,20,.7) 0%, rgba(5,8,20,0) 35%); }
.bg.dim::after { content: ''; position: absolute; inset: 0; background: rgba(5,8,20,.62); }
.bg.dim2::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(5,8,20,.35), rgba(5,8,20,.82) 70%); }
@keyframes drift { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.06) translateX(-1.5%); } }

.mist { position: absolute; left: -20%; right: -20%; bottom: 0; height: 40%; pointer-events: none;
  background: radial-gradient(ellipse at 30% 100%, rgba(140,170,220,.22), transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(120,150,210,.18), transparent 55%);
  animation: mist 18s ease-in-out infinite alternate; }
@keyframes mist { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

.fireflies span { position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #ffe48a; box-shadow: 0 0 10px 3px rgba(255,210,90,.7); opacity: 0;
  animation: fly var(--d, 9s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes fly {
  0% { opacity: 0; transform: translate(0,0); }
  20% { opacity: .9; }
  50% { transform: translate(var(--x, 30px), var(--y, -60px)); opacity: .6; }
  80% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(var(--x, 30px) * -.5), calc(var(--y, -60px) * 1.6)); }
}

/* ---------- Kopfzeile Menü ---------- */
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 2.2vh calc(2.5vw + var(--safe-r)) 0 calc(2.5vw + var(--safe-l)); z-index: 5; }
.logo { font-family: 'Bangers', 'Nunito', sans-serif; line-height: .82; transform: rotate(-4deg); filter: drop-shadow(0 6px 0 rgba(0,0,0,.55)); }
.logo-ninja { display: block; font-size: 9vh; letter-spacing: .02em;
  background: linear-gradient(#ffffff, #b9c6db 55%, #7d8aa3); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #1a2238; }
.logo-rock { display: block; position: relative; font-size: 12vh; margin-left: 2.5vh; letter-spacing: .02em;
  background: linear-gradient(#fff3a8, var(--gold) 45%, var(--gold2) 80%, #c45a0a); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #3a1a00; }
.logo .bolt { position: absolute; right: -4.2vh; top: 1vh; width: 4.5vh; height: 7.5vh; fill: var(--gold); stroke: #3a1a00; stroke-width: 1.5;
  animation: boltPulse 2.4s ease-in-out infinite; }
@keyframes boltPulse { 0%,100% { filter: drop-shadow(0 0 2px #ffcc33); } 50% { filter: drop-shadow(0 0 14px #ffcc33); } }

.status { display: flex; gap: 1vh; align-items: center; }
.pill { display: flex; align-items: center; gap: .8vh; padding: .9vh 1.8vh; border-radius: 999px; background: var(--panel);
  border: 2px solid var(--line); font-size: 2.6vh; }
.pill svg { width: 3vh; height: 3vh; fill: var(--gold); }
.belt-dot { width: 3.2vh; height: 1.4vh; border-radius: 4px; background: var(--belt, #f2f2f2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.icon-btn { width: 6vh; height: 6vh; border-radius: 50%; background: var(--panel); border: 2px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.icon-btn svg { width: 3.4vh; height: 3.4vh; fill: var(--muted); }

/* ---------- Bühne mit Faris und Dino ---------- */
.stage { position: absolute; left: calc(1vw + var(--safe-l)); bottom: 0; width: 58vw; height: 100%; pointer-events: none; }
.hero-wrap { position: absolute; left: 21vw; bottom: 1vh; height: 74vh; }
.hero { height: 100%; display: block; transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(120,170,255,.25)); }
.hero-shadow { position: absolute; left: 10%; right: 10%; bottom: -1vh; height: 4vh; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.6), transparent 70%); }
@keyframes breathe { 0%,100% { transform: scaleY(1) translateY(0); } 50% { transform: scaleY(1.012) translateY(-.4vh); } }
.dino-wrap { position: absolute; left: 0; bottom: 1vh; height: 44vh; }
.dino { height: 100%; display: block; transform-origin: 50% 100%; animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-1.2vh) rotate(-1.5deg); } }

.bubble { position: absolute; left: 6vh; bottom: calc(100% + 1.5vh); width: max-content; max-width: 34vh;
  background: #fffaf0; color: #1c1a17; padding: 1.6vh 2.2vh; border-radius: 2.4vh; font-size: 2.6vh; line-height: 1.25;
  box-shadow: 0 6px 0 rgba(0,0,0,.35); border: 3px solid #1c1a17; transform-origin: 20% 100%; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.bubble::after { content: ''; position: absolute; left: 4vh; bottom: -2vh; border: 1.2vh solid transparent; border-top: 1.6vh solid #1c1a17; }
.bubble.small { font-size: 2.2vh; max-width: 26vh; left: auto; right: 2vh; transform-origin: 80% 100%; }
.bubble.small::after { left: auto; right: 4vh; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- große Knöpfe ---------- */
.menu-buttons { position: absolute; right: calc(3vw + var(--safe-r)); top: 50%; transform: translateY(-42%); display: flex; flex-direction: column; gap: 1.8vh; width: 36vw; max-width: 460px; z-index: 4; }
.big-btn { position: relative; display: flex; align-items: center; gap: 2vh; width: 100%; min-height: 10.5vh; padding: 1.4vh 2.4vh;
  border-radius: 2.4vh; background: linear-gradient(180deg, rgba(30,40,72,.92), rgba(12,17,36,.94));
  border: 3px solid rgba(255,255,255,.14); box-shadow: 0 .8vh 0 rgba(0,0,0,.45); text-align: left; transition: transform .12s, box-shadow .12s; }
.big-btn:active { transform: translateY(.6vh) scale(.985); box-shadow: 0 .2vh 0 rgba(0,0,0,.45); }
.big-btn.primary { border-color: var(--gold); background: linear-gradient(180deg, #2b3d1f, #142310 70%); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%,100% { box-shadow: 0 .8vh 0 rgba(0,0,0,.45), 0 0 0 rgba(255,201,60,0); } 50% { box-shadow: 0 .8vh 0 rgba(0,0,0,.45), 0 0 3vh rgba(255,201,60,.55); } }
.btn-ico { flex: none; width: 7vh; height: 7vh; border-radius: 1.8vh; display: grid; place-items: center; background: rgba(0,0,0,.35); border: 2px solid rgba(255,201,60,.4); }
.btn-ico svg { width: 4.2vh; height: 4.2vh; fill: var(--gold); }
.btn-txt b { display: block; font-family: 'Bangers', 'Nunito', sans-serif; font-weight: 400; font-size: 4.4vh; letter-spacing: .04em; line-height: 1; }
.btn-txt small { display: block; font-size: 2.2vh; color: var(--muted); margin-top: .4vh; }
.big-btn.primary .btn-txt b { color: var(--gold); }
.big-btn.center { justify-content: center; text-align: center; }
.soon { position: absolute; right: 1.6vh; top: 1.2vh; font-size: 1.9vh; padding: .3vh 1.2vh; border-radius: 999px; background: rgba(255,154,31,.2); color: var(--orange); border: 1.5px solid rgba(255,154,31,.5); }
.big-btn[data-soon] .btn-ico { opacity: .7; }

/* ---------- Leisten auf Unterseiten ---------- */
.bar { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2vh;
  padding: 2vh calc(2.5vw + var(--safe-r)) 0 calc(2.5vw + var(--safe-l)); z-index: 6; }
.bar h1 { margin: 0; font-family: 'Bangers', sans-serif; font-weight: 400; font-size: 6vh; letter-spacing: .05em; color: var(--gold); text-shadow: 0 4px 0 rgba(0,0,0,.6); }
.back-btn { width: 8vh; height: 8vh; border-radius: 50%; background: var(--panel); border: 3px solid var(--line); display: grid; place-items: center; }
.back-btn svg { width: 4vh; height: 4vh; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip { padding: 1.2vh 2.2vh; border-radius: 999px; background: var(--panel); border: 2px solid rgba(255,255,255,.2); font-size: 2.4vh; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--green); color: var(--green); }

/* ---------- Mein Ninja ---------- */
.belt-row { position: absolute; left: calc(2vw + var(--safe-l)); right: calc(2vw + var(--safe-r)); top: 14vh; bottom: 12vh; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.2vw; align-items: center; }
.belt-card { position: relative; border-radius: 2vh; background: linear-gradient(180deg, rgba(25,34,62,.85), rgba(10,14,30,.9)); border: 3px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 5vh .4vw 1.8vh; overflow: hidden; }
.belt-card img { width: 112%; max-width: none; height: auto; display: block; }
.belt-card.locked img { filter: brightness(0) drop-shadow(0 0 1px rgba(255,255,255,.35)); opacity: .55; }
.belt-card.current { border-color: var(--gold); box-shadow: 0 0 3vh rgba(255,201,60,.45); }
.belt-card .bname { margin-top: 1vh; font-family: 'Bangers', sans-serif; font-weight: 400; font-size: 3vh; letter-spacing: .04em; }
.belt-card .bstrip { width: 70%; height: 1.4vh; border-radius: 4px; background: var(--belt); margin-top: .8vh; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.belt-card .lock { position: absolute; top: 1.4vh; right: 1.4vh; width: 4vh; height: 4vh; fill: var(--muted); opacity: .8; }
.belt-card .num { position: absolute; top: 1.2vh; left: 1.4vh; font-family: 'Bangers', sans-serif; font-size: 3.4vh; color: var(--gold); }
.belt-hint { position: absolute; left: 0; right: 0; bottom: 3vh; margin: 0; text-align: center; font-size: 3vh; color: var(--ink); text-shadow: 0 2px 0 #000; padding: 0 5vw; }

/* ---------- Stimmgerät ---------- */
.dojo-glow { position: absolute; left: 50%; top: 22%; width: 70vh; height: 70vh; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(rgba(255,201,60,.16), transparent 65%); pointer-events: none; }
.tuner-main { position: absolute; left: 50%; top: 9vh; transform: translateX(-50%); width: 64vh; text-align: center; z-index: 3; }
.gauge-wrap { position: relative; width: 64vh; margin: 0 auto; }
.gauge { width: 100%; display: block; overflow: visible; }
.gauge .tick { stroke: rgba(255,255,255,.55); stroke-width: 2; }
.gauge .tick.mid { stroke: #fff; stroke-width: 4; }
.needle { transform-origin: 150px 150px; transform: rotate(0deg); transition: transform .12s linear, fill .2s; fill: #d6dbe8; }
.needle.off { fill: #59617a; }
.needle.red { fill: var(--red); } .needle.orange { fill: var(--orange); } .needle.green { fill: var(--green); }
.note { position: absolute; left: 50%; bottom: -1vh; transform: translateX(-50%); font-family: 'Bangers', sans-serif; font-size: 13vh; line-height: 1;
  color: #fff; text-shadow: 0 5px 0 rgba(0,0,0,.6); min-width: 14vh; }
.note small { font-family: 'Nunito', sans-serif; font-size: 2.4vh; display: block; color: var(--muted); text-shadow: none; margin-top: -1vh; }
.msg { margin-top: 2.6vh; font-family: 'Bangers', sans-serif; font-size: 6.4vh; letter-spacing: .04em; min-height: 7vh; text-shadow: 0 4px 0 rgba(0,0,0,.6); }
.msg.red { color: #ff6b5e; } .msg.orange { color: var(--orange); } .msg.green { color: var(--green); } .msg.gold { color: var(--gold); }
.msg .arrow { display: inline-block; width: 5vh; height: 5vh; vertical-align: -.6vh; margin: 0 .6vh; }
.msg .arrow path { fill: currentColor; }
.sub { font-size: 2.1vh; color: var(--muted); min-height: 2.6vh; }
.level { width: 24vh; height: .9vh; margin: 1vh auto 0; border-radius: 1vh; background: rgba(255,255,255,.12); overflow: hidden; }
.level i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .08s; }

.tuner-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 47vh; z-index: 2; }
.tuner-faris { position: absolute; left: calc(1vw + var(--safe-l)); bottom: 0; height: 46vh; transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; }
.tuner-dino-wrap { position: absolute; right: calc(1vw + var(--safe-r)); bottom: 0; height: 30vh; }
.tuner-dino { height: 100%; display: block; }
.tuner-dino-wrap .bubble { bottom: calc(100% + 1vh); }

.swords { position: absolute; left: 50%; bottom: 2vh; transform: translateX(-50%); display: flex; gap: 1.6vh; align-items: flex-end; }
.sword { position: relative; width: 9vh; height: 38vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; --c: #6d7690; }
.sword svg { width: 100%; height: 30vh; overflow: visible; transition: filter .2s; }
.sword .blade { fill: var(--c); transition: fill .2s; }
.sword .edge { fill: rgba(255,255,255,.55); }
.sword .hilt { fill: #2a1d12; stroke: #c99a3a; stroke-width: 2; }
.sword .guard { fill: #c99a3a; }
.sword .lbl { margin-top: .6vh; width: 7vh; height: 7vh; border-radius: 50%; display: grid; place-items: center; font-family: 'Bangers', sans-serif; font-size: 4.4vh;
  background: var(--panel); border: 3px solid rgba(255,255,255,.2); line-height: 1; padding-top: .4vh; }
.sword .lbl small { display: none; }
.sword.sel .lbl { border-color: #fff; box-shadow: 0 0 2vh rgba(255,255,255,.5); }
.sword.active { --c: #c7cede; }
.sword.red { --c: var(--red); } .sword.orange { --c: var(--orange); } .sword.green { --c: var(--green); }
.sword.red svg, .sword.orange svg, .sword.green svg { filter: drop-shadow(0 0 1.6vh var(--c)); }
.sword.done { --c: var(--gold); }
.sword.done svg { filter: drop-shadow(0 0 2.2vh rgba(255,201,60,.9)); animation: shine 2.4s ease-in-out infinite; }
.sword.done .lbl { border-color: var(--gold); color: var(--gold); }
@keyframes shine { 0%,100% { filter: drop-shadow(0 0 1.4vh rgba(255,201,60,.7)); } 50% { filter: drop-shadow(0 0 3vh rgba(255,220,120,1)); } }
.sword.flash svg { animation: slash .6s ease-out; }
@keyframes slash { 0% { transform: scale(1); } 30% { transform: scale(1.12) translateY(-1.5vh); } 100% { transform: scale(1); } }

.spark { position: absolute; width: 1vh; height: 1vh; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 1vh 0.4vh rgba(255,201,60,.9);
  pointer-events: none; z-index: 20; animation: spark .8s ease-out forwards; }
.spark.star { width: 2.4vh; height: 2.4vh; border-radius: 0; background: var(--gold); box-shadow: none;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes spark { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(var(--r, 0deg)); opacity: 0; } }

.cheer { animation: cheer .9s cubic-bezier(.3,1.5,.5,1) !important; }
@keyframes cheer { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(-6vh) scale(1.05, .95) rotate(-4deg); } 50% { transform: translateY(0) scale(1.06, .94); } 70% { transform: translateY(-2.5vh) rotate(3deg); } 100% { transform: translateY(0); } }
.hop { animation: hop .7s ease-out !important; }
@keyframes hop { 0% { transform: translateY(0); } 35% { transform: translateY(-3vh) scale(1.02); } 70% { transform: translateY(0) scale(1.03, .97); } 100% { transform: translateY(0); } }

/* ---------- Overlays ---------- */
.overlay { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; background: rgba(4,7,16,.72); }
.overlay.show { display: flex; animation: fadeIn .3s; }
.card { position: relative; width: min(64vh, 86vw); padding: 4vh 4vh 3.4vh; border-radius: 3vh; background: linear-gradient(180deg, #18213f, #0b1020); border: 3px solid var(--line); text-align: center; box-shadow: 0 2vh 6vh rgba(0,0,0,.6); }
.card.wide { width: min(80vh, 92vw); text-align: left; }
.card h2 { margin: 0 0 1.4vh; font-family: 'Bangers', sans-serif; font-weight: 400; font-size: 5.4vh; letter-spacing: .04em; color: var(--gold); }
.card p { margin: 0 0 2.4vh; font-size: 2.5vh; line-height: 1.35; color: var(--ink); }
.card .err { color: #ff8a7a; font-size: 2.2vh; margin: 2vh 0 0; }
.card-dino { height: 16vh; margin-top: -10vh; animation: bob 2.8s ease-in-out infinite; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 2vh; padding: 1.4vh 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 2.5vh; }
.row.col { flex-direction: column; align-items: stretch; }
.row.btns { border: 0; padding-top: 2vh; }
.row input[type=checkbox] { width: 3.6vh; height: 3.6vh; accent-color: var(--green); }
.row input[type=range] { width: 100%; accent-color: var(--gold); height: 4vh; }
.note-small { font-size: 2vh !important; color: var(--muted) !important; margin: 1vh 0 !important; }
.stats { font-size: 2.2vh; color: var(--ink); margin: 1.4vh 0; line-height: 1.6; }
.small-btn { padding: 1.4vh 2.6vh; border-radius: 1.6vh; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); font-size: 2.4vh; }
.small-btn.danger { border-color: rgba(229,55,47,.6); color: #ff8a7a; }

.celebrate { background: radial-gradient(ellipse at 40% 45%, rgba(58,42,8,.97), rgba(4,7,16,.98) 70%); flex-direction: row; gap: 2vw; padding: 0 3vw; }
.win-stage { position: relative; height: 70vh; width: min(78vh, 50vw); flex: none; }
.win-faris { position: absolute; left: 0; bottom: 0; height: 100%; transform-origin: 50% 100%; }
.win-dino { position: absolute; right: 0; bottom: 0; height: 34vh; animation: cheer 1.1s ease-in-out infinite; }
.overlay.show .win-faris { animation: winJump 1.6s cubic-bezier(.3,1.3,.5,1) both; }
@keyframes winJump { 0% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.05, .92); } 45% { transform: translateY(-12vh) scale(.97, 1.05); } 75% { transform: translateY(0) scale(1.06, .94); } 100% { transform: translateY(0) scale(1); } }
.win-text { max-width: 44vw; }
.win-text h2 { margin: 0; font-family: 'Bangers', sans-serif; font-weight: 400; font-size: min(10vh, 6.4vw); line-height: .95; letter-spacing: .03em;
  background: linear-gradient(#fff3a8, var(--gold) 50%, var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #3a1a00;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)); }
.star-earned { display: flex; align-items: center; gap: 1vh; font-size: 4vh; color: var(--gold); margin: 2vh 0 3vh; }
.star-earned svg { width: 6vh; height: 6vh; fill: var(--gold); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.win-btns { display: flex; gap: 2vh; }
.win-btns .big-btn { width: auto; min-width: 20vh; justify-content: center; white-space: nowrap; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -5vh; width: 1.6vh; height: 2.6vh; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx, 0), 115vh) rotate(var(--r, 540deg)); } }

.rotate-hint { position: absolute; inset: 0; z-index: 99; display: none; align-items: center; justify-content: center; background: var(--night); text-align: center; font-size: 3vh; }
.rotate-hint svg { width: 12vh; height: 12vh; fill: var(--gold); animation: turn 2s ease-in-out infinite; }
@keyframes turn { 0%,30% { transform: rotate(0); } 60%,100% { transform: rotate(90deg); } }
@media (orientation: portrait) and (max-width: 1100px) { .rotate-hint { display: flex; } }

/* weniger Bewegung */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.reduce-motion .fireflies, .reduce-motion .mist { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fireflies, .mist { display: none; }
  .bg, .hero, .dino, .tuner-faris { animation: none !important; }
}
#screen-tuner:has(#win-overlay.show) .tuner-main,
#screen-tuner:has(#win-overlay.show) .tuner-bottom { visibility: hidden; }

/* ---------- Logo im Menü ---------- */
.logo-img { height: 25vh; width: auto; margin: -1.5vh 0 0 -1.5vw; filter: drop-shadow(0 1vh 2vh rgba(0,0,0,.5)); animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-.6vh) rotate(0deg); } }

/* ---------- Intro ---------- */
#screen-intro { background: #02040b; }
.intro-bg { position: absolute; inset: -3%; background: url(../assets/bg-intro.jpg) center/cover; opacity: .9; }
.intro-moon { position: absolute; left: 50%; top: 30%; width: 46vh; height: 46vh; margin: -23vh 0 0 -23vh; border-radius: 50%;
  background: radial-gradient(circle, rgba(225,235,255,.95) 0 34%, rgba(150,180,255,.35) 46%, transparent 70%); opacity: 0; transform: translateY(18vh) scale(.8); }
.intro-swords { position: absolute; left: 50%; top: 46%; width: 0; height: 0; }
.katana { position: absolute; width: 7.5vh; height: 75vh; left: -3.75vh; top: -37.5vh; opacity: 0; filter: drop-shadow(0 0 1.5vh rgba(150,255,170,.35)); }
.katana .kb { fill: #dfe6ef; } .katana .ke { fill: #ffffff; opacity: .8; }
.katana .kg { fill: #e0a82a; stroke: #6b4a08; stroke-width: 1; } .katana .kh { fill: #141414; }
.katana .kw { stroke: #e0a82a; stroke-width: 2.4; }
.k-left { transform: translate(-90vw, -70vh) rotate(-60deg); }
.k-right { transform: translate(90vw, -70vh) rotate(60deg); }
.intro-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.3); }
.intro-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.intro-embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.intro-embers i { position: absolute; bottom: -2vh; width: .8vh; height: .8vh; border-radius: 50%; background: #ffcf5a; box-shadow: 0 0 1.2vh .3vh rgba(255,160,40,.9); animation: ember linear infinite; }
.intro-embers i.g { background: #8dff9a; box-shadow: 0 0 1.2vh .3vh rgba(60,255,110,.8); }
@keyframes ember { from { transform: translate(0,0); opacity: 0; } 10% { opacity: 1; } to { transform: translate(var(--dx), -105vh); opacity: 0; } }
.intro-start { position: absolute; left: 50%; top: 50%; width: 22vh; height: 22vh; margin: -11vh 0 0 -11vh; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a5a2a, #10200c 70%); border: .6vh solid var(--gold); display: grid; place-items: center;
  box-shadow: 0 0 5vh rgba(255,201,60,.5); animation: glow 1.8s ease-in-out infinite; }
.intro-start svg { width: 10vh; height: 10vh; fill: var(--gold); margin-left: 1.4vh; }
.intro-hint { position: absolute; left: 0; right: 0; bottom: 14vh; margin: 0; text-align: center; font-family: 'Bangers', sans-serif; font-size: 5vh; letter-spacing: .06em; color: var(--gold); text-shadow: 0 4px 0 #000; }

#screen-intro.go .intro-start { display: none; }
#screen-intro.go .intro-hint { opacity: 0; }
#screen-intro.go .intro-moon { animation: moonRise 1.4s ease-out forwards; }
@keyframes moonRise { to { opacity: 1; transform: translateY(0) scale(1); } }
#screen-intro.go .k-left { animation: flyL var(--fly, 1.25s) cubic-bezier(.55,0,.9,.5) forwards; }
#screen-intro.go .k-right { animation: flyR var(--fly, 1.25s) cubic-bezier(.55,0,.9,.5) forwards; }
@keyframes flyL { 0% { opacity: 1; transform: translate(-90vw, -70vh) rotate(-260deg); } 100% { opacity: 1; transform: translate(0,0) rotate(140deg); } }
@keyframes flyR { 0% { opacity: 1; transform: translate(90vw, -70vh) rotate(260deg); } 100% { opacity: 1; transform: translate(0,0) rotate(-140deg); } }
#screen-intro.recoil .k-left { animation: recoilL var(--recoil, .5s) ease-in-out forwards; }
#screen-intro.recoil .k-right { animation: recoilR var(--recoil, .5s) ease-in-out forwards; }
@keyframes recoilL { 0% { opacity: 1; transform: translate(0,0) rotate(140deg); } 55% { opacity: 1; transform: translate(-14vh,-4vh) rotate(120deg); } 100% { opacity: 1; transform: translate(0,0) rotate(140deg); } }
@keyframes recoilR { 0% { opacity: 1; transform: translate(0,0) rotate(-140deg); } 55% { opacity: 1; transform: translate(14vh,-4vh) rotate(-120deg); } 100% { opacity: 1; transform: translate(0,0) rotate(-140deg); } }
#screen-intro.hold .katana { animation: none; }
#screen-intro.hold .k-left { opacity: 1; transform: translate(0,0) rotate(140deg); }
#screen-intro.hold .k-right { opacity: 1; transform: translate(0,0) rotate(-140deg); }
.intro-flash.pop { animation: flash .35s ease-out; }
.intro-flash.big { animation: flash 1s ease-out; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%,90% { transform: translate(-.4vh, .2vh); } 20%,80% { transform: translate(.8vh, -.4vh); } 30%,50%,70% { transform: translate(-1.2vh, .6vh); } 40%,60% { transform: translate(1.2vh, -.6vh); } }
#screen-intro.reveal .katana { animation: none; opacity: 0; transition: opacity .3s; }
#screen-intro.reveal .intro-logo { animation: logoIn 1.1s cubic-bezier(.2,1.4,.4,1) forwards, logoGlow 2.6s ease-in-out 1.1s infinite; }
@keyframes logoIn { 0% { opacity: 0; transform: scale(1.45); } 35% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes logoGlow { 0%,100% { filter: brightness(1); transform: scale(1); } 50% { filter: brightness(1.12) saturate(1.1); transform: scale(1.015); } }
#screen-intro.reveal .intro-moon { opacity: 0; transition: opacity .4s; }
#screen-intro.ready .intro-hint { opacity: 1; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
#mic-overlay { top: 12vh; background: linear-gradient(rgba(4,7,16,0), rgba(4,7,16,.72) 6vh); }
#screen-intro.ready .intro-hint { bottom: 3vh; font-size: 4vh; }
#screen-intro.reveal .intro-hint { background: rgba(0,0,0,.55); padding: 1vh 0; }

/* ---------- Intro v4: langsamer, Mond gelb von unten ---------- */
.intro-moon { background: radial-gradient(circle, rgba(255,236,170,.97) 0 33%, rgba(255,205,90,.38) 47%, rgba(255,180,60,0) 72%); transform: translateY(55vh) scale(.85); }
#screen-intro.go .intro-moon { animation: moonRise var(--moon, 3s) cubic-bezier(.25,.6,.3,1) forwards; }
#screen-intro.go .k-left { animation: flyL var(--fly, 1.8s) cubic-bezier(.5,0,.85,.55) var(--flyDelay, 3s) both; }
#screen-intro.go .k-right { animation: flyR var(--fly, 1.8s) cubic-bezier(.5,0,.85,.55) var(--flyDelay, 3s) both; }
#screen-intro.recoil .k-left, #screen-intro.recoil .k-right { animation-delay: 0s; }
#screen-intro.reveal .intro-moon { opacity: 1; transition: opacity 1.8s; }
#screen-intro.reveal .intro-logo { animation: logoIn2 2.4s cubic-bezier(.2,1,.35,1) forwards, logoGlow 3s ease-in-out 2.4s infinite; }
@keyframes logoIn2 { 0% { opacity: 0; transform: scale(1.5); filter: blur(12px) brightness(2); } 40% { opacity: 1; filter: blur(2px) brightness(1.4); } 100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); } }
.intro-shine { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 48%, rgba(255,230,150,.35) 52%, transparent 65%);
  background-size: 250% 100%; mix-blend-mode: screen; }
#screen-intro.shine .intro-shine { animation: shineSweep 1.6s ease-in-out forwards; }
@keyframes shineSweep { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -60% 0; } }

/* ---------- Intro v5: echter Mond, Schrift Buchstabe für Buchstabe ---------- */
.intro-moon { background: none; border-radius: 50%; width: 48vh; height: 48vh; margin: -24vh 0 0 -24vh; top: 32%;
  filter: drop-shadow(0 0 5vh rgba(255,244,215,.35)) drop-shadow(0 0 12vh rgba(200,215,255,.18)); transform: translateY(75vh) scale(.92); opacity: 0; }
@keyframes moonRise { 0% { opacity: 0; transform: translateY(75vh) scale(.92); } 25% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1); } }
#screen-intro.go .intro-moon { animation: moonRise var(--moon, 4s) cubic-bezier(.3,.55,.25,1) forwards; }
.intro-swords { top: 50%; }
.intro-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; line-height: .86; }
.intro-title span { display: inline-block; font-family: 'Bangers', sans-serif; opacity: 0; transform-origin: 50% 60%; }
.t-ninja span { font-size: 19vh; letter-spacing: .02em;
  background: linear-gradient(180deg, #ffffff 0%, #dfe6ef 35%, #8f9aad 55%, #e9eef5 75%, #7d889b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .5vh #0d1018;
  filter: drop-shadow(0 .8vh 0 rgba(0,0,0,.75)) drop-shadow(0 0 2vh rgba(120,255,150,.35)); }
.t-rock { margin-top: -1vh; }
.t-rock span { font-size: 24vh; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff6b0 0%, #ffd23c 30%, #ff9a1c 60%, #ffcf4a 78%, #c45a0a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .55vh #2a1200;
  filter: drop-shadow(0 .9vh 0 rgba(0,0,0,.75)) drop-shadow(0 0 2.5vh rgba(255,170,40,.5)); }
.intro-title span.in { animation: letterIn .55s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes letterIn {
  0% { opacity: 0; transform: translate(var(--lx), var(--ly)) rotate(var(--lr)) scale(2.4); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translate(0,0) rotate(0) scale(1) skewX(-8deg); }
}
.intro-title span.slam { animation: letterSlam .5s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes letterSlam { 0% { opacity: 0; transform: translateY(-40vh) scale(1.6) skewX(-8deg); } 55% { opacity: 1; transform: translateY(1vh) scale(1.08, .92) skewX(-8deg); } 100% { opacity: 1; transform: translateY(0) scale(1) skewX(-8deg); } }
.intro-title.pulse { animation: titlePulse 1.4s ease-in-out infinite; }
@keyframes titlePulse { 0%,100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.02); } }
#screen-intro.reveal .intro-title { opacity: 0; transition: opacity 1.2s; }
#screen-intro.reveal .intro-moon { opacity: 0 !important; transition: opacity 1.2s; }
/* Intro zurück auf schnell: Logo knallt auf einmal rein */
#screen-intro.reveal .intro-logo { animation: logoIn 1.1s cubic-bezier(.2,1.4,.4,1) forwards, logoGlow 2.6s ease-in-out 1.1s infinite; }
.intro-title { display: none; }
/* Intro: nur das Logo – keine Schwerter, kein Mond */
.intro-swords, .intro-moon, .intro-title, .intro-shine, .intro-embers { display: none !important; }
/* ---------- Intro v6: Logo fliegt heran, Mond steigt dahinter auf ---------- */
#screen-intro .intro-moon.x, #screen-intro .intro-embers.x { display: block !important; }
.intro-badge { position: absolute; left: 50%; top: 52%; height: 74vh; width: auto; transform: translate(-50%,-50%) scale(.02); opacity: 0; filter: blur(8px); }
#screen-intro.fly .intro-badge { animation: badgeFly 2.16s cubic-bezier(.55,0,.75,.4) forwards; }
@keyframes badgeFly { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.02) rotate(-25deg); filter: blur(8px) brightness(.6); } 25% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%,-50%) scale(1.05) rotate(0); filter: blur(0) brightness(1); } }
#screen-intro.open .intro-badge { animation: badgeOpen 1.1s cubic-bezier(.2,1.6,.4,1) forwards, badgeGlow 3s ease-in-out 1.1s infinite; }
@keyframes badgeOpen { 0% { transform: translate(-50%,-50%) scale(1.05); filter: brightness(2.2); opacity: 1; } 35% { transform: translate(-50%,-50%) scale(1.14); } 100% { transform: translate(-50%,-50%) scale(1); filter: brightness(1); opacity: 1; } }
@keyframes badgeGlow { 0%,100% { transform: translate(-50%,-50%) scale(1); filter: brightness(1) drop-shadow(0 0 2vh rgba(255,200,80,.3)); } 50% { transform: translate(-50%,-50%) scale(1.02); filter: brightness(1.1) drop-shadow(0 0 4vh rgba(255,200,80,.5)); } }
#screen-intro .intro-moon.x { top: 21%; width: 44vh; height: 44vh; margin: -22vh 0 0 -22vh; opacity: 0; transform: translateY(45vh) scale(.9); animation: none; }
#screen-intro.moonup .intro-moon.x { animation: moonBehind 3.2s cubic-bezier(.3,.6,.3,1) forwards; }
@keyframes moonBehind { 0% { opacity: 0; transform: translateY(45vh) scale(.9); } 20% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1); } }
#screen-intro .intro-logo { display: none; }
#screen-intro.fly:not(.ready) .intro-hint { opacity: 0; }
/* Musik-Knopf */
#btn-music svg { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#btn-music .ico-off { display: none; }
#btn-music.off .ico-on { display: none; }
#btn-music.off .ico-off { display: block; stroke: var(--muted); }
#btn-music.off .slash { stroke: #ff6b5e; stroke-width: 2.6; }
