/* Kopfball Duell – Arcade-Look
   Kräftiges Blau als Bühne, cremefarbene Karten mit Tintenkontur, dicke 3D-Knöpfe, Text mit Kontur.
   Display: Lilita One. Text: Nunito (900/800). */
@font-face { font-family: "Lilita One"; src: url(../fonts/lilita.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url(../fonts/nunito-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(../fonts/nunito-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(../fonts/nunito-900.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #15112e; --ink2: #2a2457;
  --blue: #2f6bff; --blue-d: #1a3fc4; --blue-dd: #0d2275;
  --yellow: #ffd02b; --yellow-d: #f39c00;
  --green: #3ed46f; --green-d: #179b45;
  --purple: #9566ff; --purple-d: #5f33dc;
  --pink: #ff5ca8; --pink-d: #d9267a;
  --red: #ff4766; --red-d: #c81d3e;
  --cyan: #2ad3f5; --cyan-d: #0a95c4;
  --cream: #fff7e6; --cream2: #f3e4c3; --cream3: #e2cc9e;
  --p1: #ff6b1a; --p2: #22d3ee; --gold: #ffc531;
  --r-basis: #3f8bff; --r-selten: #2fc760; --r-episch: #a65cff; --r-legend: #ffb300;
  --display: "Lilita One", "Arial Black", Impact, sans-serif;
  --body: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --o: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 1.5px 1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 0 4px 0 var(--ink);
  --o-sm: 0 1.5px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 0 -1.5px 0 var(--ink), 0 3px 0 var(--ink);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--blue-dd); color: #fff; font-family: var(--body); font-weight: 800; overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
body.ingame { touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
svg { fill: currentColor; }
#cv { position: fixed; inset: 0; display: block; }
.grow { flex: 1; }
h2, h3, h4 { margin: 0; font-weight: 400; }

/* ---------- Bildschirme ---------- */
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.screen {
  position: absolute; inset: 0; pointer-events: auto; overflow-y: auto; overflow-x: hidden;
  padding: calc(10px + var(--st)) calc(16px + var(--sr)) calc(16px + var(--sb)) calc(16px + var(--sl));
  background:
    repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,255,255,.045) 0 7deg, transparent 7deg 14deg),
    radial-gradient(circle at 50% 38%, rgba(70,130,255,.75), rgba(16,38,140,.93) 55%, rgba(9,20,80,.97));
  animation: scrIn .2s ease-out;
}
@keyframes scrIn { from { opacity: 0; } }
.screen.home { display: grid; grid-template-columns: auto minmax(0, 1fr) clamp(300px, 30vw, 420px); grid-template-rows: auto 1fr; gap: 6px 18px; overflow: hidden;
  background: repeating-conic-gradient(from 0deg at 50% 46%, rgba(255,255,255,.05) 0 7deg, transparent 7deg 14deg), radial-gradient(circle at 50% 46%, rgba(80,140,255,.55), rgba(16,38,140,.86) 52%, rgba(9,20,80,.95)); }
.screen.overlay { background: rgba(8,12,40,.6); display: flex; flex-direction: column; align-items: center; }
.screen.overlay > * { margin-block: auto; flex-shrink: 0; }
.screen.sheet { background: rgba(10,18,70,.94); }

/* Textkontur wie in Spielen */
.outl, .btn, .btn-play, h2, .ribbon, .rarity, .navbtn span, .mcard b, .ccard b, .plate b { text-shadow: var(--o); }

/* ---------- Knöpfe ---------- */
.btn {
  --c1: var(--blue); --c2: var(--blue-d);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 21px; letter-spacing: .02em; color: #fff; line-height: 1;
  padding: 12px 22px 14px; border: 3px solid var(--ink); border-radius: 16px;
  background: linear-gradient(var(--c1), var(--c2));
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 var(--ink);
  transition: transform .06s, box-shadow .06s, filter .1s;
}
.btn svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 0 var(--ink)); }
.btn:hover:not(:disabled) { filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 1px 0 var(--ink); }
.btn:disabled { filter: grayscale(.8) brightness(.8); cursor: not-allowed; opacity: .7; }
.btn.big { font-size: 26px; padding: 14px 30px 17px; border-radius: 18px; }
.btn.small { font-size: 16px; padding: 8px 14px 10px; border-radius: 12px; }
.btn.yellow { --c1: #ffe25a; --c2: var(--yellow-d); }
.btn.green { --c1: #6ff094; --c2: var(--green-d); }
.btn.purple { --c1: #b28cff; --c2: var(--purple-d); }
.btn.pink { --c1: #ff8cc2; --c2: var(--pink-d); }
.btn.red, .btn.danger { --c1: #ff7a8f; --c2: var(--red-d); }
.btn.ghost { --c1: var(--cream); --c2: var(--cream2); color: var(--ink); text-shadow: none; }
.btn.ghost svg { filter: none; }
.btn.ghost.danger { color: var(--red-d); }

.btn-play {
  font-family: var(--display); font-size: clamp(34px, 4.6vw, 52px); color: #fff; letter-spacing: .03em;
  width: 100%; padding: 16px 20px 22px; border: 4px solid var(--ink); border-radius: 24px;
  background: linear-gradient(#ffe766, #ffc21a 55%, #f39500);
  box-shadow: inset 0 -8px 0 rgba(160,70,0,.35), inset 0 5px 0 rgba(255,255,255,.6), 0 7px 0 var(--ink), 0 12px 30px rgba(255,190,0,.35);
  position: relative; overflow: hidden; transition: transform .06s;
}
.btn-play span { position: relative; z-index: 1; }
.btn-play::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-play:active { transform: translateY(5px); box-shadow: inset 0 -6px 0 rgba(160,70,0,.35), inset 0 5px 0 rgba(255,255,255,.6), 0 2px 0 var(--ink); }

.iconback, .sqbtn {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 14px;
  background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 4px 0 var(--ink);
}
.iconback svg, .sqbtn svg { width: 26px; height: 26px; }
.iconback:active, .sqbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* Kopfzeilen */
.bar { display: flex; align-items: center; gap: 14px; min-height: 52px; margin-bottom: 14px; }
.bar h2 { font-family: var(--display); font-size: clamp(26px, 3.6vw, 36px); letter-spacing: .02em; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 6px; border-radius: 22px; background: rgba(8,14,50,.7); border: 3px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255,255,255,.12); font-family: var(--display); font-size: 21px; }
.chip.static { pointer-events: none; }
.chip .ic { width: 28px; height: 28px; color: var(--gold); filter: drop-shadow(0 2px 0 var(--ink)); }
.chip b { font-weight: 400; text-shadow: var(--o-sm); min-width: 1.5em; }
.chip-plus { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(#6ff094, var(--green-d)); border: 2px solid var(--ink); display: grid; place-items: center; }
.chip-plus svg { width: 16px; height: 16px; }
.coin { width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative; background: radial-gradient(circle at 35% 30%, #fff5b8, #ffd42a 45%, #e59a00); border: 2.5px solid var(--ink); box-shadow: inset 0 -3px 0 rgba(160,90,0,.35); }
.coin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid rgba(160,90,0,.5); }

/* ---------- Startseite ---------- */
.hud-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.profile { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 6px 0 4px; border-radius: 30px; background: rgba(8,14,50,.7); border: 3px solid var(--ink); position: relative; }
.pf-av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(var(--blue), var(--blue-d)); border: 3px solid #fff; display: grid; place-items: center; overflow: hidden; }
.pf-av canvas { width: 50px !important; height: 50px !important; margin-top: 4px; }
.pf-txt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 110px; }
.pf-txt b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1; text-shadow: var(--o-sm); }
.pf-xp { position: relative; width: 120px; height: 14px; border-radius: 8px; background: rgba(0,0,0,.45); border: 2px solid var(--ink); overflow: hidden; }
.pf-xp i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(#7af0ff, #19a9e0); transition: width .6s; }
.pf-xp em { position: absolute; inset: 0; font-style: normal; font-size: 10px; font-weight: 900; display: grid; place-items: center; line-height: 1; text-shadow: 0 1px 0 var(--ink); }
.pf-lvl { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--display); font-size: 19px; color: #fff; text-shadow: var(--o-sm);
  background: linear-gradient(#ffe25a, var(--yellow-d)); border: 3px solid var(--ink); border-radius: 12px; transform: rotate(45deg); }
.pf-lvl > span { transform: rotate(-45deg); }

.sidenav { display: flex; flex-direction: column; gap: clamp(12px, 2.4vh, 22px); align-self: center; }
.navbtn {
  --c1: var(--blue); --c2: var(--blue-d);
  position: relative; width: clamp(78px, 11vh, 96px); height: clamp(78px, 11vh, 96px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 3px solid var(--ink); border-radius: 20px; background: linear-gradient(var(--c1), var(--c2));
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.4), 0 5px 0 var(--ink);
}
.navbtn svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 var(--ink)); }
.navbtn span { font-family: var(--display); font-size: 14px; letter-spacing: .02em; }
.navbtn:active { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), 0 1px 0 var(--ink); }
.navbtn.pink { --c1: #ff8cc2; --c2: var(--pink-d); }
.navbtn.green { --c1: #6ff094; --c2: var(--green-d); }
.navbtn.gold { --c1: #ffe25a; --c2: var(--yellow-d); }
.badge { position: absolute; top: -9px; right: -9px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--red); border: 3px solid var(--ink); font-style: normal; font-family: var(--display); font-size: 14px; display: grid; place-items: center; text-shadow: var(--o-sm); animation: bump 1.6s ease-in-out infinite; }
@keyframes bump { 0%, 80%, 100% { transform: scale(1); } 90% { transform: scale(1.18); } }

.stage { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; }
#showcase { position: absolute; inset: -10px 0 0 0; width: 100%; height: 100%; z-index: 1; cursor: pointer; }
.plate { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.plate b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: .02em; }
.rarity { --rc: var(--r-basis); font-family: var(--display); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px 5px; border-radius: 10px; background: var(--rc); border: 2.5px solid var(--ink); }
.superline { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 900; padding: 5px 12px 5px 8px; border-radius: 14px; background: rgba(8,14,50,.6); border: 2px solid rgba(255,255,255,.18); }
.superline svg { width: 18px; height: 18px; color: var(--gold); }
.nextup { position: relative; z-index: 2; margin-top: 12px; display: flex; align-items: center; gap: 10px; width: min(340px, 100%); padding: 6px 12px 6px 6px; border-radius: 18px; background: rgba(8,14,50,.72); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); text-align: left; }
.nextup:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.nu-av { width: 46px; height: 46px; flex: none; border-radius: 12px; background: linear-gradient(var(--rc, var(--r-selten)), rgba(0,0,0,.25)); border: 2.5px solid var(--ink); overflow: hidden; display: grid; place-items: center; }
.nu-av canvas { width: 52px !important; height: 52px !important; margin-top: 6px; }
.nu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nu-txt small { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.nu-txt b { font-family: var(--display); font-weight: 400; font-size: 18px; line-height: 1; }
.nu-bar { height: 10px; border-radius: 6px; background: rgba(0,0,0,.5); border: 2px solid var(--ink); overflow: hidden; }
.nu-bar i { display: block; height: 100%; width: 0; background: linear-gradient(#ffe25a, var(--yellow-d)); transition: width .6s; }
.nu-num { font-family: var(--display); font-size: 16px; white-space: nowrap; }
.nextup.ready { background: linear-gradient(#6ff094, var(--green-d)); animation: wig 2.4s ease-in-out infinite; }
.nextup.ready .nu-txt small { opacity: .9; }
@keyframes wig { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-2deg); } 95% { transform: rotate(2deg); } }

.homeside { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; justify-content: flex-start; padding-top: 6px; }
.hs-daily { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 20px; border: 3px solid var(--ink); color: #fff;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 12px, transparent 12px 24px), linear-gradient(135deg, #ff7a8f, #e0245e); box-shadow: inset 0 3px 0 rgba(255,255,255,.3), 0 5px 0 var(--ink); }
.hs-daily:active, .hs-tasks:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.hd-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; background: rgba(0,0,0,.25); border: 2.5px solid var(--ink); display: grid; place-items: center; }
.hd-ic svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 var(--ink)); }
.hd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hd-txt small { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.hd-txt b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; text-shadow: var(--o-sm); }
.hd-txt em { font-style: normal; font-size: 13px; font-weight: 800; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-av { width: 60px; height: 60px; flex: none; margin: -14px 0 -10px; }
.hd-av canvas { width: 100% !important; height: 100% !important; }
.hd-rw { position: absolute; top: -12px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 16px; padding: 2px 10px 3px 4px; border-radius: 12px; background: var(--cream); color: var(--ink); border: 2.5px solid var(--ink); }
.hd-rw .coin { width: 20px; height: 20px; } .hd-rw .coin::after { inset: 4px; border-width: 1.5px; }
.hs-daily.done { background: linear-gradient(135deg, #7c86b8, #4b548a); }
.hs-tasks { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 10px 12px 12px; border-radius: 20px; background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.ht-head { display: flex; align-items: center; gap: 8px; }
.ht-head svg { width: 22px; height: 22px; color: var(--green-d); }
.ht-head b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.ht-head em { font-style: normal; font-family: var(--display); font-size: 16px; padding: 1px 8px; border-radius: 9px; background: var(--ink); color: #fff; }
.ht-list { display: flex; flex-direction: column; gap: 7px; }
.ht-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: 13px; font-weight: 900; }
.ht-row .pb { grid-column: 1 / -1; height: 8px; border-radius: 5px; background: rgba(21,17,46,.15); overflow: hidden; }
.ht-row .pb i { display: block; height: 100%; background: linear-gradient(#6ff094, var(--green-d)); }
.ht-row .rw { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-weight: 400; font-size: 14px; }
.ht-row .rw .coin { width: 16px; height: 16px; border-width: 2px; } .ht-row .rw .coin::after { display: none; }
.ht-row.done { opacity: .5; } .ht-row.done span:first-child { text-decoration: line-through; }
.playzone { display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; padding-bottom: 6px; min-height: 0; }
.modecard {
  --mc: var(--blue);
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 20px;
  background: linear-gradient(var(--cream), var(--cream2)); border: 3px solid var(--ink); color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 5px 0 var(--ink);
}
.modecard:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.mc-ic { width: 58px; height: 58px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--mc); border: 3px solid var(--ink); color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.35); }
.mc-ic svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 0 var(--ink)); }
.mc-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mc-txt small { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
.mc-txt b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; }
.mc-txt em { font-style: normal; font-size: 14px; font-weight: 800; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-chev { font-size: 13px; font-weight: 900; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; }

/* ---------- Modus-Karten ---------- */
.modegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; max-width: 1200px; margin: 0 auto; padding-bottom: 20px; }
.mcard {
  --c1: var(--blue); --c2: var(--blue-d);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; min-height: 210px;
  border-radius: 22px; border: 3px solid var(--ink); background: linear-gradient(160deg, var(--c1), var(--c2)); color: #fff;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.35), 0 6px 0 var(--ink); overflow: hidden;
}
.mcard::before { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.12); }
.mcard:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.mcard.on { outline: 5px solid var(--yellow); outline-offset: 3px; }
.mcard .big-ic { width: 76px; height: 76px; margin-bottom: auto; filter: drop-shadow(0 4px 0 var(--ink)); position: relative; }
.mcard b { font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1; }
.mcard p { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.25; opacity: .95; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.mcard .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: 12px; font-weight: 900; padding: 3px 8px; border-radius: 8px; background: rgba(8,14,50,.55); text-shadow: none; }
.tag.gold { background: var(--yellow); color: var(--ink); }
.mcard .newflag { position: absolute; top: 12px; right: 12px; font-family: var(--display); font-size: 14px; background: var(--red); border: 2.5px solid var(--ink); border-radius: 9px; padding: 3px 8px 4px; transform: rotate(6deg); }

/* ---------- Panels & Formulare ---------- */
.panel { background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 3px solid var(--ink); border-radius: 22px; padding: 16px; box-shadow: 0 6px 0 rgba(8,12,40,.55); display: flex; flex-direction: column; gap: 12px; }
.panel h4 { font-family: var(--display); font-size: 19px; letter-spacing: .02em; color: var(--ink2); }
.hint { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.35; opacity: .7; }
.hint.center { text-align: center; }
.hint.err { color: var(--red-d); opacity: 1; }
.screen > .hint, .runnote { color: #fff; }
input { font: inherit; font-size: 20px; font-weight: 900; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 11px 14px; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); user-select: text; -webkit-user-select: text; width: 100%; }
input::placeholder { color: #b3a68a; }
.codebox input { font-family: var(--display); font-size: 40px; letter-spacing: .4em; text-align: center; text-transform: uppercase; padding: 10px 0 10px .4em; }
.row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { font-weight: 900; font-size: 16px; color: var(--ink); padding: 9px 13px; border-radius: 12px; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.seg button.on { background: linear-gradient(#ffe25a, var(--yellow-d)); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 3px 0 var(--ink); }
.seg button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.seg button:disabled { opacity: .4; }
.seg button small { display: block; font-size: 11px; opacity: .7; font-weight: 800; }

.toggle { position: relative; width: 60px; height: 34px; flex: none; border-radius: 18px; background: #c9b994; border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(0,0,0,.15); transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); box-sizing: border-box; box-shadow: 0 2px 0 rgba(0,0,0,.2); transition: transform .15s; }
.toggle[aria-pressed="true"] { background: var(--green); }
.toggle[aria-pressed="true"]::after { transform: translateX(26px); }

/* ---------- Köpfe ---------- */
.selgrid { display: grid; grid-template-columns: 1fr minmax(270px, 340px); gap: 18px; max-width: 1200px; margin: 0 auto; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; align-content: start; }
.ccard {
  --rc: var(--r-basis);
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 10px; border-radius: 18px; border: 3px solid var(--ink);
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.35), transparent 60%), linear-gradient(var(--rc), color-mix(in srgb, var(--rc) 55%, #000));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 5px 0 var(--ink);
}
.ccard:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.ccard b { font-family: var(--display); font-weight: 400; font-size: 17px; margin-top: -4px; }
.ccard.on { outline: 4px solid var(--yellow); outline-offset: 3px; }
.ccard.locked canvas { filter: brightness(.25) contrast(1.2); }
.ccard .lockt { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 2px 0 var(--ink)); }
.ccard .price { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 15px; background: rgba(8,14,50,.75); border-radius: 10px; padding: 2px 8px 2px 3px; margin-top: 3px; text-shadow: none; }
.ccard .price .coin { width: 20px; height: 20px; border-width: 2px; }
.ccard .price .coin::after { inset: 4px; border-width: 1.5px; }
.ccard .check { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%; background: var(--green); border: 3px solid var(--ink); display: grid; place-items: center; }
.ccard .check svg { width: 18px; height: 18px; }
.ccard .p2tag { position: absolute; top: -8px; left: -8px; font-family: var(--display); font-size: 13px; background: var(--p2); border: 2.5px solid var(--ink); border-radius: 8px; padding: 2px 6px 3px; }
.detail { align-self: start; position: sticky; top: 0; background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 0 6px 0 rgba(8,12,40,.55); display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
.det-top { --rc: var(--r-basis); position: relative; display: grid; place-items: center; height: 190px; border-bottom: 3px solid var(--ink); background: repeating-conic-gradient(from 0deg at 50% 60%, rgba(255,255,255,.12) 0 8deg, transparent 8deg 16deg), linear-gradient(var(--rc), color-mix(in srgb, var(--rc) 50%, #000)); }
.det-top .rarity { position: absolute; top: 10px; left: 10px; color: #fff; background: rgba(8,14,50,.6); }
.bigav { display: grid; place-items: center; }
.bigav canvas { max-height: 180px; width: auto !important; }
.detail h3 { font-family: var(--display); font-size: 34px; text-align: center; line-height: 1; }
.superbox { display: flex; gap: 10px; align-items: flex-start; margin: 0 14px; padding: 10px 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; }
.superbox svg { width: 26px; height: 26px; flex: none; color: var(--yellow-d); }
.superbox b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.superbox p { margin: 2px 0 0; font-size: 14px; line-height: 1.3; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 14px; font-weight: 900; margin: 0 14px; }
.stats .bar { height: 12px; background: #e6d6b3; border-radius: 8px; border: 2px solid var(--ink); overflow: hidden; }
.stats .bar i { display: block; height: 100%; background: linear-gradient(#7af0ff, #19a9e0); }
.detail .btn { margin: 4px 14px 0; }

/* ---------- Spiel einstellen ---------- */
.setupgrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; max-width: 1200px; margin: 0 auto; align-items: start; }
.arenas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.atile { position: relative; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; padding: 0; background: #000; text-align: left; aspect-ratio: 16 / 10; box-shadow: 0 4px 0 var(--ink); }
.atile canvas { width: 100%; height: 100%; display: block; }
.atile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; }
.atile .cap b { font-family: var(--display); font-weight: 400; font-size: 19px; display: block; text-shadow: var(--o-sm); }
.atile .cap small { font-size: 12px; font-weight: 800; display: block; line-height: 1.15; opacity: .9; }
.atile.on { outline: 5px solid var(--yellow); outline-offset: 2px; }
.atile.locked canvas { filter: brightness(.35) grayscale(.8); }
.atile .lock { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; align-items: center; background: rgba(8,14,50,.85); border-radius: 12px; padding: 3px 9px 3px 4px; font-family: var(--display); font-size: 15px; color: #fff; }
.atile .lock .coin { width: 22px; height: 22px; border-width: 2px; }
.opts .opt { display: flex; flex-direction: column; gap: 8px; }
.rulesbtn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 14px; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink); }
.rulesbtn svg { width: 24px; height: 24px; flex: none; }
.rulesbtn span { flex: 1; font-weight: 900; font-size: 15px; line-height: 1.25; }
.rulesbtn em { font-style: normal; font-size: 13px; font-weight: 900; padding: 5px 9px; border-radius: 9px; background: var(--ink); color: #fff; }
.rulesbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.opts .btn.big { margin-top: 6px; }

/* Regeln */
.rulewrap { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 2px 6px; margin: -8px 0 0; }
.presets::-webkit-scrollbar { display: none; }
.preset { position: relative; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 16px; border: 3px solid var(--ink); background: linear-gradient(var(--c1, #6b8cff), var(--c2, #3352d6)); box-shadow: 0 4px 0 var(--ink); text-align: left; flex: 1 1 150px; min-width: 0; max-width: 240px; }
.preset b { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 400; font-size: 19px; text-shadow: var(--o-sm); }
.preset small { font-size: 12px; font-weight: 800; opacity: .9; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preset:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.preset.on { outline: 4px solid #fff; outline-offset: 2px; }
.pchk { position: absolute; top: -10px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--ink); display: grid; place-items: center; }
.pchk svg { width: 15px; height: 15px; }
.preset.mine { background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); padding-right: 38px; }
.preset.mine b { text-shadow: none; }
.preset.mine small { opacity: .65; }
.pdel { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(21,17,46,.1); color: var(--ink); }
.pdel svg { width: 13px; height: 13px; }
.pdel:active { background: var(--red); color: #fff; }
.preset.add { background: rgba(255,255,255,.06); border: 3px dashed rgba(255,255,255,.7); box-shadow: none; }
.preset.add b svg { width: 18px; height: 18px; }
.preset.add:disabled { opacity: .45; }
.rulelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.rule { background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 5px 0 rgba(8,12,40,.5); }
.rule h4 { font-family: var(--display); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.rule .seg { flex-wrap: nowrap; gap: 6px; }
.rule .seg button { flex: 1 1 0; min-width: 0; padding: 9px 4px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rulewrap { padding-bottom: 8px; }
body[data-scr=rules] #toasts { top: auto; bottom: calc(96px + var(--sb)); flex-direction: column-reverse; }
.modalcard > .ribbon + p { margin-top: 12px; }
.cdot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow-d); border: 2px solid var(--ink); display: none; }
.rule.changed .cdot { display: inline-block; }
.moretoggle { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: rgba(8,14,50,.55); border: 2.5px solid rgba(255,255,255,.2); font-family: var(--display); font-size: 18px; text-align: left; }
.moretoggle span { flex: 1; }
.moretoggle em { font-style: normal; font-family: var(--body); font-size: 13px; font-weight: 900; padding: 3px 9px; border-radius: 9px; background: var(--yellow); color: var(--ink); }
.moretoggle svg { width: 20px; height: 20px; transform: rotate(-90deg); transition: transform .2s; }
.moretoggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.rulesum { flex: 1; min-width: 0; font-size: 15px; font-weight: 900; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scr-rules .sheetfoot { align-items: center; gap: 14px; padding-left: max(16px, calc(50% - 500px)); padding-right: max(16px, calc(50% - 500px)); }
.sheetfoot { position: sticky; bottom: calc(-16px - var(--sb)); display: flex; justify-content: center; padding: 18px 0 calc(12px + var(--sb)); margin: 10px -16px calc(-16px - var(--sb)); background: linear-gradient(rgba(10,20,80,0), rgba(10,20,80,.92) 45%); z-index: 3; }

/* Cup / Endlos */
.runwrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.bracket { display: flex; gap: 12px; width: 100%; justify-content: center; align-items: stretch; flex-wrap: wrap; }
.round { position: relative; flex: 1 1 150px; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 14px; border-radius: 20px; border: 3px solid var(--ink); background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); box-shadow: 0 5px 0 rgba(8,12,40,.55); text-align: center; }
.round small { font-weight: 900; font-size: 13px; opacity: .6; text-transform: uppercase; letter-spacing: .06em; }
.round b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.round em { font-style: normal; font-size: 13px; font-weight: 800; opacity: .7; }
.round .res { font-family: var(--display); font-size: 20px; }
.round.now { outline: 5px solid var(--yellow); outline-offset: 3px; transform: translateY(-4px); }
.round.won { background: linear-gradient(#b9f7cc, #7fe0a0); }
.round.lost { background: linear-gradient(#ffc2cc, #f28a9c); }
.round.trophy { justify-content: center; color: var(--yellow-d); background: linear-gradient(#fff3c4, #ffd76a); }
.round.trophy svg { width: 72px; height: 72px; filter: drop-shadow(0 4px 0 var(--ink)); }
.runnote { margin: 0; font-family: var(--display); font-size: 24px; text-align: center; text-shadow: var(--o-sm); }
.streakbig { font-family: var(--display); font-size: 96px; line-height: 1; text-shadow: var(--o); color: var(--yellow); }

/* Online & Lobby */
.onlinegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 900px; margin: 0 auto; }
.lobbygrid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; max-width: 1100px; margin: 0 auto; align-items: start; }
.invite { align-items: center; text-align: center; }
.bigcode { font-family: var(--display); font-size: 58px; letter-spacing: .14em; color: var(--purple-d); line-height: 1; padding-left: .14em; }
.qr { background: #fff; border-radius: 14px; padding: 8px; line-height: 0; border: 3px solid var(--ink); }
.qr:empty { display: none; }
.qr img { width: 150px; height: 150px; image-rendering: pixelated; }
.linkline { font-size: 12px; font-weight: 800; word-break: break-all; opacity: .55; user-select: text; -webkit-user-select: text; }
.vsrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.vsp { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vsp b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.vsp small { font-weight: 800; font-size: 13px; opacity: .65; }
.vsav { width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink); }
.vsp.p1 .vsav { background: radial-gradient(circle at 50% 40%, #ffb27f, var(--p1)); }
.vsp.p2 .vsav { background: radial-gradient(circle at 50% 40%, #9cefff, #13a6c4); }
.vsav .wait { font-family: var(--display); font-size: 54px; color: rgba(255,255,255,.75); text-shadow: var(--o-sm); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.vs { font-family: var(--display); font-size: 46px; color: var(--yellow); text-shadow: var(--o); transform: rotate(-8deg); }
.lobbyopts { display: flex; flex-direction: column; gap: 10px; }
.lobbyopts .opt { display: flex; flex-direction: column; gap: 6px; }
.lobbyopts.locked { opacity: .6; pointer-events: none; }

/* Shop */
.deal { max-width: 1200px; margin: 0 auto 14px; }
.dealcard { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 22px; border: 3px solid var(--ink); background: repeating-linear-gradient(-45deg, rgba(255,255,255,.08) 0 14px, transparent 14px 28px), linear-gradient(120deg, #ff5ca8, #9566ff); box-shadow: 0 6px 0 var(--ink); }
.dealcard .dav { width: 90px; height: 90px; flex: none; }
.dealcard .dtxt { flex: 1; min-width: 0; }
.dealcard .dtxt small { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.dealcard .dtxt b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; text-shadow: var(--o-sm); }
.dealcard .dtxt em { font-style: normal; font-size: 14px; font-weight: 800; }
.dealcard s { opacity: .7; margin-right: 6px; }
.dealcard .off { font-family: var(--display); font-size: 22px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 4px 10px; transform: rotate(-6deg); }
.tabs { display: flex; gap: 8px; margin: 0 auto 14px; max-width: 1200px; }
.tabs button { font-family: var(--display); font-size: 19px; padding: 9px 18px 11px; border-radius: 14px; border: 3px solid var(--ink); background: rgba(8,14,50,.6); box-shadow: 0 4px 0 var(--ink); text-shadow: var(--o-sm); }
.tabs button.on { background: linear-gradient(#ffe25a, var(--yellow-d)); }
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; max-width: 1200px; margin: 0 auto; }
.sitem { --rc: var(--r-basis); position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 0 12px; border-radius: 20px; border: 3px solid var(--ink); background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); overflow: hidden; box-shadow: 0 5px 0 rgba(8,12,40,.55); text-align: center; }
.sitem .prev { width: 100%; height: 118px; display: grid; place-items: center; border-bottom: 3px solid var(--ink); background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.35), transparent 60%), linear-gradient(var(--rc), color-mix(in srgb, var(--rc) 50%, #000)); }
.sitem .prev canvas.wide { width: 100%; height: 118px; object-fit: cover; }
.sitem b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.sitem small { font-size: 13px; font-weight: 800; opacity: .65; padding: 0 8px; min-height: 2.5em; line-height: 1.2; }
.sitem .btn { width: calc(100% - 20px); font-size: 17px; padding: 8px 10px 10px; }
.sitem .btn .coin { width: 22px; height: 22px; border-width: 2px; }
.sitem.eq { outline: 4px solid var(--yellow); outline-offset: 2px; }
.sitem .rarity { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 7px 3px; color: #fff; }

/* Aufgaben */
.taskwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1000px; margin: 0 auto; align-items: start; }
.challenge { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; border: 3px solid var(--ink); background: repeating-conic-gradient(from 0deg at 85% 15%, rgba(255,255,255,.08) 0 8deg, transparent 8deg 16deg), linear-gradient(150deg, #ff7a5c, #e0306a); box-shadow: 0 6px 0 var(--ink); }
.challenge .ch-head { display: flex; align-items: center; gap: 10px; }
.challenge .ch-head svg { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 var(--ink)); }
.challenge h3 { font-family: var(--display); font-size: 28px; text-shadow: var(--o-sm); }
.challenge .ch-row { display: flex; align-items: center; gap: 12px; background: rgba(8,14,50,.35); border-radius: 16px; padding: 8px 12px; }
.challenge ul { margin: 0; padding: 0 0 0 18px; font-size: 15px; line-height: 1.5; }
.challenge .done { font-family: var(--display); font-size: 20px; text-align: center; }
.tasklist { display: flex; flex-direction: column; gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; }
.task .tk-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #e6d6b3; border: 2.5px solid var(--ink); }
.task .tk-ic svg { width: 22px; height: 22px; }
.task.done .tk-ic { background: var(--green); color: #fff; }
.task .tk-main { flex: 1; min-width: 0; }
.task b { display: block; font-size: 16px; font-weight: 900; }
.task .prog { height: 10px; background: #e6d6b3; border-radius: 6px; border: 2px solid var(--ink); margin-top: 5px; overflow: hidden; }
.task .prog i { display: block; height: 100%; background: linear-gradient(#7af0ff, #19a9e0); }
.task.done .prog i { background: var(--green); }
.task .tk-rw { display: flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 17px; }
.task .tk-rw .coin { width: 22px; height: 22px; border-width: 2px; }

/* Erfolge */
.profilebox { max-width: 1200px; margin: 0 auto 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pstat { background: rgba(8,14,50,.55); border: 3px solid var(--ink); border-radius: 16px; padding: 10px 12px; }
.pstat b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; text-shadow: var(--o-sm); }
.pstat span { font-size: 13px; font-weight: 900; opacity: .8; }
.achlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; max-width: 1200px; margin: 0 auto; }
.ach { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 rgba(8,12,40,.5); }
.ach .medal { width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #d9c8a3; border: 3px solid var(--ink); color: #a8946b; }
.ach .medal svg { width: 28px; height: 28px; }
.ach.done .medal { background: radial-gradient(circle at 35% 30%, #fff5b8, #ffd42a 50%, #e59a00); color: #fff; }
.ach.done .medal svg { filter: drop-shadow(0 2px 0 var(--ink)); }
.ach b { font-size: 17px; font-weight: 900; display: block; }
.ach p { margin: 0; font-size: 14px; font-weight: 800; opacity: .65; }
.ach .prog { height: 9px; background: #e6d6b3; border-radius: 6px; border: 2px solid var(--ink); margin-top: 5px; overflow: hidden; }
.ach .prog i { display: block; height: 100%; background: var(--blue); }
.ach .rw { margin-left: auto; display: flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 17px; white-space: nowrap; }
.ach .rw .coin { width: 22px; height: 22px; border-width: 2px; }
.ach.done .rw { color: var(--green-d); }

/* Einstellungen */
.settingsgrid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; max-width: 1000px; margin: 0 auto; align-items: start; }
.setrow { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 900; padding: 4px 0; }
.setrow > svg { width: 26px; height: 26px; flex: none; color: var(--ink2); }
.setrow > span { flex: 1; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; font-weight: 800; }
.keys th { text-align: left; opacity: .6; padding: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.keys td { padding: 6px 4px; border-top: 2px solid rgba(21,17,46,.1); }
.keys td:first-child { font-weight: 900; }
kbd { display: inline-block; font-family: var(--body); font-weight: 900; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: #fff; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); margin: 0 2px 2px 0; }

/* Ergebnis */
.endcard, .pausecard { position: relative; width: min(620px, 94vw); background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 4px solid var(--ink); border-radius: 26px; padding: 34px 20px 18px; box-shadow: 0 8px 0 var(--ink), 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 12px; animation: pop .4s cubic-bezier(.2,1.6,.4,1); margin-top: 22px; }
.pausecard { width: min(380px, 92vw); align-items: stretch; }
#scr-end, #scr-pause { padding-top: calc(34px + var(--st)); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.ribbon { position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-2deg); font-family: var(--display); font-size: 36px; color: #fff; white-space: nowrap; padding: 6px 34px 10px; border: 4px solid var(--ink); border-radius: 16px; background: linear-gradient(#6ff094, var(--green-d)); box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 5px 0 var(--ink); }
.ribbon.lose { background: linear-gradient(#ff7a8f, var(--red-d)); }
.ribbon.draw, .ribbon.blue { background: linear-gradient(#6b9bff, var(--blue-d)); }
.ribbon.gold { background: linear-gradient(#ffe25a, var(--yellow-d)); }
.endscore { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.es { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.es b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.es.p1 b { color: #e85a0c; } .es.p2 b { color: #0aa3c2; }
.es-num { font-family: var(--display); font-size: 64px; line-height: 1; display: flex; gap: 8px; align-items: center; }
.es-num i { font-style: normal; opacity: .3; font-size: 44px; }
.endstats { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; font-size: 15px; font-weight: 900; align-items: center; }
.endstats .lbl { text-align: center; opacity: .55; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.endstats .v { font-family: var(--display); font-weight: 400; font-size: 20px; }
.endstats .v.r { text-align: right; }
.rewards { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 14px; }
.rewards:empty { display: none; }
.rw-line { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; animation: scrIn .3s both; }
.rw-line .coin { width: 26px; height: 26px; }
.rw-line b { font-family: var(--display); font-weight: 400; font-size: 21px; }
.rw-line span { opacity: .6; }
.xpwrap { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.xpwrap .xpbar { flex: 1; height: 16px; border-radius: 9px; background: #e6d6b3; border: 2.5px solid var(--ink); overflow: hidden; }
.xpwrap .xpbar i { display: block; height: 100%; background: linear-gradient(#7af0ff, #19a9e0); transition: width .8s .3s; }
.pausecard .btn { width: 100%; }

/* ---------- Spiel-Knöpfe ---------- */
#gameBtns { position: fixed; inset: 0; pointer-events: none; z-index: 22; }
.gbtn { pointer-events: auto; position: absolute; top: calc(8px + var(--st)); width: 46px; height: 46px; border-radius: 14px; background: rgba(8,14,50,.55); border: 2.5px solid rgba(255,255,255,.35); display: grid; place-items: center; color: #fff; }
.gbtn svg { width: 22px; height: 22px; }
#btnPause { right: calc(10px + var(--sr)); }
#btnEmote { left: calc(10px + var(--sl)); }
#emoteBar { position: absolute; top: calc(62px + var(--st)); left: calc(10px + var(--sl)); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
#emoteBar button { width: 48px; height: 48px; border-radius: 14px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 22px; font-family: var(--display); }

/* ---------- Touch-Steuerung (im Streifen unter dem Feld) ---------- */
.touch { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.stickzone { position: absolute; left: 0; bottom: 0; width: 50%; height: 78%; pointer-events: auto; touch-action: none; }
.stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: rgba(8,14,50,.3); opacity: 0; transition: opacity .12s; display: grid; place-items: center; pointer-events: none; }
.stick.on { opacity: 1; }
.knob { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(#fff, #d8e2ff); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.stickhint { position: absolute; left: calc(18px + var(--sl)); bottom: calc(14px + var(--sb)); display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 900; font-size: 15px; transition: opacity .5s; pointer-events: none; }
.stickhint .sh-pad { width: 74px; height: 74px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.45); display: grid; place-items: center; font-size: 22px; opacity: .8; }
.stickhint small { display: block; opacity: .7; font-size: 13px; }
.stickhint.gone { opacity: 0; }
/* unsichtbare Tastenzone: jeder Finger zählt für die nächste Taste */
.tzone { position: absolute; pointer-events: auto; touch-action: none; }
.tzone.big { right: 0; bottom: 0; width: 50%; height: 78%; }
.tzone.small { bottom: 0; height: 150px; width: 250px; }
.tzone.small.left { left: calc(min(130px, 18vw) + 12px + var(--sl)); } .tzone.small.right { right: calc(min(130px, 18vw) + 12px + var(--sr)); }
.tzone.small .tbtns.small.left { left: 4px; } .tzone.small .tbtns.small.right { right: 4px; }
.tbtns { position: absolute; bottom: calc(8px + var(--sb)); display: flex; align-items: flex-end; gap: 8px; pointer-events: none; }
.tbtns.big { right: calc(12px + var(--sr)); }
.tbtn { pointer-events: none; position: relative; border-radius: 50%; border: 3px solid var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0;
  background: linear-gradient(#5a6fae, #2b3a78); box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), inset 0 3px 0 rgba(255,255,255,.3), 0 4px 0 var(--ink); }
.tbtn svg { width: 40%; height: 40%; filter: drop-shadow(0 2px 0 var(--ink)); }
.tbtn span { font-family: var(--display); font-size: 12px; letter-spacing: .03em; text-shadow: var(--o-sm); margin-top: 1px; }
.tbtn.on { transform: translateY(3px) scale(.96); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 1px 0 var(--ink); filter: brightness(1.15); }
.big .kck { width: 104px; height: 104px; }
.big .kck span { font-size: 14px; }
.big .jmp { width: 78px; height: 78px; }
.big .dwn { width: 66px; height: 66px; margin-bottom: 6px; }
.big .sup { width: 64px; height: 64px; margin-bottom: 34px; margin-right: 4px; }
.dwn { background: linear-gradient(#ffa06b, #c8501a); }
.p1 .kck { background: linear-gradient(#ff9a5c, #e04d00); }
.p2 .kck { background: linear-gradient(#7eeaff, #0a95c4); }
.jmp { background: linear-gradient(#6ff094, #179b45); }
.sup { background: linear-gradient(#8b8fb0, #4b4f78); }
.sup::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(var(--yellow) var(--m, 0%), rgba(255,255,255,.12) 0); -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%); mask: radial-gradient(circle, transparent 64%, #000 65%); }
.sup.ready { background: linear-gradient(#ffe25a, var(--yellow-d)); animation: supPulse .55s infinite alternate; }
.sup.armed { background: linear-gradient(#fff3a0, #ffc400); }
@keyframes supPulse { to { box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), 0 4px 0 var(--ink), 0 0 0 8px rgba(255,208,43,.35), 0 0 26px rgba(255,208,43,.8); } }
.kck .charge { position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(#fff var(--c, 0%), transparent 0); -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%); mask: radial-gradient(circle, transparent 64%, #000 65%); }
/* zu zweit an einem Touchscreen */
.slider { position: absolute; bottom: calc(12px + var(--sb)); width: min(130px, 18vw); height: 60px; border-radius: 32px; background: rgba(8,14,50,.6); border: 3px solid var(--ink); pointer-events: auto; touch-action: none; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 20px; color: rgba(255,255,255,.6); box-shadow: inset 0 3px 0 rgba(0,0,0,.3); }
.slider.left { left: calc(10px + var(--sl)); }
.slider.right { right: calc(10px + var(--sr)); }
.slider.p1 { border-color: var(--p1); } .slider.p2 { border-color: var(--p2); }
.sknob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: linear-gradient(#fff, #d8e2ff); border: 3px solid var(--ink); pointer-events: none; }
.tbtns.small { bottom: calc(12px + var(--sb)); gap: 8px; }
.tbtns.small { gap: 6px; }
.tbtns.small.left { left: calc(16px + min(130px, 18vw) + var(--sl)); }
.tbtns.small.right { right: calc(16px + min(130px, 18vw) + var(--sr)); }
.small .tbtn { width: 52px; height: 52px; }
.small .tbtn span { display: none; }

/* ---------- Hinweise, Dialoge ---------- */
#toasts { position: fixed; top: calc(84px + var(--st)); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
body[data-scr=end] #toasts, body[data-scr=home] #toasts { top: auto; bottom: calc(16px + var(--sb)); flex-direction: column-reverse; }
.toast { display: flex; gap: 10px; align-items: center; padding: 8px 16px 9px; border-radius: 16px; border: 3px solid var(--ink); background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); font-weight: 900; font-size: 16px; box-shadow: 0 4px 0 var(--ink); animation: toastIn .35s cubic-bezier(.2,1.6,.4,1), toastOut .4s 2.8s forwards; }
.toast svg { width: 22px; height: 22px; flex: none; }
.toast.gold { background: linear-gradient(#ffe25a, var(--yellow-d)); }
@keyframes toastIn { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }
#modal { position: fixed; inset: 0; z-index: 70; background: rgba(6,10,36,.72); display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding: 40px 16px 16px; }
#modal[hidden] { display: none; }
.modalcard { position: relative; margin-block: auto; flex-shrink: 0; width: min(430px, 94vw); background: linear-gradient(var(--cream), var(--cream2)); color: var(--ink); border: 4px solid var(--ink); border-radius: 26px; padding: 36px 20px 18px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; box-shadow: 0 8px 0 var(--ink); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
.modalcard p { margin: 0; font-size: 17px; font-weight: 800; }
.modalcard .bigic { width: 84px; height: 84px; color: var(--yellow-d); filter: drop-shadow(0 4px 0 var(--ink)); }
.modalcard .btn { min-width: 60%; }
.streak { display: flex; gap: 6px; }
.streak i { width: 34px; height: 34px; border-radius: 10px; background: #e6d6b3; border: 2.5px solid var(--ink); display: grid; place-items: center; font-style: normal; font-family: var(--display); font-size: 15px; }
.streak i.on { background: linear-gradient(#ffe25a, var(--yellow-d)); color: #fff; text-shadow: var(--o-sm); }

#rotate { position: fixed; inset: 0; z-index: 90; background: radial-gradient(circle, var(--blue), var(--blue-dd)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px; }
#rotate b { font-family: var(--display); font-weight: 400; font-size: 34px; text-shadow: var(--o); }
#rotate span { font-size: 17px; font-weight: 800; opacity: .85; }
.phone { width: 62px; height: 104px; border: 5px solid #fff; border-radius: 14px; animation: rot 1.6s ease-in-out infinite; margin-bottom: 20px; box-shadow: 0 4px 0 var(--ink); }
@keyframes rot { 40%, 70% { transform: rotate(-90deg); } }
#loading { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.05) 0 7deg, transparent 7deg 14deg), radial-gradient(circle, var(--blue), var(--blue-dd)); transition: opacity .4s; }
.ld-logo { font-family: var(--display); font-weight: 400; font-size: 54px; line-height: .95; text-align: center; text-shadow: var(--o); transform: rotate(-4deg); }
#loading .ball { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); animation: bounce .55s infinite alternate cubic-bezier(.5,0,1,.5); }
@keyframes bounce { to { transform: translateY(-40px); } }
#loading.done { opacity: 0; pointer-events: none; }

/* ---------- Anpassungen ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .screen { padding-top: calc(6px + var(--st)); }
  .screen.home { grid-template-columns: auto 1fr minmax(250px, 300px); gap: 4px 12px; }
  .bar { min-height: 44px; margin-bottom: 8px; }
  .bar h2 { font-size: 26px; }
  .iconback, .sqbtn { width: 42px; height: 42px; }
  .profile { height: 46px; } .pf-av { width: 38px; height: 38px; } .pf-txt { min-width: 90px; } .pf-xp { width: 96px; }
  .chip { height: 40px; font-size: 18px; }
  .navbtn { width: 62px; height: 62px; border-radius: 16px; } .navbtn svg { width: 26px; height: 26px; } .navbtn span { font-size: 11px; }
  .sidenav { gap: 8px; }
  .plate b { font-size: 28px; } .superline { font-size: 13px; } .rarity { font-size: 11px; padding: 2px 8px 3px; }
  .nextup { margin-top: 6px; padding: 4px 10px 4px 4px; } .nu-av { width: 36px; height: 36px; } .nu-txt b { font-size: 15px; }
  .hs-tasks { display: none; }
  .hs-daily { padding: 6px 10px; } .hd-ic { width: 38px; height: 38px; } .hd-txt b { font-size: 18px; } .hd-av { width: 48px; height: 48px; }
  .homeside { padding-top: 10px; }
  .btn-play { font-size: 34px; padding: 10px 16px 15px; }
  .modecard { padding: 7px 10px; } .mc-ic { width: 46px; height: 46px; } .mc-txt b { font-size: 20px; }
  .playzone { gap: 12px; }
  .mcard { min-height: 170px; } .mcard .big-ic { width: 56px; height: 56px; }
  .det-top { height: 140px; } .bigav canvas { max-height: 130px; }
  .detail h3 { font-size: 26px; }
  .vsav { width: 86px; height: 86px; }
  .bigcode { font-size: 42px; }
  .qr img { width: 110px; height: 110px; }
  .endcard { padding-top: 30px; gap: 8px; }
  .es-num { font-size: 48px; }
  .ribbon { font-size: 28px; }
  #toasts { top: calc(60px + var(--st)); }
  .toast { font-size: 14px; padding: 6px 12px 7px; }
}
@media (orientation: portrait), (max-width: 700px) and (min-height: 521px) {
  .screen.home { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; gap: 10px; }
  .sidenav { flex-direction: row; justify-content: space-between; order: 4; align-self: stretch; }
  .navbtn { flex: 1; height: 66px; width: auto; }
  .stage { order: 2; min-height: 200px; } .playzone { order: 3; gap: 12px; }
  .homeside { flex: none; padding-top: 0; gap: 10px; }
  .hs-tasks { display: none; }
  .selgrid, .setupgrid, .lobbygrid, .onlinegrid, .taskwrap, .settingsgrid { grid-template-columns: 1fr; }
  .detail { position: static; order: -1; }
  .cardgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .modegrid { grid-template-columns: 1fr 1fr; }
  .rulelist { grid-template-columns: 1fr; }
  .pf-txt { min-width: 0; } .pf-xp { width: 80px; }
  .profile { padding-right: 4px; }
  .chip { font-size: 18px; }
  .dealcard { flex-wrap: wrap; padding: 12px 14px; }
  .dealcard .dav { width: 70px; height: 70px; }
  .dealcard .off { position: absolute; top: -12px; right: 12px; font-size: 18px; }
  .dealcard > .btn { flex: 1 1 100%; }
}
@media (max-width: 440px) {
  .star-chip { display: none; }
  .hud-top { gap: 6px; }
  .pf-xp { width: 64px; }
  .screen.home { overflow-x: hidden; }
}
@media (max-width: 400px) {
  .chip-plus { display: none; }
  .pf-xp { width: 52px; }
  .pf-txt b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.dealcard .dav canvas { width: 100% !important; height: 100% !important; }

.lobbygrid:has(#inviteBox[hidden]) { grid-template-columns: minmax(0, 680px); justify-content: center; }

@media (max-height: 400px) and (orientation: landscape) { .homeside { display: none; } .nextup { display: none !important; } }
@media (orientation: portrait) and (max-height: 800px) { .nextup { display: none !important; } }
@media (orientation: portrait) and (max-height: 720px) { .homeside { display: none; } }
@media (orientation: portrait) and (min-height: 1000px) { .hs-tasks { display: flex; } }

/* Hindernis-Auswahl */
.obsopt { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.obsopt h4 { margin: 0; }
.obsrow { display: flex; gap: 12px; align-items: center; }
.obsprev { flex: none; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; line-height: 0; background: #1f8a46; }
.obsprev:empty { display: none; }
.obsrow .hint { margin: 0; font-size: 14px; font-weight: 800; opacity: .75; }

/* Stick zeigt, was hoch/runter macht */
.stick i { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 13px; color: rgba(255,255,255,.55); }
.stick .sk-up { top: 4px; } .stick .sk-dn { bottom: 4px; }
.stick.up .sk-up, .stick.dn .sk-dn { color: var(--yellow); }
.dwn span { font-size: 10px; letter-spacing: 0; }

/* ---------- Regel-Reiter ---------- */
.rtabs { display: flex; gap: 8px; }
.rtabs button { position: relative; font-family: var(--display); font-size: 18px; padding: 8px 18px 10px; border-radius: 14px; border: 3px solid var(--ink); background: rgba(8,14,50,.6); box-shadow: 0 4px 0 var(--ink); text-shadow: var(--o-sm); display: inline-flex; align-items: center; gap: 8px; }
.rtabs button.on { background: linear-gradient(#ffe25a, var(--yellow-d)); }
.rtabs em { font-style: normal; font-family: var(--body); font-size: 12px; font-weight: 900; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; display: grid; place-items: center; text-shadow: none; border: 2px solid var(--ink); }

/* ======================================================================
   Handy quer (wenig Höhe): alles auf einen Bildschirm, nichts Wichtiges zum Scrollen
   ====================================================================== */
@media (max-height: 520px) and (orientation: landscape) {
  .screen { padding: calc(6px + var(--st)) calc(12px + var(--sr)) calc(8px + var(--sb)) calc(12px + var(--sl)); }
  .bar { min-height: 40px; margin-bottom: 8px; gap: 10px; }
  .bar h2 { font-size: 22px; }
  .iconback, .sqbtn { width: 38px; height: 38px; }
  .panel { padding: 10px 12px; gap: 8px; border-radius: 16px; }
  .panel h4 { font-size: 15px; }
  .seg { gap: 6px; }
  .seg button { font-size: 14px; padding: 6px 10px; border-radius: 10px; }
  .btn.big { font-size: 22px; padding: 8px 16px 11px; }
  .hint { font-size: 12px; }

  /* Spielmodus: 4 x 2 Kacheln */
  .modegrid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding-bottom: 0; }
  .mcard { min-height: 0; height: calc((100vh - 72px - var(--st) - var(--sb)) / 2); padding: 10px 12px; gap: 2px; border-radius: 16px; }
  .mcard .big-ic { width: 34px; height: 34px; }
  .mcard b { font-size: 18px; }
  .mcard p { font-size: 11.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mcard .tags { display: none; }
  .mcard .newflag { font-size: 11px; top: 8px; right: 8px; padding: 2px 6px; }
  .mcard::before { width: 110px; height: 110px; }

  /* Spiel einstellen: Arenen als Streifen, rechts Gegner/Regeln/Anpfiff */
  .setupgrid { grid-template-columns: 1.45fr 1fr; gap: 10px; }
  .arenas { grid-auto-flow: column; grid-auto-columns: 128px; grid-template-columns: none; overflow-x: auto; gap: 8px; padding: 4px 4px 8px; margin: -4px -4px -4px; scrollbar-width: none; }
  .arenas::-webkit-scrollbar { display: none; }
  .atile { aspect-ratio: 16 / 9.5; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
  .atile .cap { padding: 12px 8px 4px; }
  .atile .cap b { font-size: 15px; }
  .atile .cap small { display: none; }
  .atile.on { outline-width: 4px; }
  .atile .lock { top: 5px; right: 5px; font-size: 12px; padding: 1px 6px 1px 2px; }
  .atile .lock .coin { width: 16px; height: 16px; }
  .obsopt { margin-top: 4px; gap: 6px; }
  .obsopt .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .obsopt .seg::-webkit-scrollbar { display: none; }
  .obsopt .seg button { flex: none; }
  .obsrow { gap: 8px; }
  .obsprev canvas { width: 120px !important; height: 53px !important; }
  .obsrow .hint { font-size: 12px; line-height: 1.25; }
  .opts .opt { gap: 6px; }
  .opts .seg button { padding: 6px 8px; }
  .rulesbtn { padding: 7px 10px; } .rulesbtn span { font-size: 13px; } .rulesbtn em { font-size: 11px; padding: 4px 7px; }

  /* Regeln: Reiter, Zeilen mit Name links und Auswahl rechts */
  .rulewrap { gap: 8px; }
  .presets { flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 6px 2px 2px; scrollbar-width: none; }
  .presets::-webkit-scrollbar { display: none; }
  .preset { flex: none; min-width: 120px; max-width: 170px; padding: 5px 10px; border-radius: 12px; }
  .preset b { font-size: 15px; } .preset small { font-size: 10.5px; }
  .preset.mine { padding-right: 32px; }
  .rtabs button { font-size: 15px; padding: 5px 14px 7px; border-radius: 11px; }
  .rulelist { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 10px; }
  .rule { min-width: 0; flex-direction: row; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 12px; box-shadow: 0 3px 0 rgba(8,12,40,.5); }
  .rule h4 { font-size: 13px; width: 74px; flex: none; line-height: 1.05; hyphens: auto; overflow-wrap: anywhere; }
  .rule .seg { flex: 1; min-width: 0; gap: 4px; }
  .rule .seg button { font-size: 12px; padding: 6px 1px; border-radius: 8px; box-shadow: 0 2px 0 var(--ink); border-width: 2px; }
  #scr-rules .sheetfoot { padding-top: 8px; padding-bottom: calc(6px + var(--sb)); margin-top: 4px; }
  #scr-rules .sheetfoot .btn.big { padding: 6px 18px 9px; font-size: 20px; }
  .rulesum { font-size: 12.5px; }

  /* Köpfe: 6 x 2 Raster links, Details rechts */
  .selgrid { grid-template-columns: 1fr 240px; gap: 10px; }
  .cardgrid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .ccard { padding: 4px 2px 5px; border-radius: 12px; gap: 0; }
  .ccard canvas { width: 54px !important; height: 54px !important; }
  .ccard b { font-size: 12px; margin-top: -2px; }
  .ccard .price { font-size: 11px; padding: 1px 5px 1px 2px; } .ccard .price .coin { width: 14px; height: 14px; }
  .ccard .lockt { width: 22px; height: 22px; }
  .ccard .check { width: 20px; height: 20px; top: -5px; right: -5px; } .ccard .check svg { width: 12px; height: 12px; }
  .detail { gap: 5px; padding-bottom: 8px; border-radius: 16px; position: static; }
  .det-top { height: 92px; }
  .det-top .rarity { font-size: 10px; padding: 2px 7px; top: 6px; left: 6px; }
  .bigav canvas { max-height: 86px; }
  .detail h3 { font-size: 20px; }
  .superbox { margin: 0 8px; padding: 5px 8px; gap: 6px; border-radius: 10px; }
  .superbox svg { width: 18px; height: 18px; } .superbox b { font-size: 14px; } .superbox p { font-size: 11px; }
  .stats { margin: 0 8px; gap: 3px 8px; font-size: 11px; } .stats .bar { height: 8px; }
  .detail .btn { margin: 2px 8px 0; padding: 7px 12px 9px; font-size: 16px; }

  /* Shop: Reiter + Angebot in einer Zeile, Artikel als Wischreihe */
  #scr-shop { display: flex; flex-direction: column; }
  .shoptop { display: flex; gap: 10px; align-items: center; }
  .tabs { margin: 0; gap: 6px; }
  .tabs button { font-size: 15px; padding: 5px 12px 7px; border-radius: 11px; }
  #dealBox { flex: 1; min-width: 0; }
  .dealcard { padding: 4px 10px 4px 6px; gap: 8px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
  .dealcard .dav { width: 44px; height: 44px; }
  .dealcard .dtxt small { font-size: 9.5px; } .dealcard .dtxt b { font-size: 16px; } .dealcard .dtxt em { font-size: 11px; }
  .dealcard .off { font-size: 13px; padding: 1px 6px; }
  .dealcard > .btn { padding: 5px 10px 7px; font-size: 15px; }
  .shopgrid { grid-auto-flow: column; grid-auto-columns: 136px; grid-template-columns: none; overflow-x: auto; overflow-y: hidden; gap: 10px; margin: 10px 0 0; padding: 4px 2px 10px; flex: 1; align-items: stretch; scrollbar-width: none; }
  .shopgrid::-webkit-scrollbar { display: none; }
  .sitem { gap: 3px; padding-bottom: 8px; border-radius: 14px; }
  .sitem .prev { height: 92px !important; }
  .sitem .prev canvas { max-height: 86px; width: auto !important; }
  .sitem .prev canvas.wide { width: 100% !important; height: 100% !important; max-height: none; }
  .sitem b { font-size: 15px; } .sitem small { font-size: 10.5px; }
  .sitem .btn.small { font-size: 13px; padding: 4px 10px 6px; }

  /* Einstellungen und Aufgaben kompakt */
  .settingsgrid { gap: 10px; }
  .settingsgrid .panel { gap: 6px; }
  .setrow { min-height: 34px; font-size: 14px; }
  .toggle { transform: scale(.85); transform-origin: right center; }
  input { font-size: 16px; padding: 7px 10px; }
  body.is-touch .keys, body.is-touch .settingsgrid .kbhint { display: none; }
  .taskwrap { gap: 10px; }
  .challenge { padding: 10px 12px; gap: 6px; }
  .ch-row canvas { width: 54px !important; height: 54px !important; }
  .task { padding: 6px 10px; }
}
/* Handy hochkant: Streifen statt Raster, damit nichts endlos scrollt */
@media (max-width: 700px) and (orientation: portrait) {
  .arenas { grid-auto-flow: column; grid-auto-columns: 150px; grid-template-columns: none; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
  .arenas::-webkit-scrollbar { display: none; }
  .atile .cap small { display: none; }
  .obsopt .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .obsopt .seg button { flex: none; }
  .modegrid { gap: 10px; }
  .mcard { min-height: 0; padding: 12px; }
  .mcard .big-ic { width: 40px; height: 40px; }
  .mcard b { font-size: 20px; } .mcard p { font-size: 12.5px; } .mcard .tags { display: none; }
  .rule { gap: 6px; padding: 8px 10px; }
  .rule h4 { font-size: 15px; }
  .rule .seg button { font-size: 13.5px; padding: 7px 2px; }
  .presets .preset { flex: 1 1 140px; padding: 6px 10px; }
  .preset small { font-size: 11px; }
  .det-top { height: 130px; }
  .bigav canvas { max-height: 120px; }
  .cardgrid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .ccard canvas { width: 62px !important; height: 62px !important; }
  .ccard b { font-size: 13px; }
  body.is-touch .keys { display: none; }
}

/* Shop-Kopf: Reiter und Angebot (Desktop untereinander) */
.shoptop { display: flex; flex-direction: column-reverse; gap: 14px; max-width: 1200px; margin: 0 auto 14px; }
.shoptop .tabs { margin: 0; }
@media (max-height: 520px) and (orientation: landscape) { .shoptop { flex-direction: row; margin: 0; max-width: none; } }
.setupgrid > *, .selgrid > *, .taskwrap > *, .settingsgrid > * { min-width: 0; }
.stats .bar { min-height: 0; margin: 0; }
@media (max-height: 520px) and (orientation: landscape) {
  .settingsgrid .panel { gap: 3px; }
  .setrow { min-height: 30px; }
  .challenge h3 { font-size: 18px; }
  .ch-row ul { font-size: 13px; }
}
/* Sehr flache Handys (≤ 380 px hoch): letzte Pixel sparen */
@media (max-height: 380px) and (orientation: landscape) {
  .bar { min-height: 36px; margin-bottom: 6px; }
  .iconback, .sqbtn { width: 34px; height: 34px; }
  .setrow { min-height: 27px; padding: 1px 0; }
  .settingsgrid .panel h4 { margin: 0; }
  .tasklist { gap: 6px; }
  .task { padding: 4px 10px; }
  .task .tk-ic { width: 30px; height: 30px; }
  .task b { font-size: 14px; }
  .challenge { padding: 8px 10px; gap: 4px; }
  .preset { padding: 3px 10px; }
  .preset small { font-size: 11px; }
  .rtabs button { font-size: 15px; padding: 4px 14px 6px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .shopgrid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sitem b { font-size: 14px; } .sitem small { font-size: 10px; }
  .sitem .prev { height: 84px !important; } .sitem .prev canvas { max-height: 78px; width: auto !important; }
  .sitem .btn.small { font-size: 12px; padding: 4px 8px 6px; }
  .superbox { padding: 6px 8px; } .superbox p { font-size: 12px; }
  .detail { gap: 6px; padding-bottom: 10px; }
  .detail h3 { font-size: 24px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Endkarte: zweispaltig, alles sichtbar */
  #scr-end { padding-top: calc(26px + var(--st)); }
  .endcard { width: min(700px, 96vw); display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "score rw" "stats rw" "stats note" "stats btns"; column-gap: 14px; row-gap: 6px; padding: 24px 14px 12px; border-radius: 20px; }
  .endcard .ribbon { font-size: 22px; top: -20px; padding: 4px 22px 7px; }
  .endscore { grid-area: score; gap: 8px; }
  .endscore canvas { width: 58px !important; height: 58px !important; }
  .endscore .es b { font-size: 13px; }
  .es-num { font-size: 40px; } .es-num i { font-size: 28px; }
  .endstats { grid-area: stats; align-self: start; gap: 1px 8px; }
  .endstats .v { font-size: 15px; } .endstats .lbl { font-size: 10.5px; }
  .rewards { grid-area: rw; align-self: start; padding: 8px 10px; gap: 4px; }
  .rw-line { font-size: 13px; gap: 6px; } .rw-line .coin { width: 18px; height: 18px; } .rw-line b { font-size: 15px; }
  #endNote { grid-area: note; margin: 0; font-size: 12px; }
  .endcard .row { grid-area: btns; align-self: end; gap: 6px; flex-wrap: nowrap; }
  .endcard .row .btn { padding: 6px 10px 8px; font-size: 14px; }
  .endcard .row .btn.big { font-size: 17px; padding: 6px 14px 9px; }
  .endcard .row .btn svg { width: 16px; height: 16px; }
  /* Pause */
  .pausecard { padding: 26px 16px 12px; gap: 8px; }
  .pausecard .btn { padding: 7px 14px 9px; font-size: 16px; }
  /* Lobby: Einladung schmal, Auswahl als Wischreihen */
  .lobbygrid { grid-template-columns: 196px 1fr; gap: 10px; }
  .invite { gap: 6px; }
  .bigcode { font-size: 30px; }
  .qr { padding: 4px; border-radius: 10px; } .qr img { width: 74px; height: 74px; }
  .invite .btn { padding: 5px 10px 7px; font-size: 13px; }
  .invite .hint { display: none; }
  #lobbyLink { font-size: 9px; word-break: break-all; }
  .vsrow { gap: 6px; }
  .vsav { width: 58px; height: 58px; } .vsav .wait { font-size: 28px; }
  .vsrow b, .vsrow .vsname { font-size: 14px; } .vsrow small { font-size: 10px; }
  .lobbyopts { gap: 6px; }
  .lobbyopts .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
  .lobbyopts .seg::-webkit-scrollbar { display: none; }
  .lobbyopts .seg button { flex: none; }
  #lobbyNote { font-size: 12px; margin: 0; }
  #scr-lobby .row .btn { padding: 6px 12px 8px; font-size: 15px; }
  /* Modals (Tages-Challenge, Level, neuer Kopf) */
  #modal { padding: 26px 12px 10px; }
  .modalcard { padding: 24px 14px 12px; gap: 6px; width: min(460px, 94vw); }
  .modalcard .ribbon { font-size: 20px; top: -18px; }
  .modalcard .bigic { width: 40px; height: 40px; }
  .modalcard .briefav canvas { width: 64px !important; height: 64px !important; }
  .modalcard .briefav + p, .modalcard p { font-size: 13px; }
  .modalcard .btn.big { font-size: 18px; padding: 6px 16px 9px; }
  .modalcard:has(.briefav) .bigic { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .vsav { width: 52px; height: 52px; overflow: hidden; }
  .vsav canvas { width: 100% !important; height: 100% !important; }
  .lobbyopts .opt { flex-direction: row; align-items: center; gap: 8px; }
  .lobbyopts .opt h4 { width: 86px; flex: none; }
  .lobbyopts .opt .seg, .lobbyopts .opt .rulesbtn { flex: 1; min-width: 0; }
  #scr-lobby .panel { gap: 6px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .lobbygrid { gap: 10px; }
  .invite { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "qr code" "qr btns" "link link"; gap: 6px 12px; text-align: left; align-items: center; }
  .invite h4 { display: none; }
  .invite .qr { grid-area: qr; } .qr img { width: 92px; height: 92px; }
  .bigcode { grid-area: code; font-size: 34px; }
  .invite .row, .invite .btns { grid-area: btns; }
  #lobbyLink { grid-area: link; font-size: 10px; word-break: break-all; }
  .invite .hint { display: none; }
  .vsav { width: 84px; height: 84px; overflow: hidden; } .vsav canvas { width: 100% !important; height: 100% !important; }
  .lobbyopts .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .lobbyopts .seg button { flex: none; }
  .endcard { padding: 30px 14px 14px; gap: 8px; }
}
