@font-face { font-family: 'Gabarito'; src: url('./fonts/gabarito.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
:root { --ink: #2a1638; --cream: #fff4ea; --pink: #ff5fa2; --pink2: #d63a7f; --wood: #c98a4b; --gold: #ffc21a; --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: 'Gabarito', system-ui, sans-serif; color: var(--ink); background: linear-gradient(180deg, #8f74d6 0%, #d98bb8 34%, #ffb59a 62%, #ffd9a6 82%, #ffe9cf 100%); overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

.btn { border: 3px solid var(--ink); border-radius: 16px; padding: 12px 20px; font-weight: 800; font-size: 18px; min-height: 52px; background: #fff; box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .seg button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn.primary { background: var(--pink); color: #fff; }
.btn.big { font-size: 22px; min-height: 60px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }
.btn.icon { width: 46px; height: 46px; min-height: 46px; padding: 0; display: grid; place-items: center; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.btn.icon svg { width: 22px; height: 22px; fill: currentColor; }

/* Menü */
.menu { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + var(--sb)); }
.back { position: absolute; top: calc(12px + var(--st)); left: 14px; color: var(--ink); font-weight: 800; text-decoration: none; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; box-shadow: 0 3px 0 var(--ink); }
.panel { width: min(460px, 100%); background: var(--cream); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 9px 0 var(--ink); padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 90px); max-height: calc(100dvh - 78px); overflow-y: auto; }
#start { position: sticky; bottom: 0; z-index: 1; }
.kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--pink2); }
h1 { font-size: clamp(44px, 12vw, 70px); line-height: .9; font-weight: 900; letter-spacing: -.02em; }
h1 span { color: var(--pink); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.lead { font-size: 17px; line-height: 1.4; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.opt > span { font-weight: 800; }
.seg { display: inline-flex; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 9px 13px; font-weight: 800; font-size: 15px; min-height: 42px; min-width: 42px; }
.seg button + button { border-left: 3px solid var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }
.ctrl { list-style: none; margin: 0; padding: 10px 12px; background: #fff; border: 2px dashed #c9a6c6; border-radius: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.35; }
.ctrl li { display: flex; gap: 8px; align-items: baseline; }
.ctrl b { flex: 0 0 auto; }
.ctrl i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); flex: 0 0 auto; transform: translateY(1px); }
@media (min-width: 900px) {
  .menu { justify-content: flex-start; align-items: center; padding-left: 6vw; }
}

/* HUD */
.hud { position: fixed; inset: 0; pointer-events: none; }
.scores { list-style: none; margin: 0; padding: calc(10px + var(--st)) 120px 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.scores li { display: flex; align-items: center; gap: 7px; background: var(--cream); border: 3px solid var(--ink); border-radius: 14px; padding: 5px 10px; font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 var(--ink); transition: opacity .3s, transform .3s; }
.scores li.out { opacity: .45; transform: scale(.94); }
.scores .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.scores .bot { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #8a6c8c; }
.scores .pips { display: flex; gap: 3px; }
.scores .pips i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.scores .pips i.on { background: var(--gold); }
.hud-btns { position: absolute; top: calc(10px + var(--st)); right: 12px; display: flex; gap: 8px; pointer-events: auto; }
.banner { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); font-size: clamp(44px, 11vw, 96px); font-weight: 900; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); white-space: nowrap; text-align: center; opacity: 0; transition: opacity .2s; }
.banner.show { opacity: 1; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.banner.small { font-size: clamp(28px, 7vw, 56px); white-space: normal; width: min(90vw, 760px); line-height: 1.05; }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.3) } 100% { transform: translate(-50%, -50%) scale(1) } }
.toast { position: absolute; left: 50%; bottom: calc(24px + var(--sb)); transform: translateX(-50%); background: var(--ink); color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 12px; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.toast.show { opacity: 1; }
.touch-on .toast { bottom: calc(150px + var(--sb)); }

/* Touch */
.touch { position: fixed; inset: 0; pointer-events: none; }
.stick { position: absolute; left: 0; top: 0; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(255, 255, 255, .28); border: 3px solid rgba(42, 22, 56, .5); opacity: 0; transition: opacity .15s; }
.stick.on { opacity: 1; }
.knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--cream); border: 3px solid var(--ink); }
.dash { position: absolute; right: calc(22px + env(safe-area-inset-right, 0px)); bottom: calc(28px + var(--sb)); width: 104px; height: 104px; border-radius: 50%; background: var(--pink); color: #fff; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); font-weight: 900; font-size: 22px; pointer-events: auto; touch-action: none; }
.dash:active, .dash.hit { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.dash.cool { filter: saturate(.3) brightness(.95); }

/* Bögen */
.sheet { position: fixed; inset: 0; background: rgba(42, 22, 56, .45); display: grid; place-items: center; padding: 18px; }
.card { background: var(--cream); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); padding: 22px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.card h2 { font-size: 32px; font-weight: 900; }
.hint { color: #5c4867; }
.winner { font-size: clamp(48px, 13vw, 76px) !important; line-height: 1; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); }
.ranking { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ranking li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 7px 12px; font-weight: 800; }
.ranking .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); margin-right: 8px; vertical-align: -1px; }

@media (prefers-reduced-motion: reduce) { .banner.show { animation: none; } }
@media (max-width: 600px) {
  .scores { padding-right: 112px; gap: 6px; }
  .scores li { font-size: 13px; padding: 4px 8px; gap: 5px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
  .scores .bot { display: none; }
  .scores .dot { width: 13px; height: 13px; }
  .scores .pips i { width: 7px; height: 7px; }
}

.legal { font-size: 13px; color: #6d5a78; margin-top: 2px; }
.legal a { color: inherit; }
.legal a[data-consent-settings]::before { content: '·'; margin: 0 .4em; display: inline-block; }

@media (max-width: 600px) and (max-height: 760px) {
  .menu { padding-top: 64px; }
  .panel { gap: 10px; padding: 16px 16px 18px; border-radius: 22px; }
  h1 { font-size: 46px; }
  .lead { font-size: 15px; }
  .ctrl { font-size: 13px; padding: 8px 10px; }
  .seg button { min-height: 40px; padding: 8px 11px; }
}
@media (max-width: 600px) and (max-height: 680px) { .lead { display: none; } }
