/* =====================================================================
   KNIFFLATRO – Eigener Pixel-Look: Dschungel-Würfelkneipe
   Warmes Holz, Bambus-Rahmen, Smaragd-Filz & Messing-Akzente
   ===================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0d0a07; }
body { font-family: 'VT323', monospace; color: #f6eedc; user-select: none; font-size: 22px; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
#stage { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center center; }
#screen { position: absolute; inset: 0; }
/* Warmer Laternen-Vignetten-Look statt kaltem Casino-TV */
#crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background: radial-gradient(ellipse at center, rgba(255,228,170,0.06) 0%, rgba(16,11,6,0.34) 100%);
  box-shadow: inset 0 0 110px rgba(10,6,2,.46);
}
img.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }
.muted { color: #b5a48b; font-size: 18px; }
b { font-weight: normal; }

/* ---------- Holz- & Tavernen-Panels ---------- */
.panel {
  background: linear-gradient(180deg, rgba(46, 32, 22, .96) 0%, rgba(32, 22, 15, .96) 100%);
  border: 3px solid #140c06; border-radius: 8px;
  box-shadow: inset 0 0 0 2px #785337, inset 0 2px 0 #9c6e49, 0 6px 0 rgba(0,0,0,.55);
  padding: 10px 12px;
}
.slotlabel { position: absolute; top: -20px; left: 6px; font-family: 'Press Start 2P'; font-size: 9px; color: #e2c99d; text-shadow: 2px 2px 0 #140c06; }

/* ---------- Geschnitzte Holz- & Messing-Buttons ---------- */
.btn {
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: #fff8e8; text-shadow: 2px 2px 0 rgba(0,0,0,.55);
  border: 3px solid #140c06; border-radius: 7px; padding: 12px 16px; cursor: pointer; position: relative; top: 0;
  background: linear-gradient(180deg, #d9822b 0%, #b56218 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 5px 0 #140c06; transition: filter .1s;
}
.btn:hover { filter: brightness(1.14); }
.btn:active { top: 4px; box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 1px 0 #140c06; }
.btn.big { font-size: 15px; padding: 16px 22px; }
.btn.small { font-size: 10px; padding: 9px 12px; }
.btn.tiny { font-size: 8px; padding: 6px 6px; border-width: 2px; box-shadow: 0 3px 0 #140c06; }
.btn.blue { background: linear-gradient(180deg, #2e9a78 0%, #1e7358 100%); }
.btn.red { background: linear-gradient(180deg, #d95238 0%, #a83620 100%); }
.btn.green { background: linear-gradient(180deg, #4ead42 0%, #34822b 100%); }
.btn.gray { background: linear-gradient(180deg, #6e5540 0%, #4f3b2b 100%); }
.btn.purple { background: linear-gradient(180deg, #8f56c4 0%, #663894 100%); }
.btn.gold {
  background: linear-gradient(180deg, #ffe270 0%, #d49818 100%);
  color: #140a00 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.75) !important;
}
.btn.active { outline: 3px solid #ffe066; animation: pulse .8s infinite; }
.btn:disabled { background: #3b2d22; color: #7a6856; cursor: default; filter: none; text-shadow: none; box-shadow: 0 5px 0 #140c06; }
.btn:disabled:active { top: 0; }
@keyframes pulse { 50% { filter: brightness(1.35); } }
.mute { position: absolute; right: 10px; bottom: 8px; z-index: 300; width: 34px; height: 34px; border-radius: 7px; border: 3px solid #140c06; background: #6e5540; color: #fff8e8; font-size: 20px; cursor: pointer; box-shadow: 0 4px 0 #140c06; }
.mute.off { background: #36291e; color: #7a6856; text-decoration: line-through; }

/* ---------- Titelbildschirm (Holzschild & Bonobo-Ehrenplatz) ---------- */
.title-screen { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.logo-sign {
  background: linear-gradient(180deg, #4a301d 0%, #2e1d11 100%);
  border: 4px solid #140c06; border-radius: 14px; padding: 18px 36px 14px;
  box-shadow: inset 0 0 0 3px #8a5e3b, inset 0 0 0 6px #382314, 0 10px 0 rgba(0,0,0,.6);
  text-align: center;
}
.logo { font-family: 'Press Start 2P'; font-size: 72px; letter-spacing: 4px; text-shadow: 5px 5px 0 #140c06, -2px -2px 0 #140c06, 2px -2px 0 #140c06, -2px 2px 0 #140c06; }
.logo span { display: inline-block; animation: wave 2.5s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.subtitle { font-family: 'Press Start 2P'; font-size: 13px; color: #b7e892; text-shadow: 2px 2px 0 #140c06; letter-spacing: 2px; margin-top: 10px; }
.title-dice { display: flex; gap: 18px; }
.tdie { width: 76px; height: 76px; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(0,0,0,.55)); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.menu {
  display: flex; flex-wrap: wrap; gap: 12px 16px;
  align-items: center; justify-content: center;
  max-width: 1140px;
}
.title-screen .menu .btn {
  width: 268px; height: 54px;
  padding: 0 14px; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap; flex: none;
}

/* Bonobo-Widmung mit Dschungel-Rahmen */
.dedication {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(180deg, #1f3622 0%, #142416 100%);
  padding: 12px 28px; border-radius: 14px; border: 3px solid #140c06;
  box-shadow: inset 0 0 0 3px #4d8048, 0 7px 0 rgba(0,0,0,.55);
}
.bonobo-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dedication .bonobo { width: 112px; height: 84px; animation: bob 2.2s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(0,0,0,.6)); }
.dedication .bonobo.flip { transform: scaleX(-1); animation: bobflip 2.2s ease-in-out infinite .5s; }
@keyframes bobflip { 0%, 100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-7px); } }
.btag { font-family: 'Press Start 2P'; font-size: 10px; color: #ffe066; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 6px; border: 2px solid #140c06; }
.ded-leaf { font-family: 'Press Start 2P'; font-size: 10px; color: #8fe87b; margin-bottom: 6px; letter-spacing: 1px; }
.ded-text { font-size: 24px; text-align: center; line-height: 26px; color: #f5eedc; }
.ded-text b { font-family: 'Press Start 2P'; font-size: 15px; color: #ffd23a; }

/* ---------- Layout links (gemeinsam) ---------- */
.left { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.runinfo { display: flex; justify-content: space-between; }
.ri { display: flex; flex-direction: column; align-items: center; font-size: 18px; color: #cbb699; }
.ri b { font-family: 'Press Start 2P'; font-size: 13px; color: #fff8e8; margin-top: 4px; }
.gold { color: #ffd23a !important; }
.ladder { padding: 8px 10px; }
.ltitle { font-family: 'Press Start 2P'; font-size: 10px; color: #ffd866; margin-bottom: 6px; display: flex; justify-content: space-between; }
.ltitle span { color: #fff8e8; }
.lrow { display: grid; grid-template-columns: 30px 24px 1fr auto; align-items: center; gap: 6px; font-size: 19px; line-height: 22px; padding: 1px 4px; border-radius: 4px; }
.lrow img { width: 22px; height: 22px; }
.lrow .lrank { color: #b8a388; }
.lrow .lscore { color: #8be0b8; }
.lrow.beaten { opacity: .45; text-decoration: line-through; }
.lrow.lboss .lname { color: #ff8f80; }
.lrow.me { background: #ffd23a; color: #170c00; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,.55); text-decoration: none; opacity: 1; margin: 2px 0; }
.lrow.me .lrank, .lrow.me .lscore { color: #170c00; }
.lname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-owned { flex: 1; overflow: hidden; }
.mo-title { font-family: 'Press Start 2P'; font-size: 9px; color: #dec49b; margin: 6px 0 4px; }
.mo-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mdie, .micon { width: 34px; height: 34px; }
.mo-row .ownslot { flex-direction: row; gap: 2px; }

/* ---------- Gegnerwahl (Steckbrief-Tafeln am Holzbrett) ---------- */
.blinds { display: grid; grid-template-columns: 280px 1fr; gap: 16px; padding: 16px; height: 100%; }
.bcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; }
.bcol { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 14px; height: 600px; opacity: .6; transform: translateY(36px); transition: transform .3s; }
.bcol.current { opacity: 1; transform: none; box-shadow: inset 0 0 0 3px #ffd23a, 0 8px 0 rgba(0,0,0,.6); }
.bcol.boss { background: linear-gradient(180deg, rgba(64, 22, 22, .96) 0%, rgba(40, 12, 12, .96) 100%); }
.btype { font-family: 'Press Start 2P'; font-size: 13px; color: #8fe8b4; }
.bcol.boss .btype { color: #ff7b6b; }
.portrait { width: 120px; height: 120px; filter: drop-shadow(0 5px 0 rgba(0,0,0,.55)); }
.bcol.current .portrait { animation: bob 1.8s ease-in-out infinite; }
.bname { font-family: 'Press Start 2P'; font-size: 14px; line-height: 20px; }
.btarget { background: #1a110a; border: 2px solid #4a3321; border-radius: 7px; padding: 8px 14px; width: 100%; color: #cbb699; font-size: 19px; }
.btarget b { display: block; font-family: 'Press Start 2P'; font-size: 20px; color: #ff9b42; margin-top: 6px; }
.breward span { color: #ffd23a; font-family: 'Press Start 2P'; font-size: 13px; }
.beffect { background: #591c1c; border: 2px solid #140c06; border-radius: 7px; padding: 6px 8px; font-size: 19px; line-height: 20px; color: #ffd8d0; }
.beffect.plain { background: none; border: none; color: #b5a48b; }
.bbottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.bstate { font-family: 'Press Start 2P'; font-size: 12px; color: #b5a48b; padding: 14px; }
.bstate.win { color: #75d471; }
.skip { display: flex; gap: 8px; align-items: center; text-align: left; font-size: 17px; line-height: 17px; background: rgba(0,0,0,.38); padding: 6px 8px; border-radius: 7px; border: 1px solid #593e28; }
.skip img { width: 40px; height: 40px; flex: none; }
.skip b { color: #ffd866; }

/* ---------- Spielbildschirm ---------- */
.play { display: grid; grid-template-columns: 270px 1fr 330px; gap: 14px; padding: 14px; height: 100%; }
.opp { display: grid; grid-template-columns: 64px 1fr; gap: 4px 10px; align-items: center; }
.opp img { width: 64px; height: 64px; }
.opp.boss { background: linear-gradient(180deg, rgba(68, 20, 20, .96), rgba(44, 12, 12, .96)); box-shadow: inset 0 0 0 3px #b83b2b, 0 6px 0 rgba(0,0,0,.55); }
.otype { font-family: 'Press Start 2P'; font-size: 8px; color: #8fe8b4; }
.opp.boss .otype { color: #ff8f80; }
.oname { font-family: 'Press Start 2P'; font-size: 11px; line-height: 16px; margin: 4px 0; }
.otarget { font-size: 19px; color: #cbb699; }
.otarget b { font-family: 'Press Start 2P'; font-size: 13px; color: #ff9b42; }
.oeffect { grid-column: 1 / -1; font-size: 17px; line-height: 17px; color: #ffd8d0; }
.rscore { text-align: center; }
.lbl { font-size: 17px; color: #cbb699; }
.rscore .big { font-family: 'Press Start 2P'; font-size: 22px; margin: 4px 0 6px; color: #fff8e8; }
.bar { height: 10px; background: #140c06; border-radius: 5px; overflow: hidden; border: 2px solid #4a3321; }
.bar div { height: 100%; width: 0; background: linear-gradient(90deg, #d9822b, #75d471); transition: width .1s; }
.hand { text-align: center; }
#handName { font-family: 'Press Start 2P'; font-size: 12px; min-height: 18px; color: #fff8e8; margin-bottom: 8px; }
#handName small { font-size: 8px; color: #cbb699; }
#handName .total { color: #ffd866; font-size: 14px; }
.cxm { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cxm .x { font-family: 'Press Start 2P'; font-size: 14px; color: #ffd23a; }
/* Eigene Farben statt Balatro-Blau/Rot: Smaragd-Jade für Augen/Chips & Bernstein-Feuer für Mult */
.chips, .mult { flex: 1; font-family: 'Press Start 2P'; font-size: 17px; padding: 10px 4px; border-radius: 7px; border: 3px solid #140c06; box-shadow: inset 0 2px 0 rgba(255,255,255,.22), 0 4px 0 #140c06; overflow: hidden; }
.chips { background: #1f8a70; text-align: right; padding-right: 10px; }
.mult { background: #d96b27; text-align: left; padding-left: 10px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: rgba(38, 26, 18, .95); border: 3px solid #140c06; border-radius: 7px; text-align: center; padding: 4px; box-shadow: inset 0 0 0 2px #6b4930; }
.stat .num { font-family: 'Press Start 2P'; font-size: 16px; margin: 2px 0 2px; }
.num.blue { color: #6be0b8; } .num.red { color: #ff9b42; }
.play .ladder { flex: 1; overflow: hidden; }

.center { display: flex; flex-direction: column; min-width: 0; }
/* Holzregal für Talismane */
.talismans {
  position: relative; display: flex; gap: 10px; justify-content: center; margin-top: 22px;
  background: linear-gradient(180deg, rgba(28, 18, 11, .78), rgba(48, 32, 20, .85));
  border: 3px solid #140c06; box-shadow: inset 0 -4px 0 #6b462b, 0 4px 0 rgba(0,0,0,.45);
  border-radius: 10px; padding: 10px;
}
/* =====================================================================
   3D-Würfeltisch in der Mitte (wie bei Rune Dice / echtem Tisch-Kniffel)
   Gekippter 3D-Holztisch mit vorderer Tischkante, tiefem Filz-Innenrahmen
   und Würfeln, bei denen man klar erkennt, welche Seite OBEN liegt!
   ===================================================================== */
.tray {
  flex: 1; position: relative; display: flex; flex-direction: column;
  perspective: 900px;
  margin: 8px 4px 10px;
  background: none; border: none; box-shadow: none; overflow: visible;
}
.table-board {
  flex: 1; width: 100%; position: relative; overflow: visible;
  transform: rotateX(22deg);
  transform-origin: 50% 85%;
  background:
    radial-gradient(ellipse at 58% 48%, rgba(62, 138, 86, .95) 0%, rgba(33, 82, 50, .98) 62%, rgba(18, 48, 29, 1) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 2px, rgba(0,0,0,.03) 2px 4px);
  border: 4px solid #140c06; border-radius: 22px;
  box-shadow:
    inset 0 0 0 7px #8c5a35,
    inset 0 0 0 11px #4f311b,
    inset 0 0 0 14px #d9a84e,
    inset 0 18px 28px rgba(0,0,0,.72),
    0 14px 0 #3d2412,
    0 18px 0 #140c06,
    0 26px 28px rgba(0,0,0,.68);
}
.table-front-lip { display: none; }

/* Echter 6-seitiger 3D-Pixel-Würfel auf dem gekippten Tisch:
   cf-top liegt OBEN und zeigt klar den gewürfelten Wert! */
.die {
  --sz: 58px;
  --hz: 29px;
  position: absolute; width: 74px; height: 74px; cursor: pointer;
  margin-left: -37px; margin-top: -37px;
  perspective: 540px;
  display: flex; align-items: center; justify-content: center;
  transition: left .28s ease-out, top .28s ease-out, transform .18s cubic-bezier(.2,.8,.3,1.2);
}
.die .die-shadow {
  position: absolute; bottom: -6px; left: 7px; width: 62px; height: 26px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 72%);
  border-radius: 50%; pointer-events: none; transition: transform .18s, opacity .18s;
}
.die .cube {
  width: var(--sz); height: var(--sz); position: relative;
  transform-style: preserve-3d;
  /* pitch = -44deg kippt den Würfel so zum Spieler, dass cf-top (die OBEN liegende Seite!)
     perfekt lesbar obenauf liegt und gleichzeitig die 3D-Seitenwände sichtbar sind! */
  transform: rotateX(var(--pitch, -44deg)) rotateY(var(--yaw, 18deg));
  transition: transform .22s cubic-bezier(.2,.8,.3,1.2);
}
.die .cface {
  position: absolute; width: var(--sz); height: var(--sz);
  backface-visibility: hidden;
}
.die .cface img { width: 100%; height: 100%; display: block; }
.die .cf-front  { transform: rotateY(0deg)   translateZ(var(--hz)); filter: brightness(0.86); }
.die .cf-back   { transform: rotateY(180deg) translateZ(var(--hz)); filter: brightness(0.7); }
.die .cf-right  { transform: rotateY(90deg)  translateZ(var(--hz)); filter: brightness(0.75); }
.die .cf-left   { transform: rotateY(-90deg) translateZ(var(--hz)); filter: brightness(0.78); }
/* Die OBEN liegende Hauptfläche (cf-top) ist voll beleuchtet und hat einen goldenen Glanzrahmen! */
.die .cf-top    { transform: rotateX(90deg)  translateZ(var(--hz)); filter: brightness(1.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.die .cf-bottom { transform: rotateX(-90deg) translateZ(var(--hz)); }

/* Kleines dezentes Zahlen-Badge unten rechts am Würfel für 100% sofortige Lesbarkeit */
.die .val-pip {
  position: absolute; right: -2px; bottom: -4px; z-index: 7;
  font-family: 'Press Start 2P'; font-size: 9px; line-height: 11px;
  background: rgba(20, 12, 6, .92); color: #fff8e8;
  border: 2px solid #8c5a35; border-radius: 5px; padding: 2px 4px;
  text-shadow: 1px 1px 0 #000; pointer-events: none;
}
.die.inCombo .val-pip { border-color: #ffd23a; color: #ffd23a; }

.die:hover { transform: translateY(-8px) scale(1.08); z-index: 90 !important; }
.die:hover .cube { transform: rotateX(-52deg) rotateY(calc(var(--yaw, 18deg) * 0.6)) scale3d(1.06, 1.06, 1.06); }
/* Gehaltene Würfel: Behalten exakt ihre echte 3D-Würfelform & ihren 3D-Winkel –
   die orangefarbene 3D-Kante liegt direkt in den 6 Pixel-Seitenflächen des 3D-Würfels! */
.die.held {
  transform: translateY(-10px);
}
.die.held .cube {
  transform: rotateX(var(--pitch, -44deg)) rotateY(var(--yaw, 18deg)) scale3d(1.06, 1.06, 1.06);
}
.die.held .val-pip {
  background: #ff7b1a !important;
  color: #140a00 !important;
  border-color: #140c06 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.7) !important;
}
.die.held .die-shadow {
  transform: translateY(10px) scale(.86);
  opacity: .85;
  background: radial-gradient(ellipse at center, rgba(255,123,26,.9) 0%, rgba(0,0,0,0) 72%);
}
.die.held::after {
  content: 'GEHALTEN'; position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%);
  font-family: 'Press Start 2P'; font-size: 7px;
  color: #140a00; text-shadow: 0 1px 0 rgba(255,255,255,.7);
  background: linear-gradient(180deg, #ffa033 0%, #ff7315 100%);
  padding: 2px 6px; border-radius: 4px; border: 2px solid #140c06;
  box-shadow: 0 2px 0 rgba(0,0,0,.6); z-index: 8;
}
.die.inCombo .cf-top img { filter: drop-shadow(0 0 6px #ffd866) brightness(1.12); }
.die.targeting { cursor: crosshair; }
.die.targeting .cube { animation: pulse .7s infinite; }
.hint { text-align: center; font-size: 19px; color: #dec49b; min-height: 22px; text-shadow: 2px 2px 0 #140c06; }
.hint.active { color: #ffe066; animation: pulse .8s infinite; }
.actions { display: flex; gap: 10px; justify-content: center; margin: 8px 0 14px; }
.bottom { display: flex; gap: 14px; justify-content: space-between; }
.tricks, .cups {
  position: relative; display: flex; gap: 8px; align-items: center;
  background: rgba(28, 18, 11, .75); border: 2px solid #140c06; box-shadow: inset 0 0 0 2px #593b25;
  border-radius: 10px; padding: 8px; min-height: 76px; margin-top: 16px;
}
.cups { flex: 1; flex-wrap: wrap; }
.cupicon { position: relative; width: 48px; height: 48px; }
.cupicon img { width: 48px; height: 48px; }
.cupicon span { position: absolute; right: -4px; bottom: -4px; font-family: 'Press Start 2P'; font-size: 8px; background: #140c06; padding: 2px; border-radius: 3px; }

/* Klassisches Klemmbrett für den Kniffel-Block */
.right {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #f7efd9 0%, #eadcb9 100%);
  box-shadow: inset 0 0 0 3px #b89f72, inset 0 8px 0 #6e4829, 0 6px 0 rgba(0,0,0,.55);
  color: #2b2116; padding: 12px 10px 10px;
}
.blockhead { font-family: 'Press Start 2P'; font-size: 13px; text-align: center; color: #7a2e18; border-bottom: 3px double #b59e74; padding-bottom: 8px; margin-bottom: 4px; }
#combos { display: flex; flex-direction: column; gap: 2px; }
.crow { display: grid; grid-template-columns: 1fr 44px 96px; align-items: center; font-size: 20px; line-height: 20px; padding: 4px 6px; border-radius: 5px; border-bottom: 1px dashed #c7b48b; color: #877961; cursor: default; position: relative; }
.crow .clv { font-size: 16px; color: #9c8c71; }
.crow .cname { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; }
.c-tag {
  font-family: 'Press Start 2P';
  font-size: 7px;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 3px;
  flex-shrink: 0;
}
.c-tag.fresh {
  background: #2c8c4e;
  color: #fffbe6;
  border: 1px solid #140c06;
  text-shadow: 1px 1px 0 #140c06;
}
.c-tag.done {
  background: rgba(90, 74, 52, 0.22);
  color: #6e5a40;
  font-size: 8px;
}
.crow .cval { text-align: right; font-family: 'Press Start 2P'; font-size: 9px; }
.crow .cval i { font-style: normal; color: #887a62; margin: 0 2px; }
.crow .c { color: #4d8a78; } .crow .m { color: #b86c43; }
.crow.avail { color: #24190e; background: #fff9e6; cursor: pointer; }
.crow.avail .c { color: #197a60; } .crow.avail .m { color: #c9581e; }
.crow.avail:hover { background: #ffefba; }
.crow.sel {
  background: #ffd23a !important; box-shadow: 0 0 0 3px #140c06;
  color: #140a00 !important; text-shadow: 0 1px 0 rgba(255,255,255,.6); z-index: 1;
}
.crow.sel .clv { color: #362006 !important; font-weight: bold; }
.crow.sel .c { color: #0b4f3c !important; }
.crow.sel .m { color: #8c2408 !important; }
.crow.sel .cval i { color: #2b1800 !important; }
.crow.locked { opacity: .45; }
.crow.used .cname { text-decoration: line-through; color: #9e2a1c; }

/* ---------- Holzplaketten / Talisman-Tafeln ---------- */
.card {
  position: relative; width: 88px; height: 118px; flex: none;
  background: linear-gradient(180deg, #eedfc1 0%, #d4be94 100%);
  border: 3px solid #140c06; border-radius: 8px;
  box-shadow: inset 0 0 0 2px #fff5df, 0 5px 0 rgba(0,0,0,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #261b10; padding: 4px; cursor: pointer; transition: transform .12s;
}
.card:hover { transform: translateY(-5px); }
.card img.icon { width: 56px; height: 56px; }
.card .cardname { font-size: 17px; line-height: 15px; text-align: center; margin-top: 4px; }
.card .kind { font-family: 'Press Start 2P'; font-size: 6px; color: #6e573b; margin-top: 4px; text-transform: uppercase; }
.card.small { width: 60px; height: 60px; padding: 2px; }
.card.small img.icon { width: 44px; height: 44px; }
.card.empty { background: rgba(0,0,0,.28); border: 2px dashed rgba(230,200,150,.22); box-shadow: none; cursor: default; }
.card.empty:hover { transform: none; }
.card.dice { background: linear-gradient(180deg, #d8f0e4, #a3ccb8); }
.card.cup { background: linear-gradient(180deg, #f5dec4, #cfa67e); }
.card.trick { background: linear-gradient(180deg, #e8dcf5, #bda9d4); }
.card.block { background: linear-gradient(180deg, #fffbe6, #e6d8a8); }
.card.legendary { background: linear-gradient(135deg, #ffe9a8, #f5b84a, #b8f2a6, #f5b84a); background-size: 300% 300%; animation: shimmer 3s linear infinite; box-shadow: 0 0 0 2px #ffd23a, 0 5px 0 rgba(0,0,0,.55); }
@keyframes shimmer { 0% { background-position: 0 0; } 100% { background-position: 300% 300%; } }
.card.active { outline: 3px solid #ffe066; animation: pulse .7s infinite; }
.card .price {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  background: #ffd23a; color: #170c00; text-shadow: 0 1px 0 rgba(255,255,255,.65);
  font-family: 'Press Start 2P'; font-size: 10px; padding: 4px 6px;
  border-radius: 5px; border: 2px solid #140c06; white-space: nowrap;
}
.card.sold { opacity: .2; pointer-events: none; }
.jiggle { animation: jig .28s; }
@keyframes jig { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-8deg) scale(1.12); } 75% { transform: rotate(8deg) scale(1.12); } }

/* ---------- Bananenshop (Fahrender Pixel-LKW von Niklas & Victor im Dschungel-Look) ---------- */
.shop { display: grid; grid-template-columns: 275px 1fr; gap: 12px; padding: 6px 12px; height: 100%; overflow: hidden; }
.shop aside.left { min-height: 0; overflow-y: auto; }
.shop-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; height: 100%; }
.owned-tals { position: relative; display: flex; gap: 8px; justify-content: center; margin-top: 4px; background: rgba(28, 18, 11, .78); border: 2px solid #140c06; border-radius: 10px; padding: 4px 10px; flex-shrink: 0; }
.owned-tals .card { width: 82px; height: 92px; padding: 3px; }
.owned-tals .card img.icon { width: 42px; height: 42px; }
.owned-tals .card .cardname { font-size: 15px; line-height: 13px; margin-top: 2px; }
.ownslot { display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* =====================================================================
   FAHRENDER BANANENSHOP MIT HOLZ-REGALFÄCHERN, WIESE, NIKLAS & VICTOR
   ===================================================================== */
.wagon-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2px 8px 4px;
}

.wagon-world {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

/* Markise & Dachschild */
.wagon-roof-wrap {
  position: relative;
  margin: 0 78px;
  z-index: 5;
}
.wagon-sign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto -5px;
  padding: 4px 14px;
  background: linear-gradient(180deg, #8f562b, #542f14);
  border: 3px solid #140c06;
  box-shadow: inset 0 0 0 2px #d4a254, 0 4px 0 #140c06;
  font-family: 'Press Start 2P';
  font-size: 11px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #140c06;
}
.wagon-awning {
  height: 20px;
  border: 3px solid #140c06;
  background: repeating-linear-gradient(90deg, #1f6b3b 0 24px, #2f8f4f 24px 30px, #f3dfab 30px 52px, #d6bd81 52px 58px);
  clip-path: polygon(2% 0%, 98% 0%, 100% 100%, 0% 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.28);
}
.wagon-scallop {
  height: 9px;
  border: 3px solid #140c06;
  border-top: none;
  background: repeating-linear-gradient(90deg, #195730 0 30px, #cbb072 30px 58px);
  box-shadow: 0 4px 0 rgba(14,8,4,0.55);
}
.wagon-lantern {
  position: absolute;
  bottom: -24px;
  width: 22px;
  height: 30px;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 0 8px rgba(255, 210, 58, 0.75)) drop-shadow(0 2px 0 #140c06);
}
.wagon-lantern.pos-left { left: 10px; }
.wagon-lantern.pos-right { right: 10px; }

/* Hauptkörper des Händlerwagens (symmetrisch, frei stehende Affen links & rechts) */
.wagon-body-row {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0 78px;
  z-index: 6;
}
.wagon-stall {
  flex: 1;
  position: relative;
  padding: 6px 12px 7px;
  border: 4px solid #140c06;
  border-top: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,224,150,0.05) 0 2px, transparent 2px 12px, rgba(20,12,6,0.34) 12px 14px),
    linear-gradient(180deg, #7c4b27 0%, #5e3619 58%, #452610 100%);
  box-shadow: inset 0 0 0 3px #a66938, inset 0 12px 18px rgba(10,5,2,0.68);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Holz-Regalfächer (tiefe Nischen für jedes Upgrade) */
.wagon-shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 5px;
  background: #3d2210;
  border: 3px solid #140c06;
  box-shadow: inset 0 0 0 2px #8a552f, 0 3px 0 #140c06;
}
.wagon-cubby {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 15px 6px 11px;
  background:
    linear-gradient(90deg, rgba(16,8,3,0.72) 0%, rgba(44,24,10,0.12) 12%, rgba(44,24,10,0.06) 88%, rgba(16,8,3,0.78) 100%),
    repeating-linear-gradient(180deg, #2b170b 0 13px, #201007 13px 15px);
  border: 3px solid #140c06;
  box-shadow: inset 0 10px 12px rgba(10,5,2,0.82), inset 4px 0 0 rgba(92,54,25,0.42), inset -4px 0 0 rgba(36,18,8,0.65);
  min-height: 140px;
}
.wagon-cubby .card.shop-card {
  width: 100%;
  max-width: 238px;
  height: 118px;
}
.wagon-cubby .card.shop-card .shop-cat-banner {
  padding: 3px 8px;
  font-size: 7px;
}
.wagon-cubby .card.shop-card .shop-icon-wrap {
  width: 40px;
  height: 40px;
  margin-top: 0;
}
.wagon-cubby .card.shop-card img.icon {
  width: 38px;
  height: 38px;
}
.wagon-cubby .card.shop-card .cardname {
  font-size: 10px;
  line-height: 12px;
}
.wagon-cubby .card.shop-card .shop-desc {
  font-size: 14px;
  line-height: 13px;
}
.wagon-cubby .card.shop-card .shop-buy-pill {
  padding: 4px 6px;
  font-size: 8px;
}
.wagon-cubby-label {
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  font-family: 'Press Start 2P';
  font-size: 6px;
  color: #d9b47a;
  pointer-events: none;
}
.wagon-cubby-ledge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: linear-gradient(180deg, #c4844a 0%, #965b2d 45%, #633818 100%);
  border-top: 2px solid #140c06;
  box-shadow: inset 0 2px 0 rgba(255,232,176,0.4);
  pointer-events: none;
}
/* Einzelne Nasch-Banane auf der Wiese mit kleinem Holz-Schild „ISS MICH“ */
.wagon-snack-spot {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 15;
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
  transition: transform 120ms ease-out, opacity 180ms ease-out;
}
.wagon-snack-spot:hover:not(.snacked) {
  transform: translateX(-50%) translateY(-3px) scale(1.06);
}
.wagon-snack-spot.snacked {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.75);
}
.wagon-snack-banana {
  width: 30px;
  height: 24px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(14,8,4,0.8));
}
.wagon-snack-sign {
  position: relative;
  padding: 3px 7px;
  background: linear-gradient(180deg, #b87b44, #7a4920);
  border: 2px solid #140c06;
  box-shadow: inset 0 1px 0 rgba(255,232,176,0.5), 0 3px 0 #140c06;
  font-family: 'Press Start 2P';
  font-size: 7px;
  color: #fff6d1;
  text-shadow: 1px 1px 0 #140c06;
  white-space: nowrap;
  margin-bottom: 5px;
}
.wagon-snack-sign::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 4px;
  height: 7px;
  background: #542f14;
  border: 1px solid #140c06;
  border-top: none;
}

/* Bananenkiste im unteren rechten Fach */
.wagon-cubby-crate {
  cursor: pointer;
  transition: filter 140ms ease-out;
}
.wagon-cubby-crate:hover:not(.sold) {
  filter: brightness(1.12);
}
.wagon-cubby-crate:hover:not(.sold) .crate-img {
  transform: translateY(-3px) scale(1.06);
}
.wagon-cubby-crate .crate-img {
  width: 62px;
  height: 52px;
  margin-bottom: 2px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(14,8,4,0.75));
  transition: transform 140ms ease-out;
}
.wagon-cubby-crate .crate-title {
  font-family: 'Press Start 2P';
  font-size: 8px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #140c06;
  margin-bottom: 2px;
}
.wagon-cubby-crate .crate-sub {
  font-size: 15px;
  line-height: 14px;
  color: #f6dc8d;
  margin-bottom: 4px;
  text-shadow: 1px 1px 0 #140c06;
}
.wagon-cubby-crate .crate-pill {
  padding: 3px 8px;
  font-family: 'Press Start 2P';
  font-size: 7px;
  background: rgba(20, 12, 6, 0.9);
  color: #ffd866;
  border: 2px solid #140c06;
  border-radius: 6px;
  margin-bottom: 2px;
}
.wagon-cubby-crate:hover:not(.sold):not(.too-expensive) .crate-pill {
  background: #34822b;
  color: #fff8e8;
}
.wagon-cubby-crate.sold {
  opacity: 0.4;
  cursor: default;
}
.wagon-cubby-crate.too-expensive .crate-pill {
  color: #b5a48b;
}

/* Thekenkante + Räder + Grüne Pixel-Wiese + Frei stehende Bonobos */
.wagon-counter-lip {
  height: 10px;
  margin: 0 78px;
  background: linear-gradient(180deg, #542f14, #361d0b);
  border: 3px solid #140c06;
  border-top: none;
  position: relative;
  z-index: 6;
  pointer-events: none;
}
.wagon-wheels {
  display: flex;
  justify-content: space-between;
  padding: 0 135px;
  margin-top: -10px;
  pointer-events: none;
  position: relative;
  z-index: 8;
}
.wagon-wheel-img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(14,8,4,0.85));
}
.wagon-meadow {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0;
  height: 36px;
  z-index: 3;
  pointer-events: none;
  border: 3px solid #140c06;
  border-radius: 10px 10px 8px 8px;
  background:
    /* Kleine Pixel-Blümchen */
    radial-gradient(circle at 12% 48%, #ffe066 0 2px, transparent 2.5px),
    radial-gradient(circle at 26% 62%, #fff8e8 0 2px, transparent 2.5px),
    radial-gradient(circle at 44% 55%, #ff8594 0 2px, transparent 2.5px),
    radial-gradient(circle at 67% 46%, #ffe066 0 2px, transparent 2.5px),
    radial-gradient(circle at 84% 58%, #fff8e8 0 2px, transparent 2.5px),
    radial-gradient(circle at 93% 44%, #ff8594 0 2px, transparent 2.5px),
    /* Pixel-Grashalme oben */
    repeating-linear-gradient(90deg, #6ee078 0 6px, #4ead42 6px 12px, #3b9138 12px 18px) top / 100% 7px no-repeat,
    /* Wiesen-Verlauf bis zum Erdboden */
    linear-gradient(180deg, #47a343 0%, #2d7d36 52%, #1d5724 80%, #3b2412 80%, #241409 100%);
  box-shadow: inset 0 3px 0 rgba(190, 255, 160, 0.35), 0 4px 0 rgba(10, 6, 3, 0.65);
}
.wagon-bonobo {
  position: absolute;
  bottom: 14px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  cursor: pointer;
}
.wagon-bonobo.pos-left { left: 2px; }
.wagon-bonobo.pos-right { right: 2px; }
.wagon-bonobo img {
  width: 76px;
  height: 88px;
  image-rendering: pixelated;
  background: transparent;
  filter: drop-shadow(0 4px 0 rgba(14,8,4,0.7));
  transition: transform 140ms ease-out;
}
.wagon-bonobo.pos-left:hover img { transform: translateY(-4px) scale(1.05); }
.wagon-bonobo.pos-right img { transform: scaleX(-1); }
.wagon-bonobo.pos-right:hover img { transform: scaleX(-1) translateY(-4px) scale(1.05); }
.vendor-tag {
  font-family: 'Press Start 2P'; font-size: 6px; color: #ffe066;
  background: #5c3519; border: 2px solid #140c06; padding: 2px 5px;
  box-shadow: 0 2px 0 #140c06;
}
.vendor-tag.v { color: #a8ffaf; background: #1f5c2e; }
.shop-legend {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center; justify-content: flex-end;
}
.sleg {
  font-family: 'Press Start 2P'; font-size: 7px; padding: 4px 6px; border-radius: 5px;
  border: 2px solid #140c06; color: #fff8e8; text-shadow: 1px 1px 0 #000;
}
.sleg.talisman { background: #8f4818; border-color: #f09c42; }
.sleg.dice     { background: #146e54; border-color: #4be8b0; }
.sleg.cup      { background: #94261c; border-color: #ff7a6b; }
.sleg.trick    { background: #5a2a8c; border-color: #c285ff; }
.sleg.block    { background: #22548c; border-color: #70b8ff; }

.shop-tier-label {
  width: 100%; text-align: left; font-family: 'Press Start 2P'; font-size: 9px;
  color: #dec49b; letter-spacing: 0.5px; padding-left: 4px; margin-top: 2px;
}
.shoprow { display: flex; gap: 18px; justify-content: center; width: 100%; }

/* Große, einladende Shop-Schaltflächen mit Farbrahmen, Kategorie-Banner, Kurzbeschreibung & Kauf-Button */
.card.shop-card {
  width: 245px; height: 142px; padding: 0; overflow: visible;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  border-width: 3px; border-radius: 12px;
  transition: transform .14s cubic-bezier(.2,.8,.3,1.2), filter .14s;
}
.smallrow .card.shop-card {
  width: 320px; height: 106px;
  display: grid; grid-template-columns: 78px 1fr; grid-template-rows: 22px 1fr 24px;
  align-items: center;
}
.card.shop-card:hover { transform: translateY(-6px) scale(1.03); filter: brightness(1.06); }
.card.shop-card.too-expensive { opacity: .82; }

/* Farbliche Umrandung & Themen-Hintergrund je Upgrade-Sorte */
.card.shop-card.talisman {
  background: linear-gradient(180deg, #fff3d6 0%, #e8cc96 100%);
  border-color: #d97b1e;
  box-shadow: 0 0 0 2px #140c06, inset 0 0 0 2px #fff9eb, 0 6px 0 #140c06;
}
.card.shop-card.dice {
  background: linear-gradient(180deg, #dcfaee 0%, #a5dec8 100%);
  border-color: #26b888;
  box-shadow: 0 0 0 2px #140c06, inset 0 0 0 2px #f0fff9, 0 6px 0 #140c06;
}
.card.shop-card.cup {
  background: linear-gradient(180deg, #ffe2dc 0%, #e6b0a5 100%);
  border-color: #d94b38;
  box-shadow: 0 0 0 2px #140c06, inset 0 0 0 2px #fff2f0, 0 6px 0 #140c06;
}
.card.shop-card.trick {
  background: linear-gradient(180deg, #efe0ff 0%, #c8ace8 100%);
  border-color: #9652d9;
  box-shadow: 0 0 0 2px #140c06, inset 0 0 0 2px #faf5ff, 0 6px 0 #140c06;
}
.card.shop-card.block {
  background: linear-gradient(180deg, #e0f0ff 0%, #accbe8 100%);
  border-color: #3888d9;
  box-shadow: 0 0 0 2px #140c06, inset 0 0 0 2px #f2f9ff, 0 6px 0 #140c06;
}
.card.shop-card.legendary {
  background: linear-gradient(135deg, #fff0b8, #f5b84a, #c2f5b0, #f5b84a);
  background-size: 300% 300%; animation: shimmer 3s linear infinite;
  border-color: #ffd23a;
  box-shadow: 0 0 14px rgba(255,210,58,.75), 0 0 0 2px #140c06, 0 6px 0 #140c06;
}

/* Farbiges Kategorie-Kopfbanner oben auf der Karte */
.shop-cat-banner {
  width: 100%; text-align: left; padding: 5px 10px;
  font-family: 'Press Start 2P'; font-size: 8px; color: #fff8e8;
  text-shadow: 1px 1px 0 #000; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid #140c06;
}
.smallrow .shop-cat-banner { grid-column: 1 / -1; grid-row: 1; }
.card.shop-card.talisman .shop-cat-banner  { background: linear-gradient(90deg, #9e4f14, #c96b20); }
.card.shop-card.dice .shop-cat-banner      { background: linear-gradient(90deg, #126e52, #1f9c76); }
.card.shop-card.cup .shop-cat-banner       { background: linear-gradient(90deg, #96261b, #c7382a); }
.card.shop-card.trick .shop-cat-banner     { background: linear-gradient(90deg, #5c2894, #7e3cc4); }
.card.shop-card.block .shop-cat-banner     { background: linear-gradient(90deg, #1d528c, #2d73bf); }
.card.shop-card.legendary .shop-cat-banner { background: linear-gradient(90deg, #8a5a00, #c98800); color: #ffe066; }

.card.shop-card .price {
  top: -11px; right: 8px; left: auto; transform: none;
  font-size: 11px; padding: 4px 8px; z-index: 5;
  box-shadow: 0 3px 0 #140c06;
}
.shop-icon-wrap {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.card.shop-card img.icon { width: 54px; height: 54px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.smallrow .shop-icon-wrap { grid-column: 1; grid-row: 2; width: 74px; height: 68px; margin: 0; }
.smallrow .card.shop-card img.icon { width: 52px; height: 52px; }

.card.shop-card .cardname {
  font-family: 'Press Start 2P'; font-size: 11px; line-height: 14px;
  color: #170d04; text-align: center; padding: 0 8px; margin-top: 0;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.card.shop-card.talisman .cardname { text-decoration-color: #d97b1e; }
.card.shop-card.dice .cardname     { text-decoration-color: #198c68; }
.card.shop-card.cup .cardname      { text-decoration-color: #c7382a; }
.card.shop-card.trick .cardname    { text-decoration-color: #7e3cc4; }
.card.shop-card.block .cardname    { text-decoration-color: #2d73bf; }

.shop-desc {
  font-size: 17px; line-height: 17px; color: #2b1d10;
  text-align: center; padding: 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.smallrow .card.shop-card .cardname {
  grid-column: 2; grid-row: 2; align-self: start; text-align: left;
  margin-top: 6px; padding: 0 10px 0 0;
}
.smallrow .card.shop-card .shop-desc {
  grid-column: 2; grid-row: 2; align-self: end; text-align: left;
  margin-bottom: 6px; padding: 0 10px 0 0;
}

/* Untere Kauf-Leiste auf jeder Shop-Karte */
.shop-buy-pill {
  width: 100%; text-align: center; padding: 5px 8px;
  font-family: 'Press Start 2P'; font-size: 9px;
  background: rgba(20, 12, 6, .88); color: #ffd866;
  border-top: 2px solid #140c06; border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px;
}
.smallrow .shop-buy-pill { grid-column: 1 / -1; grid-row: 3; }
.card.shop-card:hover .shop-buy-pill { background: #34822b; color: #fff8e8; }
.card.shop-card.too-expensive .shop-buy-pill { color: #b5a48b; }

.shopbtns { display: flex; gap: 16px; width: 100%; justify-content: center; margin-top: 2px; flex-shrink: 0; position: relative; z-index: 30; }
.shopbtns .btn.big { min-width: 210px; padding: 8px 16px; font-size: 12px; }

/* ---------- Modal ---------- */
#modal { position: absolute; inset: 0; background: rgba(10,6,3,.68); display: flex; align-items: center; justify-content: center; z-index: 150; }
.mbox { min-width: 460px; max-width: 760px; text-align: center; padding: 26px 30px; display: flex; flex-direction: column; gap: 14px; align-items: center; animation: popin .25s ease-out; }
@keyframes popin { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mbox h2 { font-family: 'Press Start 2P'; font-size: 22px; color: #ffd866; text-shadow: 3px 3px 0 #140c06; }
.mbox h2.wintitle { color: #75d471; font-size: 28px; }
.mbox h2.losetitle { color: #ff6b52; font-size: 30px; }
.mbox p b { color: #ffd866; }
.cash { width: 100%; background: #1a110a; border: 2px solid #4a3321; border-radius: 7px; padding: 8px 14px; }
.cline { display: flex; justify-content: space-between; font-size: 22px; padding: 2px 0; border-bottom: 1px dashed #4a3321; }
.cline b { color: #ffd23a; font-family: 'Press Start 2P'; font-size: 13px; }
.mbtns { display: flex; gap: 14px; }
.vpicks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vpick { background: none; border: none; cursor: pointer; transition: transform .1s; }
.vpick:hover { transform: translateY(-6px) scale(1.08); }
.vpick img { width: 64px; height: 64px; }
.stats-end { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 30px; font-size: 22px; }
.stats-end b { font-family: 'Press Start 2P'; font-size: 13px; color: #ffd866; margin-left: 8px; }
.hsform { display: flex; gap: 10px; align-items: center; }
.hsform input { font-family: 'VT323'; font-size: 22px; padding: 4px 8px; background: #1a110a; color: #fff8e8; border: 3px solid #785337; border-radius: 6px; width: 200px; }
table.hs { border-collapse: collapse; width: 560px; font-size: 22px; }
table.hs td { padding: 3px 8px; border-bottom: 1px dashed #593e28; text-align: left; }
table.hs td:last-child { text-align: right; font-family: 'Press Start 2P'; font-size: 12px; color: #8fe8b4; }
table.hs tr.legend td { color: #ffd23a; }
table.hs img { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; }
.help { text-align: left; display: flex; flex-direction: column; gap: 8px; font-size: 21px; line-height: 21px; }
.help .c { color: #5ec4a8; } .help .m { color: #ff9b42; }
.ded-mini img { width: 96px; height: 72px; margin: 0 8px; }

/* ---------- Toast / Popup / Tooltip ---------- */
#toast { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 400; background: #2b1d12; border: 3px solid #140c06; box-shadow: inset 0 0 0 2px #ffd23a, 0 5px 0 rgba(0,0,0,.6); border-radius: 8px; padding: 8px 18px; font-size: 22px; animation: popin .2s ease-out; max-width: 700px; text-align: center; pointer-events: none; }
.popup { position: absolute; left: 50%; transform: translateX(-50%); font-family: 'Press Start 2P'; font-size: 12px; padding: 5px 7px; border-radius: 5px; border: 2px solid #140c06; white-space: nowrap; pointer-events: none; animation: pop 1s ease-out forwards; z-index: 60; text-shadow: 2px 2px 0 rgba(0,0,0,.5); color: #fff; }
.popup.chips { background: #1f8a70; } .popup.mult { background: #d96b27; }
.popup.xmult { background: #b8321a; box-shadow: 0 0 0 2px #ffd866; font-size: 14px; }
.popup.money { background: #ffd23a; color: #170c00; text-shadow: 0 1px 0 rgba(255,255,255,.65); } .popup.msg { background: #6b499e; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.5); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.2); } 30% { opacity: 1; transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px); } }
#tooltip {
  position: absolute; z-index: 500; max-width: 340px;
  background: linear-gradient(180deg, #2b1d12 0%, #1c120b 100%);
  border: 3px solid #140c06; box-shadow: inset 0 0 0 2px #b5834c, 0 8px 18px rgba(0,0,0,.75);
  border-radius: 10px; padding: 10px 13px; pointer-events: none;
  font-size: 20px; line-height: 21px; color: #f6eedc;
}
#tooltip .tt-title {
  font-family: 'Press Start 2P'; font-size: 10px; line-height: 15px;
  color: #ffd866; margin-bottom: 6px; padding-bottom: 5px;
  border-bottom: 2px dashed #5e4028;
}
#tooltip .tt-body { display: flex; flex-direction: column; gap: 5px; }
#tooltip .tt-line { position: relative; padding-left: 10px; }
#tooltip .tt-line::before { content: '▸'; position: absolute; left: 0; color: #8fe87b; }

/* ---------- Dauerhaft auf dem Tisch stehender 3D-Pixel-Becher & natürlicher Würfelflug ---------- */
.standing-cup {
  position: absolute; left: 11%; top: 50%; width: 136px; height: 150px;
  transform: translate(-50%, -52%);
  z-index: 38; cursor: default;
  transition: transform .18s;
}
.standing-cup.can-roll { cursor: pointer; }
.standing-cup.can-roll:hover { transform: translate(-50%, -56%) scale(1.05); }
.standing-cup .cup-shadow {
  position: absolute; left: 16px; bottom: 14px; width: 104px; height: 34px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 72%);
  border-radius: 50%; z-index: 1;
}
.standing-cup .cup-badge {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  font-family: 'Press Start 2P'; font-size: 8px; color: #ffe066;
  background: rgba(20,12,6,.9); padding: 3px 7px; border-radius: 5px;
  border: 2px solid #785337; white-space: nowrap; z-index: 5;
  text-shadow: 1px 1px 0 #000;
}
.cup3d-Scene {
  width: 136px; height: 136px;
  perspective: 580px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}
.cup3d-model {
  width: 84px; height: 104px; position: relative;
  transform-style: preserve-3d;
  /* Steht aufrecht leicht geneigt auf dem Tisch, sodass man oben in den Becher schauen kann */
  transform: rotateX(-24deg) rotateY(18deg) rotateZ(-4deg);
  transition: transform .25s cubic-bezier(.2,.8,.3,1.2);
}
.standing-cup.loading .cup3d-model {
  transform: translateY(4px) rotateX(-32deg) rotateY(22deg) scale3d(1.06, .95, 1.06);
}
.standing-cup.shaking .cup3d-model {
  animation: cup3dShake .25s ease-in-out infinite;
}
.standing-cup.spilling .cup3d-model {
  animation: cup3dSpill .54s cubic-bezier(.22,.88,.32,1.15) forwards;
}
.cup3d-slat {
  position: absolute; left: 29px; top: 8px;
  width: 26px; height: 88px;
  border-left: 2px solid #140c06; border-right: 2px solid #140c06;
  border-top: 5px solid var(--ring, #d4a44c);
  border-bottom: 5px solid var(--ring, #d4a44c);
  box-shadow: inset 0 18px 0 rgba(0,0,0,.18), inset 0 -18px 0 rgba(0,0,0,.28);
  transform: rotateY(var(--ang)) translateZ(38px);
}
.cup3d-rim {
  position: absolute; left: 2px; top: -32px;
  width: 80px; height: 80px; border-radius: 50%;
  border: 8px solid #d4a44c;
  box-shadow: inset 0 0 22px #000, 0 0 0 3px #140c06;
  transform: rotateX(90deg);
}
.cup3d-bottom {
  position: absolute; left: 4px; bottom: -30px;
  width: 76px; height: 76px; border-radius: 50%;
  border: 6px solid #140c06;
  transform: rotateX(-90deg);
}
@keyframes cup3dShake {
  0%, 100% { transform: translateY(-8px) rotateZ(-18deg) rotateX(-20deg) rotateY(16deg); }
  50%      { transform: translateY(-22px) rotateZ(20deg) rotateX(12deg) rotateY(-20deg); }
}
@keyframes cup3dSpill {
  0%   { transform: translateX(0) rotateZ(0deg) rotateX(-18deg) rotateY(18deg); }
  36%  { transform: translateX(34px) translateY(-10px) rotateZ(106deg) rotateX(-22deg) rotateY(28deg); }
  74%  { transform: translateX(26px) translateY(-6px) rotateZ(98deg) rotateX(-18deg) rotateY(22deg); }
  100% { transform: translateX(0) rotateX(-24deg) rotateY(18deg) rotateZ(-4deg); }
}

/* Phase 1: Nicht gehaltene Würfel springen im hohen Bogen in den stehenden Becher hinein */
.die.into-cup {
  animation: dieIntoCup .23s ease-in forwards;
  pointer-events: none;
}
@keyframes dieIntoCup {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  55%  { opacity: 1; transform: translate(calc(var(--cup-dx, -140px) * 0.6), calc(var(--cup-dy, -20px) - 48px)) scale(.75); }
  100% { opacity: 0; transform: translate(var(--cup-dx, -140px), calc(var(--cup-dy, -20px) - 18px)) scale(.25); }
}

/* Phase 3: Würfel purzeln aus dem gekippten Becher über den Filz an ihren natürlichen Liegeplatz */
.die.spill-out-3d {
  animation: diePath3D .52s cubic-bezier(.16,.86,.32,1.08) backwards;
}
.die.spill-out-3d .cube {
  animation: cubeTumble3D .52s cubic-bezier(.18,.84,.34,1.08) backwards;
  animation-delay: inherit;
}
@keyframes diePath3D {
  0%   { opacity: 0; transform: translate(var(--cup-dx, -160px), var(--cup-dy, -15px)) scale(.35); }
  22%  { opacity: 1; transform: translate(calc(var(--cup-dx, -160px) * 0.55), calc(var(--cup-dy, -15px) - 36px)) scale(1.12); }
  55%  { opacity: 1; transform: translate(calc(var(--cup-dx, -160px) * 0.15), 10px) scale(1.04); }
  78%  { transform: translate(5px, -8px) scale(1.02); }
  92%  { transform: translate(-2px, 3px) scale(1); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes cubeTumble3D {
  0%   { transform: rotateX(540deg) rotateY(-480deg) rotateZ(-260deg); }
  52%  { transform: rotateX(130deg) rotateY(-150deg) rotateZ(-50deg); }
  80%  { transform: rotateX(calc(var(--pitch, -44deg) - 14deg)) rotateY(calc(var(--yaw, 18deg) + 18deg)) rotateZ(6deg); }
  100% { transform: rotateX(var(--pitch, -44deg)) rotateY(var(--yaw, 18deg)) rotateZ(0deg); }
}

/* ---------- Makro-Leiste & Becher-Schmiede ---------- */
.meta-bar { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.meta-pill {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: rgba(28, 18, 11, .88); border: 3px solid #140c06; border-radius: 9px;
  padding: 6px 14px; font-size: 20px; box-shadow: inset 0 0 0 2px #785337, 0 4px 0 rgba(0,0,0,.5);
  transition: transform .1s, filter .1s;
}
.meta-pill:hover { transform: translateY(-2px); filter: brightness(1.15); }
.meta-pill img { width: 32px; height: 26px; }
.meta-pill b { font-family: 'Press Start 2P'; font-size: 11px; color: #ffd866; }
.banana-balance { font-size: 24px; background: #1a110a; border: 2px solid #785337; padding: 6px 18px; border-radius: 8px; }
.banana-balance b { font-family: 'Press Start 2P'; font-size: 14px; color: #ffd23a; }
.mcup-list { display: flex; flex-direction: column; gap: 8px; width: 690px; max-height: 410px; overflow-y: auto; padding-right: 4px; }
.mcup-card {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px;
  background: rgba(26, 17, 10, .92); border: 3px solid #140c06; border-radius: 8px; padding: 8px 12px;
  box-shadow: inset 0 0 0 2px #5e4028; text-align: left;
}
.mcup-card.selected { box-shadow: inset 0 0 0 3px #75d471; background: rgba(32, 48, 28, .92); }
.mcup-card.locked { opacity: .82; }
.mcup-img { width: 68px; height: 54px; }
.mcup-head b { font-family: 'Press Start 2P'; font-size: 12px; color: #ffd866; }
.mcup-lv { font-size: 18px; color: #b5a48b; margin-left: 8px; }
.mcup-desc { font-size: 18px; color: #cbb699; line-height: 18px; }
.mcup-bonus { font-size: 19px; color: #8fe8b4; line-height: 20px; margin-top: 2px; }
.cup-next { font-size: 17px; color: #ffd23a; }
.cup-actions { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.cup-equipped { font-family: 'Press Start 2P'; font-size: 9px; color: #75d471; padding: 4px 6px; }
.cup-max { font-family: 'Press Start 2P'; font-size: 9px; color: #ffd23a; }
.banana-line b { color: #8fe87b !important; }
.macro-cup-badge { border-right: 2px dashed #5e4028; padding-right: 6px; margin-right: 2px; }

/* ---------- Online-Ranked-Multiplayer UI ---------- */
.mp-profile { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; background: #1a110a; padding: 8px 16px; border-radius: 8px; border: 2px solid #5e4028; width: 100%; }
.mp-profile input, #mpCodeInput { font-family: 'VT323'; font-size: 21px; padding: 3px 8px; background: #120b06; color: #fff8e8; border: 2px solid #8a5e3b; border-radius: 5px; width: 155px; }
.rtiers-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 17px; }
.rtier { padding: 2px 7px; border-radius: 5px; background: rgba(0,0,0,.35); border: 1px solid #3d291a; }
.rtier.cur { border: 2px solid #ffd23a; background: rgba(255,210,58,.15); }
.mp-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.mp-box { background: rgba(24, 15, 9, .9); border: 2px solid #6b4930; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mp-box h3 { font-family: 'Press Start 2P'; font-size: 12px; color: #ffd866; }
.mp-p2p-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.mp-status { font-size: 19px; color: #8fe8b4; min-height: 22px; }
.mp-banner { font-size: 17px; text-align: center; padding: 5px 8px; background: linear-gradient(180deg, #421818, #2b0f0f); box-shadow: inset 0 0 0 2px #d95238; }
.beffect.pvp { background: #3b1945; color: #f5d0ff; border-color: #ffd23a; }
.mob-nav { display: none; }

/* =====================================================================
   HANDY-APP & HOCHFORMAT-MODUS (540x960 App-Bühne)
   Extra große, klar lesbare Klickfelder & Daumen-optimiertes Layout
   ===================================================================== */
body.is-portrait .title-screen { padding: 14px; gap: 16px; }
body.is-portrait .meta-bar { gap: 8px; }
body.is-portrait .meta-pill { font-size: 20px; padding: 8px 12px; }
body.is-portrait .logo-sign { padding: 14px 18px 12px; width: 100%; }
body.is-portrait .logo { font-size: 40px; letter-spacing: 2px; }
body.is-portrait .subtitle { font-size: 11px; margin-top: 8px; }
body.is-portrait .tdie { width: 68px; height: 68px; }
body.is-portrait .menu { flex-direction: column; width: 100%; max-width: none; gap: 10px; }
body.is-portrait .title-screen .menu .btn { width: 100%; height: 52px; font-size: 14px; padding: 0 16px; }
body.is-portrait .dedication { width: 100%; padding: 10px 12px; gap: 10px; justify-content: space-between; }
body.is-portrait .dedication .bonobo { width: 84px; height: 64px; }
body.is-portrait .ded-text { font-size: 20px; line-height: 22px; }
body.is-portrait .ded-leaf { font-size: 8px; }

/* Blinds (Gegnerwahl) im Handy-Hochformat */
body.is-portrait .blinds {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px; padding: 10px;
}
body.is-portrait .blinds .left { gap: 6px; }
body.is-portrait .blinds .ladder,
body.is-portrait .blinds .mini-owned { display: none; }
body.is-portrait .bcols {
  grid-template-columns: 1fr;
  gap: 10px; align-items: stretch; overflow-y: auto;
}
body.is-portrait .bcol {
  height: auto; transform: none; flex-direction: row; flex-wrap: wrap;
  justify-content: space-between; padding: 12px; gap: 8px; text-align: left;
}
body.is-portrait .bcol:not(.current) { opacity: .65; padding: 8px 12px; }
body.is-portrait .bcol:not(.current) .portrait,
body.is-portrait .bcol:not(.current) .beffect { display: none; }
body.is-portrait .portrait { width: 74px; height: 74px; }
body.is-portrait .btype { width: 100%; font-size: 12px; }
body.is-portrait .bname { font-size: 15px; flex: 1; }
body.is-portrait .btarget { padding: 8px 12px; font-size: 20px; text-align: center; }
body.is-portrait .btarget b { font-size: 18px; }
body.is-portrait .bbottom { width: 100%; }
body.is-portrait .bbottom .btn.big { width: 100%; font-size: 16px; padding: 16px; }

/* Spielbildschirm im Handy-Hochformat */
body.is-portrait .play {
  display: flex; flex-direction: column;
  gap: 8px; padding: 8px 10px 64px; height: 100%;
}
body.is-portrait .play .left {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 6px; flex: none;
}
body.is-portrait .opp { grid-column: 1; padding: 6px 8px; grid-template-columns: 44px 1fr; }
body.is-portrait .opp img { width: 44px; height: 44px; }
body.is-portrait .oname { font-size: 10px; margin: 2px 0; }
body.is-portrait .otarget { font-size: 18px; }
body.is-portrait .oeffect { font-size: 16px; line-height: 16px; }
body.is-portrait .rscore { grid-column: 2; padding: 6px 8px; display: flex; flex-direction: column; justify-content: center; }
body.is-portrait .rscore .big { font-size: 18px; margin: 2px 0 4px; }
body.is-portrait .hand { grid-column: 1; padding: 6px 8px; }
body.is-portrait #handName { font-size: 11px; margin-bottom: 4px; min-height: 15px; }
body.is-portrait .chips, body.is-portrait .mult { font-size: 15px; padding: 7px 6px; }
body.is-portrait .stats { grid-column: 2; gap: 4px; }
body.is-portrait .stat { padding: 2px; }
body.is-portrait .stat .lbl { font-size: 14px; }
body.is-portrait .stat .num { font-size: 13px; }
body.is-portrait .play .ladder { display: none; grid-column: 1 / -1; }

/* Würfelbrett & Aktionen im Handy-Hochformat: Riesige Touch-Flächen! */
body.is-portrait .center { flex: none; }
body.is-portrait .talismans { display: none; margin-top: 16px; padding: 6px; gap: 6px; flex-wrap: wrap; }
body.is-portrait .tray {
  min-height: 205px; max-height: 220px; margin: 4px 0; padding: 10px 8px;
  border-radius: 16px;
}
body.is-portrait .standing-cup { left: 13%; transform: translate(-50%, -52%) scale(.82); }
body.is-portrait .die { width: 62px; height: 62px; --sz: 50px; --hz: 25px; margin-left: -31px; margin-top: -31px; }
body.is-portrait .die .die-shadow { width: 50px; left: 6px; }
body.is-portrait .die.held { transform: translateY(-10px); }
body.is-portrait .die.held::after { bottom: -18px; font-size: 7px; }
body.is-portrait .die .key { display: none; }
body.is-portrait .hint { font-size: 18px; min-height: 20px; }
body.is-portrait .actions { margin: 4px 0 6px; gap: 8px; flex-wrap: wrap; }
body.is-portrait .actions .btn { flex: 1; min-width: 140px; padding: 15px 10px; font-size: 14px; }
body.is-portrait .bottom { display: none; }

/* Kniffel-Block im Handy-Hochformat: 2-Spalten-Touch-Grid mit großen, gut lesbaren Kacheln! */
body.is-portrait .right {
  flex: 1; min-height: 0; overflow-y: auto; padding: 8px;
}
body.is-portrait .blockhead { font-size: 12px; padding-bottom: 5px; margin-bottom: 6px; }
body.is-portrait #combos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
body.is-portrait .crow {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 8px 10px; min-height: 56px; border: 2px solid #c7b48b; border-radius: 8px;
  font-size: 21px; line-height: 21px; background: rgba(255,255,255,.35);
}
body.is-portrait .crow.avail { border-color: #785337; background: #fff9e6; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
body.is-portrait .crow.sel { border-color: #140c06; }
body.is-portrait .crow .cname { font-weight: bold; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-portrait .crow .clv { font-size: 16px; }
body.is-portrait .crow .cval { font-size: 10px; align-self: flex-end; margin-top: 2px; }

/* Umschalt-Tab unten auf dem Handy (Würfel & Block vs. Rangliste & Talismane/Tricks) */
body.is-portrait .mob-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 120;
}
.mob-tab {
  font-family: 'Press Start 2P'; font-size: 11px; padding: 13px 8px;
  background: #4f3b2b; color: #dec49b; border: 3px solid #140c06; border-radius: 8px;
  box-shadow: 0 4px 0 #140c06; cursor: pointer;
}
.mob-tab.active { background: #d9822b; color: #fff8e8; box-shadow: inset 0 0 0 2px #ffe066, 0 4px 0 #140c06; }
body.is-portrait[data-mobtab="info"] .play .ladder { display: block; }
body.is-portrait[data-mobtab="info"] .talismans { display: flex; }
body.is-portrait[data-mobtab="info"] .bottom { display: flex; flex-direction: column; gap: 6px; }
body.is-portrait[data-mobtab="info"] .tray,
body.is-portrait[data-mobtab="info"] .actions,
body.is-portrait[data-mobtab="info"] .hint,
body.is-portrait[data-mobtab="info"] .right { display: none; }

/* Shop im Handy-Hochformat */
body.is-portrait .shop {
  grid-template-columns: 1fr; grid-template-rows: auto 1fr;
  gap: 8px; padding: 10px; overflow-y: auto;
}
body.is-portrait .shop .ladder { display: none; }
body.is-portrait .owned-tals { margin-top: 14px; gap: 6px; flex-wrap: wrap; padding: 8px; }
body.is-portrait .shopbox { gap: 10px; padding: 10px; }
body.is-portrait .shoptitle { font-size: 15px; padding: 6px 12px; }
body.is-portrait .shoprow { gap: 10px; flex-wrap: wrap; }
body.is-portrait .card.shop-card { width: 100%; height: 132px; display: grid; grid-template-columns: 74px 1fr; grid-template-rows: 24px 1fr 28px; align-items: center; }
body.is-portrait .card.shop-card .shop-cat-banner { grid-column: 1 / -1; grid-row: 1; }
body.is-portrait .card.shop-card .shop-icon-wrap { grid-column: 1; grid-row: 2; width: 70px; height: 64px; margin: 0; }
body.is-portrait .card.shop-card .cardname { grid-column: 2; grid-row: 2; align-self: start; text-align: left; margin-top: 6px; padding: 0 10px 0 0; }
body.is-portrait .card.shop-card .shop-desc { grid-column: 2; grid-row: 2; align-self: end; text-align: left; margin-bottom: 6px; padding: 0 10px 0 0; }
body.is-portrait .card.shop-card .shop-buy-pill { grid-column: 1 / -1; grid-row: 3; }
body.is-portrait .shopbtns { width: 100%; flex-direction: column; gap: 8px; }
body.is-portrait .shopbtns .btn { width: 100%; padding: 14px; font-size: 13px; }
body.is-portrait .wagon-stage { padding: 4px 2px; perspective: none; }
body.is-portrait .wagon-world { transform: none !important; }
body.is-portrait .wagon-roof-wrap,
body.is-portrait .wagon-body-row,
body.is-portrait .wagon-counter-lip { margin: 0; }
body.is-portrait .wagon-side-3d,
body.is-portrait .wagon-bonobo,
body.is-portrait .wagon-wheels { display: none; }
body.is-portrait .wagon-shelf-grid { grid-template-columns: 1fr; }
body.is-portrait .wagon-cubby { min-height: 0; padding: 18px 8px 14px; }
body.is-portrait .wagon-cubby .card.shop-card { max-width: none; height: 132px; }

/* Modals (Becher-Schmiede, Ranked-Lobby, Abrechnung) im Handy-Hochformat */
body.is-portrait .mbox {
  min-width: 0; width: 95%; max-width: 510px; max-height: 92%;
  overflow-y: auto; padding: 18px 14px; gap: 12px;
}
body.is-portrait .mbox h2 { font-size: 16px; line-height: 22px; }
body.is-portrait .mcup-list { width: 100%; max-height: 520px; }
body.is-portrait .mcup-card { grid-template-columns: 58px 1fr; gap: 8px; }
body.is-portrait .mcup-right { grid-column: 1 / -1; width: 100%; }
body.is-portrait .cup-actions { flex-direction: row; justify-content: flex-end; width: 100%; }
body.is-portrait .mp-boxes { grid-template-columns: 1fr; }
body.is-portrait table.hs { width: 100%; font-size: 20px; }
body.is-portrait .mbtns { flex-wrap: wrap; justify-content: center; width: 100%; }
body.is-portrait .mbtns .btn { flex: 1; min-width: 140px; padding: 14px 10px; }
body.is-portrait .mute { top: 8px; right: 8px; bottom: auto; }

/* =====================================================================
   Interaktives Probespiel-Tutorial mit Bonobo Niklas 🍌
   Kompakte Comic-Sprechblasen, die je nach Schritt den Platz wechseln
   und niemals die Würfel oder die Buttons WÜRFELN / WERTEN verdecken!
   ===================================================================== */
.tut-box {
  position: absolute; z-index: 140;
  width: 440px; max-width: 92%;
  display: flex; align-items: flex-end; gap: 10px;
  pointer-events: none;
  animation: popin .22s ease-out;
}
/* Vier smarte Eck-Positionen, damit das zentrale Spielfeld + Buttons immer frei bleiben */
.tut-box.pos-bottom-right { right: 16px; bottom: 14px; flex-direction: row-reverse; }
.tut-box.pos-top-left     { left: 16px; top: 14px; align-items: flex-start; }
.tut-box.pos-bottom-left  { left: 16px; bottom: 14px; }
.tut-box.pos-top-right    { right: 16px; top: 14px; flex-direction: row-reverse; align-items: flex-start; }

.tut-monkey {
  pointer-events: auto; flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: linear-gradient(180deg, #1f3b23, #122415);
  padding: 6px; border-radius: 12px; border: 3px solid #140c06;
  box-shadow: inset 0 0 0 2px #75d471, 0 6px 12px rgba(0,0,0,.65);
}
.tut-monkey img { width: 72px; height: 54px; animation: bob 2s ease-in-out infinite; }
.tut-monkey .tut-name { font-family: 'Press Start 2P'; font-size: 8px; color: #ffd23a; }

.tut-speech {
  pointer-events: auto; flex: 1; position: relative;
  background: linear-gradient(180deg, #fff9e6 0%, #f0e2be 100%);
  color: #26190e;
  border: 3px solid #140c06; border-radius: 14px; padding: 10px 14px;
  box-shadow: inset 0 0 0 2px #d4b886, 0 8px 20px rgba(0,0,0,.7);
  display: flex; flex-direction: column; gap: 6px;
}
.tut-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-bottom: 2px dashed #c7b083; padding-bottom: 4px; }
.tut-head b { font-family: 'Press Start 2P'; font-size: 10px; color: #7a2e18; }
.tut-close {
  background: #6e5540; color: #fff8e8; border: 2px solid #140c06; border-radius: 5px;
  width: 24px; height: 24px; font-size: 14px; cursor: pointer; line-height: 20px;
}
.tut-text { font-size: 20px; line-height: 21px; color: #26190e; }
.tut-text b { color: #b03a18; }
.tut-text .c { color: #167a60; } .tut-text .m { color: #c9581e; }
.tut-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 2px; }
.tut-task-pill {
  font-family: 'Press Start 2P'; font-size: 9px; color: #26190e;
  background: #ffd23a; padding: 5px 10px; border-radius: 6px; border: 2px solid #140c06;
  animation: pulse .9s infinite;
}
.tut-spot {
  outline: 4px solid #ffd23a !important;
  box-shadow: 0 0 24px rgba(255, 210, 58, .85) !important;
  z-index: 35;
}

body.is-portrait .tut-box {
  left: 8px !important; right: 8px !important; width: auto; max-width: none;
}
body.is-portrait .tut-box.pos-top-left,
body.is-portrait .tut-box.pos-top-right { top: 6px; bottom: auto; }
body.is-portrait .tut-box.pos-bottom-left,
body.is-portrait .tut-box.pos-bottom-right { bottom: 62px; top: auto; }
body.is-portrait .tut-monkey img { width: 58px; height: 44px; }
body.is-portrait .tut-text { font-size: 18px; line-height: 19px; }

/* =====================================================================
   Animiertes Dschungel-Intro mit Musik & springenden Bonobos
   ===================================================================== */
.intro-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
}
.intro-vines {
  position: absolute; top: -60px; left: 0; right: 0; text-align: center;
  font-size: 46px; letter-spacing: 24px;
  animation: vinesDrop .7s cubic-bezier(.22,.88,.32,1.2) forwards;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.5));
}
@keyframes vinesDrop {
  from { top: -80px; opacity: 0; }
  to   { top: 18px; opacity: 1; }
}
.intro-logo-wrap {
  background: linear-gradient(180deg, #4a301d 0%, #2e1d11 100%);
  border: 5px solid #140c06; border-radius: 18px; padding: 24px 44px 20px;
  box-shadow: inset 0 0 0 4px #8a5e3b, inset 0 0 0 8px #382314, 0 14px 0 rgba(0,0,0,.65);
  text-align: center; z-index: 10;
  animation: introSignPop .85s cubic-bezier(.18,.89,.32,1.28) backwards;
}
@keyframes introSignPop {
  0%   { transform: scale(.2) rotate(-8deg); opacity: 0; }
  70%  { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.intro-presents {
  font-family: 'Press Start 2P'; font-size: 12px; color: #8fe87b;
  letter-spacing: 2px; margin-bottom: 14px; text-shadow: 2px 2px 0 #140c06;
}
.intro-logo {
  font-family: 'Press Start 2P'; font-size: 80px; letter-spacing: 5px;
  text-shadow: 6px 6px 0 #140c06, -2px -2px 0 #140c06, 2px -2px 0 #140c06, -2px 2px 0 #140c06;
}
.intro-char {
  display: inline-block;
  animation: introCharBounce .6s cubic-bezier(.2,.9,.3,1.35) backwards;
}
@keyframes introCharBounce {
  0%   { transform: translateY(-90px) scale(.3); opacity: 0; }
  70%  { transform: translateY(10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.intro-sub {
  font-family: 'Press Start 2P'; font-size: 15px; color: #ffe066;
  margin-top: 14px; letter-spacing: 3px; text-shadow: 3px 3px 0 #140c06;
  animation: popin .6s ease-out .9s backwards;
}
.intro-stage {
  position: relative; width: 100%; height: 250px;
}
.intro-runner {
  position: absolute; bottom: 20px; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.intro-runner img {
  width: 156px; height: 118px;
  filter: drop-shadow(0 12px 4px rgba(0,0,0,.65));
}
.intro-runner img.flip-x { transform: scaleX(-1); }
.runner-tag {
  font-family: 'Press Start 2P'; font-size: 11px; color: #ffd23a;
  background: rgba(20,12,6,.9); padding: 5px 10px; border-radius: 8px;
  border: 2px solid #785337; text-shadow: 2px 2px 0 #000;
}
.monkey-bubble {
  font-family: 'Press Start 2P'; font-size: 11px; color: #26190e;
  background: #fff9e6; padding: 7px 12px; border-radius: 12px;
  border: 3px solid #140c06; box-shadow: 0 5px 0 rgba(0,0,0,.5);
  white-space: nowrap;
  animation: pulse .7s infinite;
}

/* Niklas springt in großen Affensprüngen von links quer durchs Bild! */
.niklas-jump {
  animation: niklasHopAcross 3.8s ease-in-out forwards;
}
@keyframes niklasHopAcross {
  0%   { left: -18%; transform: translateY(0) rotate(-8deg); }
  14%  { left: 6%;   transform: translateY(-115px) rotate(12deg) scale(1.08); }
  28%  { left: 22%;  transform: translateY(0) rotate(-6deg); }
  44%  { left: 32%;  transform: translateY(-130px) rotate(14deg) scale(1.12); }
  58%  { left: 26%;  transform: translateY(0) rotate(0deg); }
  74%  { left: 28%;  transform: translateY(-75px) rotate(-10deg) scale(1.06); }
  88%  { left: 27%;  transform: translateY(0) rotate(4deg); }
  100% { left: 27%;  transform: translateY(-12px) rotate(0deg); }
}

/* Victor springt von rechts im Zickzack durchs Bild und feiert mit Niklas! */
.victor-jump {
  animation: victorHopAcross 3.8s ease-in-out forwards;
}
@keyframes victorHopAcross {
  0%   { right: -18%; transform: translateY(0) rotate(8deg); }
  16%  { right: 5%;   transform: translateY(-120px) rotate(-14deg) scale(1.08); }
  32%  { right: 20%;  transform: translateY(0) rotate(6deg); }
  48%  { right: 32%;  transform: translateY(-135px) rotate(-12deg) scale(1.12); }
  62%  { right: 26%;  transform: translateY(0) rotate(0deg); }
  78%  { right: 28%;  transform: translateY(-80px) rotate(10deg) scale(1.06); }
  90%  { right: 27%;  transform: translateY(0) rotate(-4deg); }
  100% { right: 27%;  transform: translateY(-12px) rotate(0deg); }
}

/* Fliegende 3D-Würfel zwischen den beiden springenden Bonobos */
.intro-dice-burst {
  position: absolute; left: 50%; bottom: 50px; transform: translateX(-50%);
  display: flex; gap: 18px; z-index: 15;
}
.idie {
  width: 72px; height: 72px;
  filter: drop-shadow(0 8px 3px rgba(0,0,0,.6));
  animation: introDiePop .7s cubic-bezier(.18,.89,.32,1.35) backwards, bob 1.4s ease-in-out infinite;
}
.idie.d1 { animation-delay: 0.5s, 0.5s; }
.idie.d2 { animation-delay: 0.7s, 0.7s; }
.idie.d3 { animation-delay: 0.9s, 0.9s; }
.idie.d4 { animation-delay: 1.1s, 1.1s; }
.idie.d5 { animation-delay: 1.3s, 1.3s; }
@keyframes introDiePop {
  0%   { transform: translateY(120px) rotate(-180deg) scale(0); opacity: 0; }
  100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
}

.intro-skip {
  position: absolute; right: 165px; bottom: 8px; top: auto; z-index: 50;
}

body.is-portrait .intro-logo-wrap { padding: 16px 18px; width: 94%; }
body.is-portrait .intro-logo { font-size: 38px; letter-spacing: 2px; }
body.is-portrait .intro-presents { font-size: 9px; }
body.is-portrait .intro-sub { font-size: 11px; }
body.is-portrait .intro-runner img { width: 116px; height: 88px; }
body.is-portrait .idie { width: 52px; height: 52px; }
body.is-portrait .niklas-jump { animation-name: niklasHopPortrait; }
body.is-portrait .victor-jump { animation-name: victorHopPortrait; }
@keyframes niklasHopPortrait {
  0%   { left: -30%; transform: translateY(0); }
  25%  { left: 6%;   transform: translateY(-95px) rotate(10deg); }
  50%  { left: 12%;  transform: translateY(0); }
  75%  { left: 8%;   transform: translateY(-70px) rotate(-8deg); }
  100% { left: 6%;   transform: translateY(0); }
}
@keyframes victorHopPortrait {
  0%   { right: -30%; transform: translateY(0); }
  28%  { right: 6%;   transform: translateY(-100px) rotate(-10deg); }
  54%  { right: 12%;  transform: translateY(0); }
  78%  { right: 8%;   transform: translateY(-75px) rotate(8deg); }
  100% { right: 6%;   transform: translateY(0); }
}

/* =====================================================================
   Jederzeit erreichbarer ☰ MENÜ-Button & Sound-/System-Menü
   ===================================================================== */
.sys-menu-btn {
  position: absolute; right: 52px; bottom: 8px; z-index: 310;
  height: 34px; padding: 0 12px; border-radius: 7px; border: 3px solid #140c06;
  background: linear-gradient(180deg, #8a5e3b 0%, #5e3f27 100%);
  color: #fff8e8; font-family: 'Press Start 2P'; font-size: 10px;
  cursor: pointer; box-shadow: inset 0 2px 0 rgba(255,255,255,.22), 0 4px 0 #140c06;
  transition: filter .1s, transform .1s;
}
.sys-menu-btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.sys-menu-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #140c06; }

body.is-portrait .sys-menu-btn {
  top: 8px; right: 48px; bottom: auto;
}

.sys-overlay {
  position: absolute; inset: 0; background: rgba(10,6,3,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 450;
}
.sys-box {
  width: 520px; max-width: 94%; gap: 18px;
}
.sound-panel {
  width: 100%; background: #1a110a; border: 2px solid #5e4028;
  border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.srow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 21px; text-align: left;
}
.srow b { color: #ffd23a; font-family: 'Press Start 2P'; font-size: 11px; }
.srow-right { display: flex; align-items: center; gap: 8px; }
.srow input[type="range"] {
  width: 165px; accent-color: #ffd23a; cursor: pointer; height: 8px;
}
.sys-actions {
  display: flex; flex-direction: column; gap: 10px; width: 100%;
}
.sys-actions .btn { width: 100%; }

/* =====================================================================
   Epische Kniffel-Jackpot-Animation (Banner, Bananen-Explosion & 3D-Spin!)
   ===================================================================== */
.kniffel-fx {
  position: absolute; inset: 0; pointer-events: none; z-index: 480;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.k-flash {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,235,130,.75) 0%, rgba(255,160,30,.28) 55%, rgba(0,0,0,0) 80%);
  animation: kFlashAnim 1.25s ease-out forwards;
}
@keyframes kFlashAnim {
  0%   { opacity: 0; transform: scale(.4); }
  14%  { opacity: 1; transform: scale(1.1); }
  75%  { opacity: .65; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.4); }
}
.k-rays {
  position: absolute; width: 920px; height: 920px;
  background: repeating-conic-gradient(from 0deg, rgba(255,220,70,.28) 0deg 12deg, rgba(255,220,70,0) 12deg 24deg);
  border-radius: 50%;
  animation: kRaysSpin 1.4s linear forwards;
}
@keyframes kRaysSpin {
  0%   { opacity: 0; transform: scale(.3) rotate(0deg); }
  20%  { opacity: 1; transform: scale(1) rotate(35deg); }
  80%  { opacity: .9; transform: scale(1.1) rotate(130deg); }
  100% { opacity: 0; transform: scale(1.2) rotate(180deg); }
}
.k-particles {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
}
.k-part {
  position: absolute; left: -18px; top: -18px;
  font-size: 34px;
  filter: drop-shadow(0 4px 2px rgba(0,0,0,.6));
  animation: kPartFly 1.15s cubic-bezier(.15,.85,.3,1) forwards;
}
@keyframes kPartFly {
  0%   { opacity: 0; transform: translate(0, 0) scale(.2) rotate(0deg); }
  18%  { opacity: 1; transform: translate(calc(var(--tx) * 0.35), calc(var(--ty) * 0.35 - 35px)) scale(1.25) rotate(calc(var(--rot) * 0.4)); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), calc(var(--ty) + 65px)) scale(.7) rotate(var(--rot)); }
}
.k-banner {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, #ffe266 0%, #f0a818 55%, #c7760a 100%);
  border: 5px solid #140c06; border-radius: 20px;
  padding: 18px 34px;
  box-shadow: inset 0 0 0 4px #fff8d6, 0 0 45px rgba(255,215,50,.95), 0 14px 0 #140c06;
  animation: kBannerPop 1.3s cubic-bezier(.18,.89,.32,1.28) forwards;
}
/* Schockwellen-Ringe */
.k-ring {
  position: absolute; left: 50%; top: 50%; width: 120px; height: 120px;
  margin-left: -60px; margin-top: -60px; border-radius: 50%;
  border: 8px solid rgba(255, 224, 90, .92);
  box-shadow: 0 0 28px rgba(255, 200, 40, .85);
  animation: kRingExpand .95s cubic-bezier(.1,.8,.2,1) forwards;
}
.k-ring.r2 { animation-delay: .18s; border-color: rgba(110, 245, 160, .9); }
.k-ring.r3 { animation-delay: .36s; border-color: rgba(255, 80, 220, .95); }
@keyframes kRingExpand {
  0%   { opacity: 1; transform: scale(.2); }
  100% { opacity: 0; transform: scale(9.5); }
}

/* Konfetti-Regen für Super-Monkey & Ultra-Monkey */
.k-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.k-conf {
  position: absolute; top: -20px; width: 12px; height: 18px;
  border: 2px solid #140c06; border-radius: 3px;
  animation: kConfFall 1.4s linear forwards;
}
@keyframes kConfFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(760px) rotate(540deg); opacity: 0; }
}

/* STUFE 2: SUPER-MONKEY (6 Gleiche – Smaragd & Gold-Feuerwerk) */
.kniffel-fx.tier-superk .k-flash {
  background: radial-gradient(circle, rgba(160,255,195,.88) 0%, rgba(255,215,60,.45) 50%, rgba(0,0,0,0) 82%);
  animation-duration: 1.65s;
}
.kniffel-fx.tier-superk .k-rays {
  width: 1150px; height: 1150px;
  background: repeating-conic-gradient(from 0deg, rgba(117,240,155,.36) 0deg 10deg, rgba(255,215,60,.25) 10deg 20deg, rgba(0,0,0,0) 20deg 30deg);
  animation-duration: 1.8s;
}
.kniffel-fx.tier-superk .k-banner {
  background: linear-gradient(180deg, #a8ff9e 0%, #3ec96b 45%, #ffd23a 100%);
  box-shadow: inset 0 0 0 4px #ffffff, 0 0 65px rgba(95, 232, 157, .95), 0 14px 0 #140c06;
  animation-duration: 1.65s;
}
.kniffel-fx.tier-superk .k-part { font-size: 40px; animation-duration: 1.45s; }

/* STUFE 3: ULTRA-MONKEY ESKALATION (7 Gleiche – KOMPLETTER BILDSCHIRM-AUSRASTER!) */
.k-strobe {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  animation: kUltraStrobe .22s steps(2, end) infinite;
}
@keyframes kUltraStrobe {
  0%   { background: rgba(255, 60, 40, .28); }
  25%  { background: rgba(255, 220, 40, .28); }
  50%  { background: rgba(80, 240, 150, .28); }
  75%  { background: rgba(160, 90, 255, .28); }
  100% { background: rgba(255, 60, 40, .28); }
}
.kniffel-fx.tier-ultrak .k-flash {
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,140,20,.65) 42%, rgba(255,40,140,.32) 72%, rgba(0,0,0,0) 90%);
  animation-duration: 2.3s;
}
.kniffel-fx.tier-ultrak .k-rays {
  width: 1500px; height: 1500px;
  background: repeating-conic-gradient(from 0deg, rgba(255,220,40,.48) 0deg 8deg, rgba(255,60,120,.38) 8deg 16deg, rgba(90,245,170,.35) 16deg 24deg);
  animation-duration: 2.3s;
}
.kniffel-fx.tier-ultrak .k-banner {
  background: linear-gradient(120deg, #ff5238, #ffd23a, #5fe89d, #47b4ff, #e66bff, #ffd23a);
  background-size: 260% 260%;
  padding: 24px 40px;
  box-shadow: inset 0 0 0 5px #ffffff, 0 0 95px rgba(255, 180, 40, 1), 0 0 140px rgba(255, 60, 180, .85), 0 16px 0 #140c06;
  animation: kBannerPop 2.25s cubic-bezier(.18,.89,.32,1.28) forwards, shimmer 1.1s linear infinite;
}
.kniffel-fx.tier-ultrak .k-main { font-size: 40px; color: #140a00; text-shadow: 0 4px 0 #ffffff, 4px 5px 0 rgba(0,0,0,.45); }
.kniffel-fx.tier-ultrak .k-monkey { width: 118px; height: 88px; animation-duration: .16s; }
.kniffel-fx.tier-ultrak .k-part { font-size: 46px; animation-duration: 1.85s; }

/* Stufenweises Beben auf #stage */
#stage.kniffel-quake { animation: stageQuake1 .45s ease-out; }
#stage.superk-quake  { animation: stageQuake2 .85s ease-out; }
#stage.ultrak-quake  { animation: stageQuake3 1.7s ease-out; }
@keyframes stageQuake1 {
  0%, 100% { margin-left: 0; margin-top: 0; }
  20% { margin-left: -6px; margin-top: 5px; }
  45% { margin-left: 6px; margin-top: -4px; }
  70% { margin-left: -3px; margin-top: 3px; }
}
@keyframes stageQuake2 {
  0%, 100% { filter: none; }
  12% { margin-left: -10px; margin-top: 7px; filter: brightness(1.18); }
  28% { margin-left: 10px;  margin-top: -8px; }
  44% { margin-left: -8px;  margin-top: -6px; filter: brightness(1.12); }
  60% { margin-left: 7px;   margin-top: 6px; }
  78% { margin-left: -4px;  margin-top: 3px; }
  90% { margin-left: 0; margin-top: 0; }
}
@keyframes stageQuake3 {
  0%, 100% { margin-left: 0; margin-top: 0; filter: none; }
  6%  { margin-left: -18px; margin-top: 14px; filter: saturate(1.6) brightness(1.25); }
  14% { margin-left: 18px;  margin-top: -15px; }
  22% { margin-left: -16px; margin-top: -12px; filter: hue-rotate(25deg) saturate(1.7); }
  30% { margin-left: 16px;  margin-top: 12px; }
  38% { margin-left: -14px; margin-top: 10px; filter: hue-rotate(-25deg) brightness(1.22); }
  48% { margin-left: 12px;  margin-top: -10px; }
  58% { margin-left: -10px; margin-top: 8px; }
  68% { margin-left: 9px;   margin-top: -6px; filter: brightness(1.15); }
  80% { margin-left: -5px;  margin-top: 4px; }
  92% { margin-left: 3px;   margin-top: -2px; }
}
@keyframes kBannerPop {
  0%   { opacity: 0; transform: scale(.15) rotate(-14deg); }
  22%  { opacity: 1; transform: scale(1.16) rotate(4deg); }
  36%  { transform: scale(.95) rotate(-2deg); }
  50%  { transform: scale(1.06) rotate(1deg); }
  82%  { opacity: 1; transform: scale(1.02) rotate(0deg); }
  100% { opacity: 0; transform: scale(1.25) translateY(-30px); }
}
.k-monkey {
  width: 96px; height: 72px;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.55));
  animation: kMonkeyDance .32s ease-in-out infinite alternate;
}
.k-monkey.right { transform: scaleX(-1); animation-name: kMonkeyDanceFlip; }
@keyframes kMonkeyDance {
  from { transform: translateY(4px) rotate(-8deg); }
  to   { transform: translateY(-14px) rotate(10deg) scale(1.1); }
}
@keyframes kMonkeyDanceFlip {
  from { transform: scaleX(-1) translateY(4px) rotate(-8deg); }
  to   { transform: scaleX(-1) translateY(-14px) rotate(10deg) scale(1.1); }
}
.k-titles { text-align: center; }
.k-main {
  font-family: 'Press Start 2P'; font-size: 38px;
  color: #140a00;
  text-shadow: 0 3px 0 #fff8d6, 3px 4px 0 rgba(0,0,0,.35);
  letter-spacing: 2px;
}
.k-sub {
  font-family: 'Press Start 2P'; font-size: 13px;
  color: #7a1808;
  text-shadow: 0 1px 0 #fff8d6;
  margin-top: 8px;
}

/* 3D-Freudensprung & Goldglanz der 5 Kniffel-Würfel auf dem Tisch */
.die.kniffel-spin .cube {
  animation: dieKniffelJump .95s cubic-bezier(.22,.88,.32,1.25);
}
.die.kniffel-spin .cf-top img {
  filter: drop-shadow(0 0 14px #ffe066) brightness(1.3) !important;
}
@keyframes dieKniffelJump {
  0%   { transform: rotateX(var(--pitch, -44deg)) rotateY(var(--yaw, 18deg)) scale3d(1, 1, 1); }
  35%  { transform: translateY(-38px) rotateX(-25deg) rotateY(198deg) scale3d(1.32, 1.32, 1.32); }
  70%  { transform: translateY(-12px) rotateX(-52deg) rotateY(378deg) scale3d(1.15, 1.15, 1.15); }
  100% { transform: rotateX(var(--pitch, -44deg)) rotateY(calc(var(--yaw, 18deg) + 360deg)) scale3d(1, 1, 1); }
}

body.is-portrait .k-banner { padding: 14px 16px; gap: 10px; width: 94%; }
body.is-portrait .k-main { font-size: 21px; }
body.is-portrait .k-sub { font-size: 10px; }
body.is-portrait .k-monkey { width: 64px; height: 48px; }

/* =====================================================================
   Erfolge (Achievements), Makro-Meilensteine & Kosmetische Tisch-Filze
   ===================================================================== */
.ach-banner {
  position: absolute; top: 14px; right: 16px; z-index: 460;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #3b2614 0%, #1f1309 100%);
  border: 3px solid #140c06; border-radius: 12px; padding: 10px 16px;
  box-shadow: inset 0 0 0 3px #ffd23a, 0 8px 20px rgba(0,0,0,.75);
  max-width: 390px; pointer-events: none;
  animation: popin .25s cubic-bezier(.18,.89,.32,1.25);
}
.ach-b-icon { font-size: 36px; flex: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.6)); }
.ach-b-body { text-align: left; }
.ach-b-tag { font-family: 'Press Start 2P'; font-size: 9px; color: #ffd23a; margin-bottom: 3px; }
.ach-b-name { font-family: 'Press Start 2P'; font-size: 12px; color: #fff8e8; margin-bottom: 2px; }
.ach-b-desc { font-size: 17px; color: #cbb699; line-height: 17px; }

.ach-section-lbl {
  font-family: 'Press Start 2P'; font-size: 9px; color: #ffe066;
  width: 100%; text-align: left; padding-bottom: 3px;
  border-bottom: 1px dashed #6b4930; margin-top: 2px;
}
.skin-row {
  display: flex; gap: 8px; width: 100%; flex-wrap: wrap; justify-content: center;
}
.skin-card {
  flex: 1; min-width: 128px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(24, 15, 9, .92); border: 2px solid #593e28; border-radius: 10px;
  padding: 7px 6px; color: #f6eedc; cursor: pointer; transition: transform .1s, filter .1s;
}
.skin-card:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.14); }
.skin-card.selected {
  border-color: #75d471; background: rgba(26, 48, 24, .95);
  box-shadow: inset 0 0 0 2px #75d471, 0 4px 10px rgba(0,0,0,.5);
}
.skin-card.locked { opacity: .62; cursor: default; }
.skin-monkeys {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  background: rgba(0,0,0,.35); border-radius: 7px; padding: 3px 5px;
  border: 1px solid #4a3321;
}
.skin-monkeys img { width: 52px; height: 39px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.skin-monkeys img.flip { transform: scaleX(-1); }
.skin-title { font-family: 'Press Start 2P'; font-size: 8px; line-height: 11px; text-align: center; color: #ffd866; }
.skin-state { font-family: 'Press Start 2P'; font-size: 8px; color: #8fe8b4; }
.skin-card.locked .skin-state { color: #b5a48b; }

.felt-row {
  display: flex; gap: 6px; width: 100%; flex-wrap: wrap; justify-content: center;
}
.felt-swatch {
  flex: 1; min-width: 124px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(24, 15, 9, .92); border: 2px solid #593e28; border-radius: 8px;
  padding: 6px 8px; color: #f6eedc; cursor: pointer; transition: transform .1s, filter .1s;
}
.felt-swatch:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.15); }
.felt-swatch.selected {
  border-color: #ffd23a; background: rgba(58, 42, 16, .95);
  box-shadow: inset 0 0 0 2px #ffd23a;
}
.felt-swatch.locked { opacity: .55; cursor: default; }
.felt-dot {
  width: 34px; height: 20px; border-radius: 5px;
  border: 2px solid #140c06; box-shadow: inset 0 2px 3px rgba(255,255,255,.25);
}
.felt-name { font-family: 'Press Start 2P'; font-size: 8px; text-align: center; line-height: 11px; color: #fff8e8; }
.felt-state { font-family: 'Press Start 2P'; font-size: 8px; color: #8fe8b4; }
.felt-swatch.locked .felt-state { color: #b5a48b; }

.ach-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  width: 700px; max-width: 100%; max-height: 230px; overflow-y: auto; padding-right: 4px;
}
.ach-card {
  display: grid; grid-template-columns: 40px 1fr 22px; align-items: center; gap: 8px;
  background: rgba(24, 15, 9, .92); border: 2px solid #4a3321; border-radius: 8px;
  padding: 6px 9px; text-align: left;
}
.ach-card.done {
  border-color: #ffd23a; background: linear-gradient(180deg, rgba(58, 42, 16, .94), rgba(36, 25, 10, .94));
}
.ach-card.todo { opacity: .72; }
.ach-ic {
  width: 38px; height: 38px; border-radius: 7px; background: rgba(0,0,0,.38);
  border: 2px solid #593e28; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.ach-card.done .ach-ic { border-color: #ffd23a; background: rgba(255, 210, 58, .15); }
.ach-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; }
.ach-title b { font-family: 'Press Start 2P'; font-size: 9px; line-height: 13px; color: #ffd866; }
.ach-rew { font-family: 'Press Start 2P'; font-size: 8px; color: #8fe87b; white-space: nowrap; }
.ach-desc { font-size: 16px; line-height: 16px; color: #d6c3a5; margin-top: 2px; }
.ach-badge { font-family: 'Press Start 2P'; font-size: 12px; color: #75d471; text-align: center; }

body.is-portrait .ach-miles-grid,
body.is-portrait .ach-list { grid-template-columns: 1fr; width: 100%; }
body.is-portrait .ach-list { max-height: 260px; }

/* =====================================================================
   Punkte-Schwellenwert-Animation (100 / 1.000 / 10.000 / 100.000 / 1.000.000+)
   ===================================================================== */
.rscore { position: relative; overflow: visible !important; }
.rscore.milestone-box {
  animation: scoreBoxFlash .75s cubic-bezier(.18,.89,.32,1.28);
}
#rscore.milestone-pop {
  animation: scoreNumBurst .75s cubic-bezier(.18,.89,.32,1.35);
  color: #ffe066 !important;
  text-shadow: 0 0 14px #ff7b1a, 3px 3px 0 #140c06 !important;
}
@keyframes scoreBoxFlash {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.06); box-shadow: inset 0 0 0 3px #ffd23a, 0 0 26px rgba(255, 160, 40, .95); }
  100% { transform: scale(1); }
}
@keyframes scoreNumBurst {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.42) rotate(-3deg); }
  56%  { transform: scale(1.18) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.score-mile-badge {
  position: absolute; left: 50%; top: -16px; transform: translateX(-50%);
  font-family: 'Press Start 2P'; font-size: 11px; white-space: nowrap;
  color: #140a00; text-shadow: 0 1px 0 rgba(255,255,255,.75);
  background: linear-gradient(180deg, #ffe66b 0%, #ff8c1a 100%);
  border: 2px solid #140c06; border-radius: 7px; padding: 4px 10px;
  box-shadow: 0 4px 0 #140c06, 0 0 18px rgba(255, 180, 40, .9);
  pointer-events: none; z-index: 95;
  animation: mileBadgeFloat 1.15s cubic-bezier(.18,.88,.32,1.2) forwards;
}
@keyframes mileBadgeFloat {
  0%   { opacity: 0; transform: translate(-50%, 16px) scale(.4); }
  20%  { opacity: 1; transform: translate(-50%, -6px) scale(1.18); }
  38%  { opacity: 1; transform: translate(-50%, -2px) scale(1); }
  78%  { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -32px) scale(.85); }
}
.score-mile-sparks {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  pointer-events: none; z-index: 94;
}
.sm-spark {
  position: absolute; left: -10px; top: -10px; font-size: 18px;
  animation: smSparkFly .85s ease-out forwards;
}
@keyframes smSparkFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(.4); }
  30%  { opacity: 1; transform: translate(calc(var(--sx) * 0.6), calc(var(--sy) * 0.6)) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.5); }
}

/* =====================================================================
   20-Sekunden Matchmaking-Radar & Globale Live-Rangliste (GLOBAL_LB)
   ===================================================================== */
.mp-queue-area {
  width: 100%; display: flex; flex-direction: column; align-items: center;
}
.mp-search-box {
  width: 100%; background: rgba(16, 10, 6, .95);
  border: 2px solid #75d471; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  box-shadow: inset 0 0 12px rgba(117, 212, 113, .22);
}
.mp-search-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 8px;
}
.mp-search-head b {
  font-family: 'Press Start 2P'; font-size: 9px; color: #8fe87b; flex: 1; text-align: left;
}
.mp-radar-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #5fe88d; box-shadow: 0 0 8px #5fe88d;
  animation: pulse .8s infinite; vertical-align: middle; margin-right: 4px;
}
.mp-timer-pill {
  font-family: 'Press Start 2P'; font-size: 11px; color: #140a00;
  background: #ffd23a; padding: 3px 8px; border-radius: 5px; border: 2px solid #140c06;
}
.mp-search-bar {
  width: 100%; height: 10px; background: #120b06;
  border: 2px solid #593e28; border-radius: 6px; overflow: hidden;
}
.mp-search-fill {
  height: 100%;
  background: linear-gradient(90deg, #43b55c, #ffd23a);
  transition: width .4s linear;
}
.mp-search-msg {
  font-size: 18px; color: #e8d7bd; text-align: center; line-height: 19px;
}

/* Globale Rangliste */
.glb-status-bar {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  background: rgba(20, 36, 22, .88); border: 2px solid #4d8c52;
  border-radius: 8px; padding: 6px 12px; font-size: 18px; color: #d6f5d6;
}
.glb-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; width: 100%;
}
.glb-table-wrap {
  width: 690px; max-width: 100%; max-height: 310px; overflow-y: auto;
  background: rgba(18, 12, 7, .92); border: 2px solid #593e28; border-radius: 10px;
  padding: 4px 8px;
}
table.hs.glb-table {
  width: 100%; border-collapse: collapse;
}
.glb-table tr {
  border-bottom: 1px dashed #4a3321;
}
.glb-table tr.me-row {
  background: rgba(117, 212, 113, .16);
  box-shadow: inset 0 0 0 2px #75d471;
}
.glb-table tr.podium-1 td.lb-rank { font-size: 24px; }
.glb-table tr.podium-2 td.lb-rank { font-size: 23px; }
.glb-table tr.podium-3 td.lb-rank { font-size: 22px; }
.glb-table td {
  padding: 6px 8px; vertical-align: middle;
}
.glb-table td.lb-rank {
  width: 44px; font-family: 'Press Start 2P'; font-size: 12px; color: #ffd866; text-align: center;
}
.glb-table td.lb-player {
  display: flex; align-items: center; gap: 10px; text-align: left;
}
.glb-table td.lb-player b {
  font-family: 'Press Start 2P'; font-size: 11px; color: #fff8e8;
}
.glb-table tr.legend td.lb-player b {
  color: #ffd23a;
}
.lb-avatar {
  width: 34px !important; height: 30px !important; flex: none; margin: 0 !important;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.6));
}
.lb-sub {
  font-size: 16px; line-height: 16px; color: #cbb699; margin-top: 2px;
}
.lb-you-pill {
  font-family: 'Press Start 2P'; font-size: 8px; color: #140a00;
  background: #75d471; padding: 2px 5px; border-radius: 4px; margin-left: 4px;
  vertical-align: middle;
}
.glb-table td.lb-ante {
  font-size: 19px; color: #dec49b; white-space: nowrap; text-align: center;
}
.glb-table td.lb-score {
  text-align: right; font-family: 'Press Start 2P'; font-size: 12px; color: #8fe8b4; white-space: nowrap;
}
.glb-table tr.lb-clickable {
  cursor: pointer; transition: background .12s;
}
.glb-table tr.lb-clickable:hover {
  background: rgba(255, 210, 58, .16);
}
.lb-inspect-btn {
  display: inline-block; font-family: 'Press Start 2P'; font-size: 8px;
  color: #140a00; background: #ffd23a; padding: 3px 6px; border-radius: 5px;
  border: 2px solid #140c06; margin-left: 6px; vertical-align: middle;
}

/* Tages-Tisch Banner & Pill */
.daily-pill {
  border-color: #140c06 !important;
  box-shadow: inset 0 0 0 2px #c278ff, 0 4px 0 rgba(0,0,0,.5) !important;
}
.daily-pill b { color: #e2b8ff !important; }
.glb-daily-banner {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; text-align: left;
  background: linear-gradient(90deg, rgba(64, 28, 96, .92), rgba(38, 16, 62, .92));
  border: 2px solid #b366ff; border-radius: 9px; padding: 8px 12px;
}
.glb-daily-banner b { font-family: 'Press Start 2P'; font-size: 10px; color: #ffe066; }
.glb-daily-sub { font-size: 18px; color: #ebd6ff; margin-top: 2px; }

/* Build-Inspektor (Sieger-Tafel) */
.insp-header {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: rgba(20, 13, 8, .92); border: 2px solid #785337; border-radius: 10px;
  padding: 10px 14px; text-align: left;
}
.insp-cup { width: 64px; height: 52px; flex: none; }
.insp-meta { display: flex; flex-direction: column; gap: 3px; font-size: 20px; }
.insp-meta b { font-family: 'Press Start 2P'; font-size: 10px; color: #ffd866; }
.insp-row {
  width: 100%; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  background: rgba(18, 12, 7, .88); border: 2px solid #4a3321; border-radius: 10px;
  padding: 10px;
}
.insp-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(38, 25, 15, .95); border: 2px solid #8a5e3b; border-radius: 8px;
  padding: 7px 10px; min-width: 96px;
}
.insp-item.leg {
  border-color: #ffd23a; box-shadow: 0 0 10px rgba(255, 210, 58, .45);
}
.insp-item.die-item { border-color: #26b888; }
.insp-item img { width: 42px; height: 42px; }
.insp-item span { font-family: 'Press Start 2P'; font-size: 8px; color: #fff8e8; text-align: center; line-height: 11px; }

/* 20s-Warteschlange: Warmwürfeln-Miniwürfel & Buttons */
.mp-warmup-row {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; width: 100%;
  margin-top: 2px;
}
.mp-warmup-die {
  display: flex; align-items: center; gap: 6px;
  background: #2b1b10; color: #ffe066; border: 2px solid #b5834c; border-radius: 7px;
  padding: 4px 10px; font-family: 'Press Start 2P'; font-size: 8px; cursor: pointer;
  transition: transform .1s, filter .1s;
}
.mp-warmup-die:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.15); }
.mp-warmup-die:active { transform: translateY(1px); }
.mp-warmup-die img { width: 24px; height: 24px; }

/* Live-Duell: Wurf-Ticker & Bonobo-Emotes sauber in einer kompakten Zeile unten im Gegner-Panel */
.oinfo { min-width: 0; overflow: hidden; }
.pvp-bottom-row {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-width: 0; width: 100%; margin-top: 2px;
}
.pvp-live-ticker {
  flex: 1; min-width: 0;
  font-size: 15px; color: #ffe066; background: rgba(0, 0, 0, .42);
  border: 1px solid #785337; border-radius: 5px; padding: 2px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pvp-live-ticker.flash {
  animation: scoreBoxFlash .65s ease-out;
}
.mp-ticker-inline { color: #ffe066; }
.pvp-emote-bar {
  flex: none;
  display: flex; align-items: center; gap: 3px;
}
.emote-btn {
  background: rgba(24, 15, 9, .9); border: 1px solid #6b4930; border-radius: 5px;
  font-size: 14px; line-height: 18px; padding: 1px 4px; cursor: pointer;
  transition: transform .1s, filter .1s;
}
.emote-btn:hover { transform: translateY(-1px) scale(1.1); filter: brightness(1.2); border-color: #ffd23a; }
.emote-float {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  z-index: 470; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #3b2614 0%, #1f1309 100%);
  border: 3px solid #140c06; border-radius: 14px; padding: 8px 16px;
  box-shadow: inset 0 0 0 2px #ffd23a, 0 8px 20px rgba(0,0,0,.75);
  pointer-events: none; animation: popin .22s cubic-bezier(.18,.89,.32,1.28);
}
.emote-float .ef-ic { font-size: 32px; }
.emote-float .ef-txt { display: flex; flex-direction: column; text-align: left; }
.emote-float .ef-txt b { font-family: 'Press Start 2P'; font-size: 9px; color: #ffd23a; }
.emote-float .ef-txt span { font-size: 20px; color: #fff8e8; }

body.is-portrait .glb-table-wrap { width: 100%; max-height: 360px; }
body.is-portrait .glb-tabs .btn { flex: 1; min-width: 115px; }

/* =====================================================================
   Spielername-Dialog, Name-Pill & Neue Online-Ranked-Arena-Lobby
   ===================================================================== */
.name-pill {
  box-shadow: inset 0 0 0 2px #75d471, 0 4px 0 rgba(0,0,0,.5) !important;
}
.name-pill b { color: #8fe87b !important; }

.name-prompt-box {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 440px;
  background: rgba(18, 12, 7, .92); border: 2px solid #785337; border-radius: 12px;
  padding: 16px;
}
#welcomeNameInput {
  width: 100%; font-family: 'Press Start 2P'; font-size: 16px; text-align: center;
  padding: 12px 14px; background: #120b06; color: #ffe066;
  border: 3px solid #ffd23a; border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(255, 210, 58, .2);
}
#welcomeNameInput:focus { outline: none; border-color: #75d471; color: #fff8e8; }

/* Neue Online-Ranked-Arena */
.mp-hero-card {
  width: 100%; display: grid; grid-template-columns: 94px 1fr; gap: 14px; align-items: center;
  background: linear-gradient(180deg, rgba(36, 23, 14, .96) 0%, rgba(20, 12, 7, .96) 100%);
  border: 3px solid #140c06; border-radius: 12px; padding: 12px 16px;
  box-shadow: inset 0 0 0 2px #8a5e3b, 0 6px 14px rgba(0,0,0,.55);
  text-align: left;
}
.mp-hero-avatar {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(12, 8, 4, .75); border: 2px solid #5e4028; border-radius: 10px;
  padding: 8px 6px;
}
.mp-hero-avatar img { width: 64px; height: 50px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.6)); }
.mp-cup-tag { font-family: 'Press Start 2P'; font-size: 7px; color: #dec49b; text-align: center; line-height: 10px; }

.mp-hero-main { display: flex; flex-direction: column; gap: 8px; }
.mp-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-lbl { font-family: 'Press Start 2P'; font-size: 9px; color: #cbb699; }
.mp-name-input {
  font-family: 'Press Start 2P' !important; font-size: 12px !important;
  padding: 7px 10px !important; background: #120b06 !important; color: #ffe066 !important;
  border: 2px solid #ffd23a !important; border-radius: 7px !important; width: 210px !important;
}
.mp-elo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-league-badge {
  font-family: 'Press Start 2P'; font-size: 10px;
  background: rgba(0,0,0,.45); border: 2px solid #ffd23a; border-radius: 7px;
  padding: 5px 9px;
}
.mp-elo-num { font-family: 'Press Start 2P'; font-size: 14px; color: #fff8e8; }
.mp-elo-num span { font-size: 9px; color: #cbb699; }
.mp-record-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.mp-stat-pill {
  font-family: 'Press Start 2P'; font-size: 8px; padding: 4px 7px;
  border-radius: 5px; background: rgba(0,0,0,.4); border: 1px solid #4a3321; color: #e8d7bd;
}
.mp-stat-pill.win { color: #8fe87b; border-color: #3f7a38; }
.mp-stat-pill.loss { color: #ff9d8a; border-color: #7a3830; }
.mp-stat-pill.rate { color: #ffd866; border-color: #7a6228; }

.mp-elo-bar-wrap { display: flex; align-items: center; gap: 10px; width: 100%; }
.mp-elo-bar {
  flex: 1; height: 9px; background: #120b06; border: 2px solid #4a3321;
  border-radius: 6px; overflow: hidden;
}
.mp-elo-fill { height: 100%; transition: width .35s ease-out; }
.mp-elo-next { font-size: 16px; color: #d6c3a5; white-space: nowrap; }

/* 3-Schritte-Regel-Leiste */
.mp-rules-strip {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 6px; background: rgba(18, 11, 6, .9); border: 2px solid #593e28;
  border-radius: 10px; padding: 7px 12px;
}
.mpr-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  background: rgba(38, 25, 15, .8); border: 1px solid #6b4930; border-radius: 7px;
  padding: 5px 8px;
}
.mpr-step.duel { border-color: #d95238; background: rgba(62, 22, 18, .85); }
.mpr-step.hearts { border-color: #75d471; background: rgba(24, 46, 24, .85); }
.mpr-step span { font-family: 'Press Start 2P'; font-size: 8px; color: #ffd866; margin-bottom: 2px; }
.mpr-step b { font-size: 16px; color: #f6eedc; }
.mpr-arrow { font-size: 18px; color: #b5834c; }

/* Liga-Stufen-Leiter */
.rtiers-ladder {
  width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.rtier-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(18, 12, 7, .85); border: 2px solid #3d291a; border-radius: 8px;
  padding: 5px 6px; opacity: .58; text-align: left;
}
.rtier-badge.reached { opacity: .88; border-color: #6b4930; }
.rtier-badge.cur {
  opacity: 1; border-color: var(--tcol, #ffd23a);
  background: rgba(255, 210, 58, .14);
  box-shadow: inset 0 0 0 1px var(--tcol, #ffd23a), 0 3px 8px rgba(0,0,0,.45);
}
.rt-ic { font-size: 19px; flex: none; }
.rt-txt { display: flex; flex-direction: column; overflow: hidden; }
.rt-txt b { font-family: 'Press Start 2P'; font-size: 7px; color: var(--tcol, #ffd866); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-txt span { font-size: 14px; color: #cbb699; line-height: 14px; }

/* Die 2 Modus-Karten (Ranked Matchmaking vs. Freundes-Duell) */
.mp-box.matchmaking-card {
  border-color: #4d9e4a;
  background: linear-gradient(180deg, rgba(24, 44, 24, .94) 0%, rgba(15, 26, 15, .96) 100%);
  box-shadow: inset 0 0 0 2px rgba(117, 212, 113, .25);
  justify-content: space-between;
}
.mp-box.friend-card {
  border-color: #4a7db8;
  background: linear-gradient(180deg, rgba(22, 34, 52, .94) 0%, rgba(14, 21, 34, .96) 100%);
  box-shadow: inset 0 0 0 2px rgba(94, 164, 235, .22);
  justify-content: space-between;
}
.mp-box-badge {
  font-family: 'Press Start 2P'; font-size: 8px; color: #140a00;
  background: #75d471; padding: 3px 8px; border-radius: 5px; border: 2px solid #140c06;
}
.mp-box-badge.friend { background: #6bb5ff; }
.mp-find-btn { width: 100%; }
.mp-p2p-grid { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mp-host-btn { width: 100%; }
.mp-join-row { display: flex; gap: 6px; width: 100%; }
.mp-join-row #mpCodeInput { flex: 1; width: auto !important; text-align: center; font-family: 'Press Start 2P'; font-size: 11px; }

body.is-portrait .mp-hero-card { grid-template-columns: 1fr; text-align: center; }
body.is-portrait .mp-name-row, body.is-portrait .mp-elo-row { justify-content: center; }
body.is-portrait .mp-record-pills { margin-left: 0; justify-content: center; }
body.is-portrait .mp-rules-strip { flex-direction: column; }
body.is-portrait .mpr-arrow { display: none; }
body.is-portrait .rtiers-ladder { grid-template-columns: repeat(2, 1fr); }

/* Talisman-Sortierung (Drag & Drop + ◀/▶ Pfeile) */
.tal-sort-hint {
  font-family: 'VT323', monospace; font-size: 16px; color: #cbb699;
  margin-left: 6px; font-weight: normal;
}
.card.talisman[draggable="true"] {
  cursor: grab;
}
.card.talisman[draggable="true"]:active {
  cursor: grabbing;
}
.card.talisman.dragging {
  opacity: .45; transform: scale(.94);
}
.card.talisman.drag-over {
  outline: 3px solid #75d471;
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 0 18px rgba(117, 212, 113, .9);
}
.tal-mv {
  position: absolute; top: 3px; z-index: 6;
  width: 20px; height: 20px; padding: 0;
  font-family: 'Press Start 2P'; font-size: 8px; line-height: 16px;
  color: #fff8e8; background: rgba(24, 15, 9, .88);
  border: 2px solid #8a5e3b; border-radius: 5px;
  cursor: pointer; opacity: 0; transition: opacity .12s, background .12s, transform .1s;
}
.tal-mv.left  { left: 3px; }
.tal-mv.right { right: 3px; }
.card.talisman:hover .tal-mv,
body.is-mobile .tal-mv,
body.is-portrait .tal-mv {
  opacity: 1;
}
.tal-mv:hover {
  background: #d9822b; border-color: #ffd23a; transform: scale(1.12);
}







