@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: #14213d; --fg: #fff; --muted: #c5cde0; --pink: #ff3d7f; --gold: #ffc81a; --green: #16a34a; --card: rgba(18, 26, 52, .92); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif; }
a { color: #9cc7ff; }
.hidden { display: none !important; }
#app { position: fixed; inset: 0; }
/* ---------- Spiel ---------- */
#game { position: absolute; inset: 0; background: #0b1226; }
#photowrap { position: absolute; inset: 0; overflow: hidden; touch-action: none; display: grid; place-items: center; background: radial-gradient(ellipse at center, #1d2a4d, #0b1226); }
#photo { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s; user-select: none; -webkit-user-drag: none; transform-origin: center; }
#photo.ready { opacity: 1; }
#topbar { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; display: flex; gap: 6px; align-items: center; background: linear-gradient(180deg, rgba(8,12,28,.75), rgba(8,12,28,0)); pointer-events: none; }
#topbar > * { pointer-events: auto; }
#topbar .sp { flex: 1; }
.chip { padding: 6px 10px; border-radius: 999px; background: rgba(10,16,36,.72); border: 1px solid rgba(255,255,255,.18); font-size: 14px; white-space: nowrap; }
.chip.dim { color: var(--muted); }
.chip.score b { color: var(--gold); }
#btnQuit { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(10,16,36,.72); color: #fff; font-size: 15px; cursor: pointer; }
#credit { position: absolute; left: 8px; top: calc(env(safe-area-inset-top) + 52px); max-width: 70%; font-size: 10.5px; color: rgba(255,255,255,.8); background: rgba(0,0,0,.4); padding: 3px 7px; border-radius: 6px; line-height: 1.3; }
#credit a { color: #cfe3ff; }
#mapwrap { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: #dfe7ea; border-top: 3px solid #fff; transition: height .25s ease, width .25s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.35); }
#mapwrap[data-size="gross"] { height: 72%; }
#mapwrap[data-size="klein"] { height: 30%; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.mapbtns { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mapbtns button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: #fff; color: #14213d; font: 700 20px/1 "Space Grotesk", sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
#btnGuess { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: translateX(-50%); width: min(86%, 380px); }
#btnGuess:disabled { background: #6b7280; box-shadow: 0 4px 0 #3f4652; opacity: .92; }
body.revealed #btnGuess { display: none; }
#reveal { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 50px); padding: 10px 14px 14px; border-radius: 0 0 16px 16px; background: var(--card); border-bottom: 2px solid rgba(255,255,255,.12); max-height: 28%; overflow-y: auto; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: drop .35s ease; }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
#reveal h3 { margin: 8px 0 2px; font-size: 18px; }
#reveal p { margin: 2px 0; font-size: 14px; color: #e3e8f5; line-height: 1.35; }
#reveal .cr { font-size: 11px; color: var(--muted); }
#reveal .btn { margin-top: 8px; width: 100%; }
.rv-top { display: flex; align-items: flex-end; justify-content: space-between; }
.rv-pts b { font-size: 34px; color: var(--gold); line-height: 1; }
.rv-pts small, .rv-d small { display: block; font-size: 12px; color: var(--muted); }
.rv-d { text-align: right; font-size: 22px; }
.bar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff3d7f, #ffc81a, #22c55e); transition: width .9s cubic-bezier(.2,.8,.2,1); }
/* ---------- Menüs ---------- */
#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: 14px; }
.scr > * { width: 100%; max-width: 560px; }
.scr.titel { background: radial-gradient(circle at 20% 10%, rgba(255,61,127,.25), transparent 40%), radial-gradient(circle at 90% 30%, rgba(37,99,235,.35), transparent 45%), linear-gradient(180deg, #14213d, #0b1226); }
.scr.spiel { display: none; }
.scr.ende { background: linear-gradient(180deg, rgba(11,18,38,.0) 0%, rgba(11,18,38,.0) 35%); justify-content: flex-start; padding-top: calc(env(safe-area-inset-top) + 10px); pointer-events: none; }
.scr.ende > .card { pointer-events: auto; }
.scr.hilfe, .scr.quellen { background: #14213d; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: clamp(44px, 13vw, 76px); line-height: 1; letter-spacing: -.02em; margin-top: 8px; text-shadow: 0 5px 0 rgba(0,0,0,.3); }
.logo i { font-style: normal; color: var(--gold); }
.logo .pin svg { width: .6em; height: .8em; display: block; filter: drop-shadow(0 4px 0 rgba(0,0,0,.3)); animation: hop 1.6s ease-in-out infinite; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }
.claim { text-align: center; color: var(--muted); margin: 0; font-size: 16px; line-height: 1.4; }
.modes { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 18px; border: 2px solid rgba(255,255,255,.12); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 35%, #14213d), #172548); color: #fff; cursor: pointer; font: inherit; box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .12s; }
.mode:hover { transform: translateY(-2px); border-color: var(--c); }
.mode:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.mi { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.12); flex: none; }
.mt { display: flex; flex-direction: column; gap: 3px; }
.mt b { font-size: 19px; }
.mt small { color: #d6dcef; font-size: 13px; line-height: 1.3; }
.mt em { font-style: normal; font-size: 13px; color: var(--gold); }
.mt em b { font-size: 13px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.row .btn { flex: 1; }
.row.small { gap: 4px; }
.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, #3b4a8a, #2a3670); box-shadow: 0 4px 0 #1a2350; cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1a2350; }
.btn.big { font-size: 21px; padding: 15px; background: linear-gradient(180deg, #ff6b9a, var(--pink) 55%, #d81e5f); box-shadow: 0 5px 0 #8e0f3c, 0 10px 24px rgba(255,61,127,.35); }
.btn.big:active { box-shadow: 0 1px 0 #8e0f3c; }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 700 14px "Space Grotesk", sans-serif; text-decoration: underline; cursor: pointer; padding: 6px 8px; }
.card { background: var(--card); border: 1.5px solid rgba(255,255,255,.14); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.card h2 { margin: 2px 0 8px; text-align: center; }
.card.text { line-height: 1.45; }
.card.text li { margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 14px; }
.end { text-align: center; max-height: 46vh; overflow-y: auto; }
.stars { font-size: 30px; color: var(--gold); letter-spacing: 4px; }
.stars span { color: rgba(255,255,255,.2); }
.total { font-size: 44px; line-height: 1; margin: 4px 0; }
.total small { font-size: 16px; color: var(--muted); }
.rec { color: var(--gold); margin: 4px 0; }
.rounds { list-style: none; padding: 0; margin: 10px 0; text-align: left; font-size: 14px; }
.rounds li { display: grid; grid-template-columns: 24px 1fr auto 56px; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.08); align-items: center; }
.rounds .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounds .d { color: var(--muted); }
.rounds b { text-align: right; color: var(--gold); }
.end .row { margin-top: 8px; }
.credits { padding-left: 18px; font-size: 13px; color: #dfe5f3; }
.credits li { margin-bottom: 6px; }
#toast { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); background: var(--pink); padding: 10px 18px; border-radius: 16px; opacity: 0; transition: opacity .3s; z-index: 30; pointer-events: none; text-align: center; max-width: 90vw; }
#toast.show { opacity: 1; }
.noscript { padding: 20px; }
/* Ende: Karte oben groß, Karte unten */
body[data-screen="ende"] #mapwrap { height: 52%; }
body[data-screen="ende"] .scr.ende { padding-top: calc(env(safe-area-inset-top) + 54px); }
body[data-screen="ende"] #topbar, body[data-screen="ende"] #credit, body[data-screen="ende"] #photowrap { display: none; }
body[data-screen="ende"] #game { background: #14213d; }
/* ---------- breite Bildschirme ---------- */
@media (min-width: 900px) {
  #mapwrap { left: auto; right: 16px; bottom: 16px; width: 380px; height: 260px; border: 3px solid #fff; border-radius: 14px; overflow: hidden; }
  #mapwrap[data-size="klein"] { width: 380px; height: 260px; }
  #mapwrap[data-size="mittel"] { width: 620px; height: 440px; }
  #mapwrap[data-size="gross"] { width: min(62vw, 960px); height: calc(100vh - 140px); }
  #btnGuess { font-size: 18px; padding: 12px; bottom: 10px; }
  #reveal { left: 16px; right: auto; top: auto; bottom: 16px; width: min(34vw, 420px); max-height: calc(100vh - 140px); border-radius: 16px; border: 2px solid rgba(255,255,255,.15); }
  body[data-screen="ende"] #mapwrap { left: 16px; right: auto; top: 70px; bottom: 16px; width: calc(100vw - 560px); height: auto; }
  body[data-screen="ende"] .scr.ende { align-items: flex-end; padding-right: 24px; }
  body[data-screen="ende"] .scr.ende > .card { max-width: 480px; max-height: calc(100vh - 100px); }
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 899px) {
  #mapwrap { left: auto; right: 0; top: 0; width: 46%; height: 100% !important; border-top: 0; border-left: 3px solid #fff; }
  #mapwrap[data-size="gross"] { width: 66%; }
  #photowrap { right: 46%; }
  #reveal { right: auto; width: 34%; max-height: 100%; bottom: 0; }
  body[data-screen="ende"] #mapwrap { width: 52%; }
  body[data-screen="ende"] .scr.ende { align-items: flex-start; padding-left: 10px; }
  body[data-screen="ende"] .scr.ende > .card { max-width: 45%; max-height: calc(100vh - 70px); }
  .end { max-height: none; }
  .logo { font-size: 44px; }
  .scr { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .logo .pin svg { animation: none; } }
