@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
:root { --bg: #1b2148; --fg: #fff; --muted: #c4cbe6; --pink: #ff3d7f; --gold: #ffc81a; --cyan: #3dd6ff; --green: #3dffb5; --violet: #7b5cff; --card: rgba(20, 24, 56, .88); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body { font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif; }
#app { position: fixed; inset: 0; }
#screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; }
.st { width: 1em; height: 1em; fill: rgba(255,255,255,.22); vertical-align: -0.12em; }
.st.on { fill: var(--gold); filter: drop-shadow(0 1px 0 #a86a00); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
#bPause, #bRetry { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 10px; width: 46px; height: 46px; border-radius: 14px; border: 2px solid rgba(255,255,255,.55); background: rgba(20,24,56,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
#bRetry { left: 64px; }
#hLevel { position: absolute; top: calc(env(safe-area-inset-top) + 18px); left: 122px; right: 130px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,.4); pointer-events: none !important; }
#hTime { position: absolute; top: calc(env(safe-area-inset-top) + 10px); right: 14px; font-size: 28px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0,0,0,.45); pointer-events: none !important; }
#hCoins { position: absolute; top: calc(env(safe-area-inset-top) + 48px); right: 14px; display: flex; gap: 5px; pointer-events: none !important; }
#hCoins i { width: 18px; height: 18px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.6); }
#hCoins i.old { border: 2px solid rgba(255,200,26,.6); }
#hCoins i.on { border: 2px solid #a86a00; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: pop .3s 2 alternate; }
@keyframes pop { to { transform: scale(1.18); } }
.pedal { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 18px); width: min(28vw, 128px); height: min(28vw, 128px); border-radius: 26px; border: 3px solid rgba(255,255,255,.7); background: rgba(20,24,56,.45); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 700 14px "Space Grotesk", sans-serif; touch-action: none; cursor: pointer; }
.pedal svg { width: 46%; height: 46%; }
#pBack { left: 16px; }
#pGas { right: 16px; background: rgba(61,200,120,.5); }
.pedal.on { transform: scale(.94); background: rgba(255,255,255,.5); }
@media (hover: hover) and (pointer: fine) { .pedal { opacity: .45; width: 96px; height: 96px; } }
#hint { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 84px); transform: translate(-50%, -8px); width: min(88vw, 460px); text-align: center; font-size: 18px; padding: 10px 14px; border-radius: 16px; background: rgba(20,24,56,.78); border: 2px solid var(--gold); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none !important; }
#hint.show { opacity: 1; transform: translate(-50%, 0); }
#flash { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%) scale(.6); font-size: clamp(36px, 9vw, 64px); color: #fff; -webkit-text-stroke: 2px #2a0f3a; text-shadow: 0 5px 0 rgba(0,0,0,.35); opacity: 0; pointer-events: none; z-index: 20; white-space: nowrap; }
#flash.show { animation: fl .9s ease forwards; }
@keyframes fl { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-6deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(3deg); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }

/* ---------- Bildschirme ---------- */
#ui { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.scr { pointer-events: auto; position: absolute; inset: 0; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 58px) 16px calc(env(safe-area-inset-bottom) + 70px); display: flex; flex-direction: column; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(10,14,40,.55), rgba(10,14,40,.82)); touch-action: pan-y; }
.scr > * { width: 100%; max-width: 520px; }
.scr.title { justify-content: flex-end; background: linear-gradient(180deg, rgba(10,14,40,0) 30%, rgba(10,14,40,.75) 75%); padding-bottom: calc(env(safe-area-inset-bottom) + 64px); }
.scr.run { display: none; }
.scr.revive { justify-content: center; background: rgba(10,14,40,.45); }
.bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 999px; background: rgba(10,14,34,.7); border: 1.5px solid rgba(255,255,255,.2); font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.pill.mult { color: var(--gold); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .86; font-size: clamp(54px, 16vw, 92px); letter-spacing: -.02em; transform: skew(-8deg) rotate(-3deg); margin: 6px 0 0; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.logo span { background: linear-gradient(180deg, #fff 0%, #ffe680 40%, var(--gold) 55%, #ff7a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #2a0f3a; }
.logo span + span { background: linear-gradient(180deg, #fff 0%, #8ff0ff 40%, var(--cyan) 55%, var(--violet) 100%); -webkit-background-clip: text; background-clip: text; font-size: .78em; margin-left: .6em; }
.claim { text-align: center; margin: 0; color: var(--muted); font-size: 16px; }
.best { text-align: center; margin: 0; color: var(--muted); font-size: 15px; }
.best b { color: var(--gold); }
h2 { margin: 4px 0; text-align: center; font-size: 28px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
h3 { margin: 0 0 8px; font-size: 17px; }
h3 small { color: var(--muted); font-weight: 700; font-size: 13px; }
.card { background: var(--card); border: 1.5px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.card.center { text-align: center; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.btn { appearance: none; border: 0; border-radius: 16px; padding: 13px 16px; font: 700 17px/1.1 "Space Grotesk", sans-serif; color: #fff; background: linear-gradient(180deg, #4a5296, #2e3470); box-shadow: 0 4px 0 #1b1f4a, 0 8px 18px rgba(0,0,0,.25); cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b1f4a; }
.btn.big { font-size: 26px; padding: 18px; letter-spacing: .04em; background: linear-gradient(180deg, #ff6b9a, var(--pink) 50%, #d81e5f); box-shadow: 0 5px 0 #8e0f3c, 0 10px 26px rgba(255,61,127,.4); }
.btn.big:active { box-shadow: 0 1px 0 #8e0f3c; }
.btn.small { font-size: 15px; padding: 9px 12px; border-radius: 12px; width: auto; }
.btn.buy { background: linear-gradient(180deg, #ffd84a, #f0a800); color: #3a2400; box-shadow: 0 3px 0 #9a6a00; }
.btn[disabled] { opacity: .45; filter: grayscale(.5); cursor: default; }
.btn small { color: var(--gold); }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 700 15px "Space Grotesk", sans-serif; text-decoration: underline; cursor: pointer; padding: 6px; }
.missions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.missions li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; font-size: 15px; }
.missions .chk { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; color: #10162e; font-size: 15px; }
.missions li.ok .chk { background: var(--green); border-color: var(--green); }
.missions li.ok .mt { color: var(--green); }
.missions .mbar { grid-column: 2; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.missions .mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.missions small { grid-row: 1 / span 2; grid-column: 3; color: var(--muted); font-size: 13px; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0; }
.result { text-align: center; }
.rec { color: var(--gold); font-size: 20px; letter-spacing: .06em; animation: pop .5s infinite alternate; }
.big-score { font-size: 54px; line-height: 1.05; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.stats { display: flex; justify-content: center; gap: 16px; color: var(--muted); font-size: 16px; flex-wrap: wrap; }
.up { text-align: center; padding: 10px; border-radius: 14px; background: linear-gradient(90deg, rgba(61,255,181,.25), rgba(61,214,255,.25)); border: 1.5px solid var(--green); }
.tabs { display: flex; gap: 6px; }
.tab { flex: 1; appearance: none; border: 1.5px solid rgba(255,255,255,.2); background: rgba(10,14,34,.6); color: var(--muted); border-radius: 12px; padding: 9px 6px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; }
.tab.on { background: var(--violet); color: #fff; border-color: #fff; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.04); }
.item.sel { outline: 2px solid var(--green); }
.it { display: flex; flex-direction: column; gap: 2px; }
.it small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.sw { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--b) 0 34%, var(--a) 34% 100%); border: 2px solid rgba(255,255,255,.4); }
.pwic { width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #111; display: grid; place-items: center; font-size: 20px; box-shadow: 0 0 14px var(--c); }
.dots { display: flex; gap: 4px; margin-top: 3px; }
.dots i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.dots i.on { background: var(--green); }
.tag { font-size: 13px; color: var(--green); padding: 0 6px; }
.sl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 15px; }
.sl input { width: 100%; accent-color: var(--pink); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; appearance: none; border: 1.5px solid rgba(255,255,255,.2); background: rgba(10,14,34,.6); color: var(--muted); border-radius: 10px; padding: 8px 4px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; }
.seg button.on { background: var(--pink); color: #fff; }
.help p, .help li { font-size: 15px; line-height: 1.45; color: #e6e9f7; }
.help ul { padding-left: 18px; margin: 8px 0 0; }
.ring { position: relative; width: 96px; height: 96px; margin: 8px auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .bg { stroke: rgba(255,255,255,.15); }
.ring .fg { stroke: var(--gold); stroke-dasharray: 276; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; }
.noscript { padding: 20px; }
@media (min-height: 760px) { .scr.title { padding-bottom: calc(env(safe-area-inset-bottom) + 90px); } }
@media (orientation: landscape) and (max-height: 520px) {
  .scr { padding-top: 12px; gap: 8px; }
  .logo { font-size: 48px; }
  .scr.title { justify-content: center; }
  .btn.big { padding: 12px; font-size: 22px; }
  #hint { top: 20%; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { #hMult.hot, .rec, #btnBoard.on { animation: none; } }

.card.center .btn { display: block; width: 100%; margin-top: 6px; }
.card.center .link { display: block; margin: 8px auto 0; }
@media (min-aspect-ratio: 6/5) and (min-width: 700px) {
  .scr.title { align-items: flex-end; justify-content: center; padding-right: max(5vw, 24px); background: linear-gradient(90deg, rgba(10,14,40,0) 30%, rgba(10,14,40,.78) 68%); }
  .scr.title > * { max-width: 460px; }
}

.scr.title { justify-content: center; background: linear-gradient(180deg, rgba(20,24,56,.05), rgba(20,24,56,.55)); }
.scr.win { justify-content: center; background: rgba(20,24,56,.25); }
.logo span { background: linear-gradient(180deg, #fff 0%, #ffe680 40%, var(--gold) 55%, #ff7a1a 100%); -webkit-background-clip: text; background-clip: text; }
.logo span + span { background: linear-gradient(180deg, #fff 0%, #ffb0cc 40%, var(--pink) 60%, #b0145a 100%); -webkit-background-clip: text; background-clip: text; margin-left: .5em; font-size: 1em; }
.logo { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: skew(-8deg) rotate(-1deg) translateY(-6px); } }
.claim { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.win { text-align: center; }
.wtitle { font-size: 34px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.stars.big { display: flex; justify-content: center; gap: 6px; margin: 6px 0; }
.stars.big .st { width: 64px; height: 64px; }
.stars.big .sx { animation: starIn .45s var(--d) both cubic-bezier(.3,1.6,.5,1); }
.stars.big .sx:nth-child(2) .st { width: 80px; height: 80px; margin-top: -10px; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.wtime { font-size: 44px; font-variant-numeric: tabular-nums; }
.wsub { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.nb { color: var(--green); }
.wrew { font-size: 20px; color: var(--gold); margin: 0 0 10px; }
.win .btn { width: 100%; margin-top: 8px; }
.win .row .btn { margin-top: 8px; }
h3.th { margin: 10px 0 6px; font-size: 15px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lv { appearance: none; border: 0; border-radius: 14px; aspect-ratio: 1 / 1; color: #fff; font: 700 20px "Space Grotesk", sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.lv.th0 { background: linear-gradient(180deg, #6fd06a, #3d9a26); }
.lv.th1 { background: linear-gradient(180deg, #ffa860, #c9632e); }
.lv.th2 { background: linear-gradient(180deg, #7d9cf0, #3c4878); }
.lv.lock { filter: grayscale(.8) brightness(.6); cursor: default; }
.lv .stars { display: flex; gap: 1px; font-size: 11px; }
.lv .lk { font-size: 14px; }
.lv:active:not(.lock) { transform: translateY(2px); }
.cv { width: 92px; height: 54px; border-radius: 10px; background: linear-gradient(180deg, #5ec8ff, #c8f0ff 70%, #5ccf3a 70%); }
.item { grid-template-columns: 92px 1fr auto; }
.stats { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.cs { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.cs i { display: inline-block; width: 34px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--green) calc(var(--v) * 100%), rgba(255,255,255,.18) 0); }
.scr.win { justify-content: flex-start; }
.scr.win > .card { margin: auto 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .stars.big .st { width: 40px; height: 40px; } .stars.big .sx:nth-child(2) .st { width: 50px; height: 50px; margin-top: -6px; }
  .wtitle { font-size: 24px; } .wtime { font-size: 30px; } .wsub { margin: 2px 0 4px; }
  .win .btn.big { padding: 10px; font-size: 20px; }
  .pedal { width: 92px; height: 92px; }
}
