@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: #1b1433; --bg2: #2b1f52; --fg: #fff; --muted: #c9c0ea; --pink: #ff4f8b; --gold: #ffc83d; --cyan: #44d4ff; --dauer: 115ms; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(ellipse at 50% 0%, #3a2a74, var(--bg) 70%) fixed; background-color: var(--bg); color: var(--fg); overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif; }
body.playing { overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
#app { min-height: 100%; }
#ui { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top) + 56px) 14px calc(env(safe-area-inset-bottom) + 70px); }
#ui > * { width: 100%; max-width: 560px; }
body.playing #ui { padding-top: calc(env(safe-area-inset-top) + 10px); padding-bottom: 10px; min-height: 100dvh; justify-content: center; }
.hidden { display: none !important; }
.noscript { padding: 20px; }

/* Logo & Menü */
.logo { display: flex; flex-direction: column; align-items: center; line-height: .85; transform: rotate(-3deg); margin: 6px 0 2px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.3)); }
.logo span { font-size: clamp(48px, 15vw, 84px); letter-spacing: -.02em; background: linear-gradient(180deg, #fff, #ffe08a 45%, #ff9a3d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #3a1a4a; }
.logo .l2 { background: linear-gradient(180deg, #fff, #9fe8ff 45%, #7a6cff 100%); -webkit-background-clip: text; background-clip: text; margin-left: .5em; font-size: clamp(40px, 12.5vw, 70px); }
.claim { text-align: center; color: var(--muted); margin: 0; }
.karten { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .karten { grid-template-columns: 1fr 1fr; } }
.karte { appearance: none; border: 0; cursor: pointer; display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 18px; color: #fff; font: inherit; background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border: 1.5px solid rgba(255,255,255,.16); box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .12s; }
.karte:hover, .karte:focus-visible { transform: translateY(-2px); border-color: var(--gold); outline: none; }
.ksym { width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; background: linear-gradient(135deg, #ff9a3d, #ff4f8b); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.k-tag .ksym { background: linear-gradient(135deg, #44d4ff, #7a6cff); font-size: 28px; }
.k-zeit .ksym { background: linear-gradient(135deg, #ff4f8b, #b44dff); font-size: 30px; }
.k-gross .ksym { background: linear-gradient(135deg, #3fd37a, #22a7b0); }
.k-klein .ksym { background: linear-gradient(135deg, #ffc83d, #ff8a3d); color: #4a2a00; }
.ksym.natur { background: linear-gradient(180deg, #8fd3ff, #d7f0ff); padding: 6px; }
.ksym svg { width: 100%; height: 100%; }
.kt { display: flex; flex-direction: column; gap: 2px; }
.kt b { font-size: 18px; }
.kt small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.kt em { font-style: normal; color: var(--gold); font-size: 13px; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.btn { appearance: none; border: 0; border-radius: 14px; padding: 12px 14px; font: 700 16px "Space Grotesk", sans-serif; color: #fff; background: linear-gradient(180deg, #5a4aa8, #3b2f7a); box-shadow: 0 4px 0 #23194d; cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #23194d; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.gross { font-size: 22px; padding: 14px 20px; background: linear-gradient(180deg, #ff7aa6, var(--pink) 55%, #d42a66); box-shadow: 0 5px 0 #8a1240; width: 100%; }
.btn.klein { padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 700 15px "Space Grotesk", sans-serif; text-decoration: underline; cursor: pointer; padding: 8px; }
h2 { text-align: center; margin: 4px 0; font-size: 28px; }
.card { background: rgba(20,14,44,.8); border: 1.5px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px 16px; }
.klein { font-size: 13px; color: var(--muted); }
.stat { width: 100%; border-collapse: collapse; font-size: 14px; }
.stat th, .stat td { padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,.1); text-align: right; }
.stat th { text-align: left; }
.stat thead td, .stat thead th { color: var(--muted); font-size: 12px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 14px; }
.seg { display: flex; gap: 6px; }
.seg button { appearance: none; border: 1.5px solid rgba(255,255,255,.2); background: rgba(10,6,30,.6); color: var(--muted); border-radius: 10px; padding: 8px 12px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; }
.seg button.on { background: var(--pink); color: #fff; }
.hilfe p, .hilfe li { line-height: 1.5; font-size: 15px; }
.hilfe ul { padding-left: 18px; }

/* Spiel */
.spiel { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.kopf { width: 100%; display: grid; grid-template-columns: 44px 1fr auto auto; gap: 8px; align-items: center; }
.ib { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(10,6,30,.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.titel { display: flex; flex-direction: column; min-width: 0; }
.titel b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titel small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box { position: relative; min-width: 76px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.1); text-align: center; }
.box small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.box b { font-size: 19px; font-variant-numeric: tabular-nums; }
#plus { position: absolute; left: 0; right: 0; top: 4px; font-style: normal; color: var(--gold); font-weight: 700; opacity: 0; pointer-events: none; }
#plus.an { animation: plus .7s ease-out; }
@keyframes plus { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-26px); } }
.leiste { width: 100%; display: flex; gap: 8px; align-items: center; }
.leiste .ziel, .leiste .uhr { flex: 1; color: var(--muted); font-size: 14px; }
.leiste .ziel b { color: var(--gold); }
.uhr { font-size: 22px !important; color: #fff !important; font-variant-numeric: tabular-nums; }
.tipp { color: var(--muted); font-size: 13px; margin: 0; text-align: center; }

.brett { position: relative; border-radius: 16px; background: #120c28; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.35); touch-action: none; }
.gitter { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), var(--z)); gap: var(--a); padding: var(--a); }
.zelle { border-radius: calc(var(--z) * .12); background: rgba(255,255,255,.07); width: var(--z); height: var(--z); }
.steine { position: absolute; inset: 0; }
.stein { position: absolute; left: 0; top: 0; width: var(--z); height: var(--z); transition: transform var(--dauer) ease-in-out; will-change: transform; }
.stein .in { width: 100%; height: 100%; border-radius: calc(var(--z) * .12); display: grid; place-items: center; background: var(--c); color: var(--t, #fff); box-shadow: inset 0 calc(var(--z) * -.05) 0 rgba(0,0,0,.18); }
.stein.pop .in { animation: pop calc(var(--dauer) * 1.6) ease-out; }
.stein.neu .in { animation: neu calc(var(--dauer) * 1.6) ease-out; }
@keyframes pop { 0% { transform: scale(.85); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes neu { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.zahl { font-size: calc(var(--z) * .46); line-height: 1; letter-spacing: -.02em; }
.zahl.l3 { font-size: calc(var(--z) * .38); }
.zahl.l4 { font-size: calc(var(--z) * .3); }
.zahl.l5 { font-size: calc(var(--z) * .25); }
.zahl.l6 { font-size: calc(var(--z) * .21); }
.zahl.l7 { font-size: calc(var(--z) * .18); }
/* eigene Farbskala: Pfirsich → Koralle → Magenta → Violett → Blau → Türkis → Grün → Gold */
.e1 { --c: #fdecd2; --t: #6b4b2a; } .e2 { --c: #fdd9a8; --t: #6b4b2a; } .e3 { --c: #ffb67a; } .e4 { --c: #ff9466; }
.e5 { --c: #ff7068; } .e6 { --c: #ff4f7e; } .e7 { --c: #ec3ea3; } .e8 { --c: #c946d6; } .e9 { --c: #9b58f2; }
.e10 { --c: #7066ff; } .e11 { --c: #3f86ff; } .e12 { --c: #23aee6; } .e13 { --c: #17c2ac; } .e14 { --c: #36cf6c; }
.e15 { --c: #a9d636; --t: #26360a; } .e16 { --c: #ffd23d; --t: #4a3000; } .e17, .e18 { --c: #20163f; --t: #ffd23d; }
.e11 .in { box-shadow: 0 0 calc(var(--z) * .25) rgba(255,210,61,.75), inset 0 0 0 3px #ffd23d; }
/* Themen-Modus */
.thema .stein .in { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 35%, #ffffff), var(--c)); display: flex; flex-direction: column; justify-content: center; padding: 4%; }
.thema .stein svg { width: 70%; height: 70%; }
.thema .nm { font-size: calc(var(--z) * .13); color: #21183c; line-height: 1; margin-top: 2%; white-space: nowrap; }
.thema .e17 .nm, .thema .e18 .nm { color: #ffd23d; }
.gross-k { font-size: 64px; text-align: center; color: var(--gold); text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.gross-k svg { width: 120px; height: 120px; }
.end-pkt { font-size: 48px; text-align: center; }

.overlay { position: absolute; inset: 0; border-radius: 16px; background: rgba(18,10,40,.78); display: grid; place-items: center; padding: 14px; z-index: 5; animation: neu .25s; }
.ovin { width: 100%; max-width: 360px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ovin p { color: #e7e2ff; margin: 4px 0 10px; }
.wackel-x { animation: wx .25s; } .wackel-y { animation: wy .25s; }
@keyframes wx { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes wy { 25% { transform: translateY(-5px); } 75% { transform: translateY(5px); } }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.konfetti i { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.6s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (orientation: landscape) and (max-height: 560px) {
  body.playing #ui { padding-top: 6px; }
  .spiel { display: grid; grid-template-columns: minmax(220px, 1fr) auto; grid-template-areas: "kopf brett" "leiste brett" "tipp brett"; column-gap: 16px; row-gap: 8px; align-items: start; max-width: 900px !important; }
  #ui > .spiel { max-width: 900px; }
  .kopf { grid-area: kopf; display: flex; flex-wrap: wrap; }
  .kopf .titel { flex: 1 1 60%; }
  .kopf .box { flex: 1 1 35%; }
  .overlay { position: fixed; inset: 0; border-radius: 0; z-index: 30; }
  .leiste { grid-area: leiste; flex-wrap: wrap; }
  .brett { grid-area: brett; }
  .tipp { grid-area: tipp; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .stein { transition: none; } .stein .in { animation: none !important; } }
