@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: #1b2230; --fg: #fff; --muted: #c6cbd8; --gold: #ffd23d; --red: #e8503a; --green: #6fd36f; --blue: #5bc7ef; --card: rgba(24, 30, 44, .94); --wood: #7a4f2a; }
* { 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; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#hud .top { position: absolute; left: 0; right: 0; top: 0; height: 54px; padding: 0 8px; padding-top: env(safe-area-inset-top); display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(18,22,34,.95), rgba(18,22,34,.75)); pointer-events: auto; }
.hb { width: 42px; height: 40px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; font: 700 16px "Space Grotesk", sans-serif; flex: none; }
.hb.sp { margin-left: auto; width: 52px; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 19px; padding: 4px 10px; border-radius: 12px; background: rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.st i { font-style: normal; }
.st .heart { color: var(--red); }
.st .coin { color: var(--gold); text-shadow: 0 0 6px rgba(255,210,61,.6); }
.st.wave { font-size: 15px; color: var(--muted); }
.st.hurt { animation: hurt .5s; }
@keyframes hurt { 0%, 100% { background: rgba(0,0,0,.25); transform: none; } 30% { background: rgba(232,80,58,.7); transform: scale(1.12); } }
#hud .side { position: absolute; pointer-events: auto; display: flex; gap: 8px; }
body.portrait #hud .side { left: 0; right: 0; bottom: 0; height: 82px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(18,22,34,.95), rgba(18,22,34,.75)); }
body:not(.portrait) #hud .side { right: 0; top: 54px; bottom: 0; width: 104px; flex-direction: column; padding: 8px; background: linear-gradient(270deg, rgba(18,22,34,.95), rgba(18,22,34,.7)); }
body.low:not(.portrait) #hud .top { height: 46px; }
body.low:not(.portrait) #hud .side { top: 46px; width: 86px; gap: 5px; padding: 5px; }
.ab { position: relative; flex: 1; min-width: 0; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; font: 700 12px "Space Grotesk", sans-serif; padding: 2px; }
.ab i { font-style: normal; font-size: 24px; line-height: 1; }
.ab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--cd, 0%); background: rgba(0,0,0,.55); pointer-events: none; }
.ab.ready { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,210,61,.35); }
.ab.aim { background: rgba(255,210,61,.35); }
.nx { flex: 1.6; border-radius: 14px; border: 0; cursor: pointer; color: #3a2400; background: linear-gradient(180deg, #ffe066, #f0a800); box-shadow: 0 3px 0 #9a6a00; font: 700 17px/1.05 "Space Grotesk", sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; }
.nx small { font-size: 11px; }
.nx.dis { filter: grayscale(.8); opacity: .55; }
.nx.pulse { animation: pulse .7s infinite alternate; }
@keyframes pulse { to { transform: scale(1.05); } }
body:not(.portrait) .nx { flex: 1.4; }
body.low:not(.portrait) .ab i { font-size: 19px; }
body.low:not(.portrait) .ab span { font-size: 10px; }
#toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%) translateY(-8px); max-width: min(92vw, 460px); padding: 9px 16px; border-radius: 14px; background: rgba(18,22,34,.92); border: 2px solid var(--gold); text-align: center; font-size: 15px; line-height: 1.3; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 30; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Panels ---------- */
.panel { position: absolute; z-index: 20; background: var(--card); border: 2px solid rgba(255,255,255,.18); border-radius: 16px; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.45); width: min(340px, 94vw); }
.ptitle { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.ptitle img { width: 40px; height: 40px; }
.ptitle div { flex: 1; display: flex; flex-direction: column; }
.ptitle small { color: var(--muted); font-size: 12px; }
.panel .x { background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; padding: 0 6px; }
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 5px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font: 700 12px "Space Grotesk", sans-serif; }
.tb img { width: 44px; height: 44px; }
.tb b { color: var(--gold); font-size: 13px; }
.tb kbd { position: absolute; top: 2px; left: 5px; font: 700 10px "Space Grotesk", sans-serif; color: var(--muted); opacity: .6; }
.tb.sel { border-color: var(--gold); background: rgba(255,210,61,.18); }
.tb.poor, .pb.poor { opacity: .45; }
.tb.poor b, .pb.poor b { color: var(--red); }
.pinfo { font-size: 13px; color: var(--muted); padding: 6px 2px 0; line-height: 1.35; min-height: 36px; }
.pinfo b { color: #fff; }
.tag { display: inline-block; background: rgba(91,199,239,.25); color: #bfefff; border-radius: 6px; padding: 0 5px; font-size: 11px; }
.pstats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pb { width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 8px; text-align: left; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: #fff; padding: 7px 10px; cursor: pointer; font: 700 14px "Space Grotesk", sans-serif; margin-bottom: 6px; }
.pb span { grid-column: 2; }
.pb small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.25; }
.pb b { grid-column: 3; grid-row: 1 / span 2; color: var(--gold); font-size: 16px; }
.pb img { grid-row: 1 / span 2; width: 36px; height: 36px; }
.pb.up { border-color: rgba(255,210,61,.45); }
.prow { display: flex; gap: 6px; }
.pb.small { display: block; text-align: center; font-size: 13px; padding: 8px 4px; margin: 0; }
.pb.sell { color: #ffc0b4; }
.max { text-align: center; color: var(--gold); padding: 6px; font-size: 14px; }

/* ---------- 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) + 56px) 16px calc(env(safe-area-inset-bottom) + 60px); display: flex; flex-direction: column; align-items: center; gap: 12px; background: rgba(16,20,30,.55); touch-action: pan-y; }
.scr > * { width: 100%; max-width: 540px; }
.scr.title > :first-child { margin-top: auto; } .scr.title > :last-child { margin-bottom: auto; }
.scr.title { background: radial-gradient(ellipse at 50% 40%, rgba(16,20,30,.35), rgba(16,20,30,.82)); }
.scr.pause > .card, .scr.ende > .card, .scr.detail > .card, .scr.optionen > .card, .scr.hilfe > .card { margin-top: auto; margin-bottom: auto; }
.scr.karten { background: rgba(16,20,30,.86); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .85; font-size: clamp(56px, 16vw, 104px); filter: drop-shadow(0 6px 0 rgba(0,0,0,.45)); }
.logo .crown { font-size: .55em; color: var(--gold); margin-bottom: .05em; }
.logo b { background: linear-gradient(180deg, #fff 0%, #ffe9a8 45%, #e0a83a 55%, #9a5a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #2a1a0a; letter-spacing: .02em; }
.logo .b2 { background: linear-gradient(180deg, #fff 0%, #cfe9ff 45%, #6fb0e8 55%, #2a5a9a 100%); -webkit-background-clip: text; background-clip: text; }
.claim { text-align: center; margin: 0; color: var(--muted); font-size: 16px; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 4px 0; }
h2 { margin: 2px 0; text-align: center; font-size: 26px; }
h3 { margin: 10px 0 6px; font-size: 16px; color: var(--muted); }
.sub { text-align: center; color: var(--muted); margin: 0 0 6px; font-size: 14px; }
.card { position: relative; background: var(--card); border: 2px solid rgba(255,255,255,.14); border-radius: 18px; padding: 16px; box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.card.center { text-align: center; }
.card .x { position: absolute; right: 8px; top: 4px; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
.row { display: flex; gap: 10px; margin-top: 8px; }
.row .btn { flex: 1; }
.btn { appearance: none; border: 0; border-radius: 14px; padding: 12px 16px; width: 100%; font: 700 17px/1.1 "Space Grotesk", sans-serif; color: #fff; background: linear-gradient(180deg, #4b5874, #333d55); box-shadow: 0 4px 0 #1d2335; cursor: pointer; margin-top: 8px; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1d2335; }
.btn.big { font-size: 24px; padding: 16px; background: linear-gradient(180deg, #ffe066, #f0a800); color: #3a2400; box-shadow: 0 5px 0 #9a6a00; }
.btn.small { font-size: 14px; padding: 8px; }
.btn.dis, .btn[disabled] { opacity: .5; cursor: default; }
.head { display: flex; align-items: center; justify-content: space-between; }
.pill { padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.35); color: var(--gold); }
.maps { display: flex; flex-direction: column; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mapc { position: relative; border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); color: #fff; padding: 8px 6px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 700 13px "Space Grotesk", sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.7); min-height: 96px; }
.mapc .no { position: absolute; top: 4px; left: 8px; font-size: 12px; opacity: .8; }
.mapc b { margin-top: 10px; text-align: center; line-height: 1.1; }
.mapc small { font-size: 11px; opacity: .9; }
.mapc .eb { color: var(--gold); }
.mapc.locked { filter: grayscale(.9) brightness(.6); cursor: default; }
.lock { font-size: 18px; }
.stars i { font-style: normal; color: rgba(255,255,255,.3); font-size: 16px; }
.stars i.on { color: var(--gold); text-shadow: 0 0 6px rgba(255,210,61,.6); }
.detail canvas { width: 100%; max-width: 400px; aspect-ratio: 5 / 3; display: block; margin: 6px auto; border-radius: 10px; }
.new { font-size: 13px; color: #ffe9a8; background: rgba(255,210,61,.12); border-radius: 10px; padding: 8px; margin: 6px 0; line-height: 1.4; }
.seg { display: flex; gap: 6px; margin-top: 8px; }
.seg button { flex: 1; border-radius: 12px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--muted); padding: 8px 4px; font: 700 14px "Space Grotesk", sans-serif; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.seg button.on { border-color: var(--gold); color: #fff; background: rgba(255,210,61,.15); }
.seg .stars i { font-size: 12px; }
.bigstars { font-size: 64px; display: flex; justify-content: center; gap: 6px; }
.bigstars i { font-style: normal; color: rgba(255,255,255,.18); }
.bigstars i.on { color: var(--gold); animation: star .5s backwards; text-shadow: 0 0 18px rgba(255,210,61,.7); }
@keyframes star { from { transform: scale(2.4) rotate(-40deg); opacity: 0; } }
.big-n { font-size: 60px; margin: 0; color: var(--gold); }
.up { color: var(--green); font-size: 14px; }
.help ul { padding-left: 18px; font-size: 14px; line-height: 1.45; }
.help p { font-size: 14px; line-height: 1.45; }
.sl { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 15px; }
.sl input { width: 100%; accent-color: var(--gold); }
.noscript { padding: 20px; }
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (orientation: landscape) and (max-height: 520px) {
  .scr { padding-top: 10px; gap: 6px; }
  .logo { font-size: 52px; }
  .btn.big { padding: 10px; font-size: 20px; }
  .grid { grid-template-columns: repeat(6, 1fr); }
  .scr > * { max-width: 760px; }
  .bigstars { font-size: 42px; }
  .card.detail { display: grid; grid-template-columns: 230px 1fr; gap: 0 14px; align-items: start; padding: 10px 14px; }
  .card.detail h2, .card.detail .sub { grid-column: 1 / -1; }
  .card.detail canvas { grid-column: 1; grid-row: 3 / span 5; max-width: 230px; margin: 0; }
  .card.detail > :not(canvas):not(h2):not(.sub):not(.x) { grid-column: 2; }
  .card.detail .btn { margin-top: 6px; }
  .card.detail .btn.big { padding: 9px; }
  .card.detail .seg { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .nx.pulse, .bigstars i.on, .st.hurt { animation: none; } }
