/* ==========================================================================
   max-game-table – Tischspiele im Stil „Tiefenschiefer & Erz“: Endertisch (Roulette), Blackjack, Enderauge (Dice).
   Lädt nach max-games.css. Alles unter body.tc-redesign.tc-max #gameOverlay .theme-<id>.
   JS-Verträge: Inline-transform/transition auf #wheel/#ball und left/width auf #diceFill/#diceMarker/.dice-hit
   gehören app.js – hier nur translate/scale/rotate-Einzeleigenschaften auf Kindern oder eigene Elemente.
   Effekt-Hooks aus js/max-game-table.js: #gameBoard[data-mxt-fx=win|big|loss|push], .card.mxt-deal/.mxt-flip,
   .hand-label b.mxt-bump, .dice-roll.mxt-rolling/.mxt-landed, .dice-hit.mxt-fly, .mxt-bits (Splitter).
   ========================================================================== */

/* ------------------------------------------------------------ 0. Gemeinsam: Splitter */
body.tc-redesign.tc-max #gameOverlay .mxt-bits {
  position: absolute;
  z-index: 6;
  width: 0;
  height: 0;
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .mxt-bits > i {
  position: absolute;
  left: calc(var(--s) / -2);
  top: calc(var(--s) / -2);
  width: var(--s);
  height: var(--s);
  border-radius: 1px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c), inset -1px -1px 0 rgba(0, 0, 0, .25);
  opacity: 0;
}

/* ------------------------------------------------------------ 1. Endertisch (Roulette) */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette {
  position: relative;
  background:
    radial-gradient(60% 80% at 22% 50%, rgba(181, 140, 255, .16), transparent 70%),
    radial-gradient(circle at 20% 30%, rgba(227, 204, 255, .07) 0 1px, transparent 1.5px) 0 0 / 23px 23px,
    radial-gradient(circle at 70% 60%, rgba(181, 140, 255, .08) 0 1px, transparent 1.5px) 0 0 / 31px 31px,
    linear-gradient(180deg, #1a1430, #110c22) !important;
  box-shadow:
    inset 0 0 0 1px rgba(233, 229, 178, .14),
    inset 0 0 0 6px #120d22,
    inset 0 0 0 7px rgba(181, 140, 255, .22),
    inset 0 -3px 0 7px rgba(0, 0, 0, .25),
    0 0 0 1px #2c2150,
    0 8px 0 #0a0716,
    0 34px 60px -24px rgba(0, 0, 0, .95) !important;
}
/* Rad: größer, Obsidianrand mit Endstein-Kante */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-wrap {
  width: clamp(220px, 23vw, 318px) !important;
  height: clamp(220px, 23vw, 318px) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel {
  background: #0b0716 !important;
  border: 0 !important;
  box-shadow:
    0 0 0 5px #1a1230,
    0 0 0 7px rgba(233, 205, 120, .55),
    0 0 0 14px #120c22,
    0 0 0 15px rgba(181, 140, 255, .35),
    0 22px 36px rgba(0, 0, 0, .75),
    0 0 70px rgba(181, 140, 255, .18) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedge { transition: opacity .35s ease, fill .35s ease; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedge.rot { fill: #c42f3c; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedge.schwarz { fill: #19132c; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedge.gruen { fill: #11a36a; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-stud { fill: #ffd46b; stroke: #7a5310; stroke-width: .6; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-spoke { fill: rgba(233, 205, 120, .55); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .pocket-num { fill: #fff; font-size: 13px; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 1.5px; }
/* Nach dem Wurf: Gewinnfach leuchtet, der Rest tritt zurück */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedges:has(.hit) .wedge:not(.hit) { opacity: .5; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wedge.hit {
  stroke: #ffe08a;
  stroke-width: 2.5px;
  filter: brightness(1.25) !important;
}
/* Nabe: Enderauge (Iris + Pupille) mit Goldfassung */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-hub {
  width: 22% !important;
  height: 22% !important;
  margin: -11% !important;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .55) 0 7%, transparent 9%),
    radial-gradient(circle, #06110f 0 17%, #1f9c8c 19% 40%, #7be0c9 42% 47%, #25705f 49% 66%, #0f2a26 70%) !important;
  border: 3px solid #e9cd78 !important;
  box-shadow: 0 0 0 2px #3a2a0a, 0 0 24px rgba(46, 229, 196, .45), inset 0 -4px 0 rgba(0, 0, 0, .35) !important;
}
/* Kugel: Perle mit Glanz; fällt kurz vor Schluss von der Laufbahn ins Fach (Winkel bleibt JS) */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .ball > i {
  width: 11px !important;
  height: 11px !important;
  margin-left: -5.5px !important;
  background: radial-gradient(circle at 35% 30%, #fff 0 25%, #dfe6f5 55%, #8e9ab4) !important;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .65), 0 0 10px rgba(255, 255, 255, .55) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .ball.settled > i { top: calc(21% - 5.5px) !important; }
/* Lichtkranz, nur solange die Kugel läuft (#wheel hat dann den Inline-Übergang, die Kugel noch kein .settled) */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .mxt-wheel-light {
  position: absolute;
  inset: -26px;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(227, 204, 255, .15) 62%, rgba(227, 204, 255, .9) 74%, rgba(46, 229, 196, .7) 78%, transparent 80%);
  -webkit-mask: radial-gradient(closest-side, transparent 89%, #000 92%, #000 98%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 89%, #000 92%, #000 98%, transparent 100%);
  filter: drop-shadow(0 0 6px rgba(181, 140, 255, .8));
  opacity: 0;
  transition: opacity .3s ease;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-wrap > .wheel { z-index: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-wrap > .ball { z-index: 2; }
/* Drehung über die Klasse .is-spinning (app.js renderRoulette), nicht [style*=…] in :has() – das kostete bei jeder Inline-Stiländerung Neuberechnung. */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-wrap:has(#wheel.is-spinning):has(.ball:not(.settled)) .mxt-wheel-light { opacity: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette:has(#wheel.is-spinning):has(.ball:not(.settled)) .bets { opacity: .72; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .bets { transition: opacity .3s ease !important; }

/* Ergebnis: Medaillon mit Beschriftung; vor dem Wurf gedimmter Platzhalter statt Lücke */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result {
  position: relative;
  display: grid !important;
  justify-items: center;
  gap: 4px;
  min-width: 118px;
  margin-top: 10px;
  padding: 9px 20px 10px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #221a3c, #150f28) !important;
  box-shadow: inset 0 0 0 1px rgba(233, 205, 120, .35), inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 0 #0a0716, 0 14px 24px -10px rgba(0, 0, 0, .8) !important;
  visibility: visible !important;
  opacity: .55;
  transition: opacity .25s ease, box-shadow .25s ease !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result::before {
  content: "Ergebnis";
  color: var(--mx-text-2);
  font: 700 11px/1 var(--mx-font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result.shown { opacity: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result b {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 52px;
  padding: 0 10px;
  border-radius: 12px;
  font: 800 36px/1 var(--mx-font-display) !important;
  color: var(--mx-text-2) !important;
  -webkit-text-fill-color: currentColor;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result b.rot { background: linear-gradient(180deg, #d9434f, #a8222f); color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 0 #5e1420, 0 0 22px rgba(255, 77, 94, .4); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result b.schwarz { background: linear-gradient(180deg, #2a2242, #140f26); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(181, 140, 255, .35), 0 3px 0 #07050e, 0 0 22px rgba(181, 140, 255, .3); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result b.gruen { background: linear-gradient(180deg, #2ee59d, #0e9e66); color: var(--mx-emerald-ink) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #06462d, 0 0 22px rgba(46, 229, 157, .45); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette #gameBoard[data-mxt-fx="win"] .roulette-result,
body.tc-redesign.tc-max #gameOverlay .theme-roulette #gameBoard[data-mxt-fx="big"] .roulette-result {
  box-shadow: inset 0 0 0 2px var(--mx-gold), 0 4px 0 #0a0716, 0 0 30px rgba(255, 201, 60, .35) !important;
}

/* Wetttafel: Endstein-Kante, Fächer als Blöcke (Redstone, Obsidian, Smaragd), gewählte Wette mit Goldjeton */
body.tc-redesign.tc-max #gameOverlay .theme-roulette .bets {
  border: 0 !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(181, 140, 255, .06) 0 1px, transparent 1.5px) 0 0 / 19px 19px,
    linear-gradient(180deg, rgba(10, 7, 22, .78), rgba(16, 11, 32, .85)) !important;
  box-shadow: inset 0 0 0 1px rgba(233, 229, 178, .16), inset 0 2px 10px rgba(0, 0, 0, .5) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette :is(.bet-chip, .num) { position: relative; overflow: visible !important; }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .bet-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .mxt-gem {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  rotate: 45deg;
  flex: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .mxt-gem.rot { background: linear-gradient(135deg, #ff7a86, #c42f3c); box-shadow: 0 0 8px rgba(255, 77, 94, .6); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .mxt-gem.schwarz { background: linear-gradient(135deg, #5a4a86, #19132c); box-shadow: inset 0 0 0 1px rgba(181, 140, 255, .6); }
body.tc-redesign.tc-max #gameOverlay .theme-roulette .num.rot {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .08) 25%, transparent 25% 50%, rgba(255, 255, 255, .08) 50% 75%, transparent 75%) 0 0 / 8px 8px,
    linear-gradient(180deg, #d9434f, #ac2634) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .num.schwarz {
  background:
    radial-gradient(circle at 30% 30%, rgba(181, 140, 255, .28) 0 1px, transparent 1.6px) 0 0 / 9px 9px,
    linear-gradient(180deg, #241c3c, #150f27) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-roulette .bet-chip:not(.on) { background: linear-gradient(180deg, #2a2344, #1c1631) !important; }
/* Jeton auf der gewählten Wette */
body.tc-redesign.tc-max #gameOverlay .theme-roulette :is(.bet-chip, .num).on::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffe08a 0 32%, transparent 34%),
    repeating-conic-gradient(#ffc93c 0 30deg, #fff4c7 30deg 45deg) !important;
  box-shadow: 0 0 0 2px #7a5310, 0 3px 0 #3a2a0a, 0 0 12px rgba(255, 201, 60, .6);
  pointer-events: none;
}

/* ------------------------------------------------------------ 2. Blackjack */
/* Filz mit Eichenholz-Rand und Goldlinie; feines Pixelraster als Stoff */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .felt {
  position: relative !important;
  border: 14px solid transparent !important;
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(255, 255, 255, .08), transparent 60%) padding-box,
    repeating-conic-gradient(rgba(255, 255, 255, .022) 0 25%, transparent 0 50%) 0 0 / 6px 6px padding-box,
    radial-gradient(ellipse at center, #147152 0%, #0d4a39 62%, #082f24 100%) padding-box,
    linear-gradient(180deg, #7a5230, #4a2f19 45%, #2e1c0e) border-box !important;
  outline: 2px solid rgba(255, 201, 60, .5) !important;
  outline-offset: -8px;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), inset 0 0 80px rgba(0, 0, 0, .5), 0 10px 0 #1a0f06, 0 40px 70px -24px rgba(0, 0, 0, .95) !important;
}
/* Aufdruck: Bogenlinie unter dem Geber */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .felt::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(68%, 520px);
  height: 120px;
  translate: -50% -50%;
  border: 2px solid rgba(255, 224, 138, .16);
  border-top-color: transparent;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .hand-block { position: relative; z-index: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .hand { position: relative; perspective: 900px; }
/* Kartenschuh oben rechts: Herkunft der Austeil-Animation */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-shoe {
  position: absolute;
  top: 22px;
  right: 34px;
  z-index: 0;
  width: 70px;
  height: 58px;
  border-radius: 8px 8px 10px 10px;
  background: linear-gradient(180deg, #5a3b20, #3a2512);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), inset 0 3px 0 rgba(255, 255, 255, .08), 0 4px 0 #1a0f06, 0 12px 18px -6px rgba(0, 0, 0, .7);
  rotate: -6deg;
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-shoe > i {
  position: absolute;
  left: 10px;
  right: 10px;
  top: -14px;
  height: 40px;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, rgba(255, 201, 60, .2) 0 3px, transparent 3px 8px), linear-gradient(180deg, #1d2a4a, #121b33);
  box-shadow: inset 0 0 0 3px #121b33, inset 0 0 0 4px rgba(255, 201, 60, .45);
}
/* Karten: Papier mit Eckindex oben links und gespiegelt unten rechts, Edelstein in der Mitte */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fffdf5, #efe9d6) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), inset 0 0 0 4px #fffdf5, inset 0 0 0 5px rgba(160, 140, 90, .28), 0 3px 0 #b9b3a0, 0 14px 20px -8px rgba(0, 0, 0, .7) !important;
  animation-name: none !important;
  transition: translate .18s var(--mx-ease), box-shadow .18s var(--mx-ease);
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-suit="diamant"] { --suit: #0891b2; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-suit="smaragd"] { --suit: #0e8a57; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-suit="redstone"] { --suit: #c42f3c; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-suit="kohle"] { --suit: #c9b6ff; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-label] { display: grid !important; place-items: center !important; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-label] > b {
  position: absolute !important;
  left: 9px;
  top: 7px;
  margin: 0 !important;
  color: var(--suit) !important;
  font-size: 23px !important;
  line-height: 1 !important;
  filter: none !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-label] > svg {
  position: static !important;
  width: 46% !important;
  height: auto !important;
  margin: 0 !important;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-label]::before {
  content: attr(data-label);
  position: absolute;
  right: 8px;
  bottom: 6px;
  rotate: 180deg;
  color: var(--suit);
  font: 800 15px/1 var(--mx-font-display);
  opacity: .8;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card.dark {
  background: linear-gradient(180deg, #2c3350, #1a2034) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 0 0 4px #262d48, inset 0 0 0 5px rgba(201, 182, 255, .3), 0 3px 0 #0b0f1a, 0 14px 20px -8px rgba(0, 0, 0, .7) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card.dark > svg { filter: drop-shadow(0 0 6px rgba(168, 85, 247, .6)) !important; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-player .card:not(.back):hover { translate: 0 -5px; }
/* Rückseiten-Schicht für das Umdrehen beim Austeilen (nur während der Animation sichtbar) */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .card[data-label]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(45deg, rgba(255, 201, 60, .16) 0 4px, transparent 4px 10px),
    linear-gradient(180deg, #1d2a4a, #121b33);
  box-shadow: inset 0 0 0 4px #121b33, inset 0 0 0 5.5px rgba(255, 201, 60, .5);
  opacity: 0;
  pointer-events: none;
}
/* Wert-Plaketten und Hinweise */
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .hand-label .tag.mxt-bj { background: linear-gradient(180deg, var(--mx-gold-hi), var(--mx-gold)); color: var(--mx-gold-ink); }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .hand-label .tag.mxt-bust { background: rgba(255, 77, 94, .2); color: #ff9aa4; }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-player:has(.mxt-bust) .card { filter: saturate(.55) brightness(.85); }
body.tc-redesign.tc-max #gameOverlay .theme-blackjack .felt-hint {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(3, 20, 15, .45);
  color: rgba(207, 233, 220, .85) !important;
}

/* ------------------------------------------------------------ 3. Enderauge (Dice) */
/* Anzeige als Endportal: Sternenfeld, Rahmen aus Endstein-Akzenten */
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-readout {
  position: relative;
  background:
    radial-gradient(circle at 22% 30%, rgba(46, 229, 196, .5) 0 1px, transparent 1.6px) 0 0 / 37px 37px,
    radial-gradient(circle at 70% 60%, rgba(227, 204, 255, .45) 0 1px, transparent 1.6px) 0 0 / 29px 29px,
    repeating-conic-gradient(rgba(181, 140, 255, .1) 0 1deg, transparent 1deg 10deg),
    radial-gradient(#1c3a3a 0%, #1d1840 45%, #0b0d1f 72%) !important;
  box-shadow: inset 0 0 0 10px #0d1226, inset 0 0 0 11px rgba(233, 229, 178, .22), inset 0 0 30px rgba(46, 229, 196, .12), 0 0 40px rgba(181, 140, 255, .16) !important;
  transition: box-shadow .3s ease !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-roll.mxt-rolling {
  color: #e8e1ff !important;
  text-shadow: 0 0 18px rgba(181, 140, 255, .7), 0 4px 0 rgba(0, 0, 0, .5) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #gameBoard[data-mxt-fx="win"] .dice-readout,
body.tc-redesign.tc-max #gameOverlay .theme-dice #gameBoard[data-mxt-fx="big"] .dice-readout {
  box-shadow: inset 0 0 0 10px #0d1226, inset 0 0 0 12px rgba(46, 229, 157, .7), inset 0 0 40px rgba(46, 229, 157, .25), 0 0 50px rgba(46, 229, 157, .3) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #gameBoard[data-mxt-fx="loss"] .dice-readout {
  box-shadow: inset 0 0 0 10px #0d1226, inset 0 0 0 12px rgba(255, 77, 94, .55), inset 0 0 36px rgba(255, 77, 94, .18), 0 0 40px rgba(255, 77, 94, .18) !important;
}
/* Balken: Redstone-Zone, Smaragd-Zone, Zehnerteilung; Perle ragt heraus */
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-bar {
  overflow: visible !important;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .35) calc(10% - 1px) 10%),
    linear-gradient(180deg, #b8323f, #7c1d29) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-fill {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .12) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, #4ff0b1, #14b477) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-marker {
  width: 8px !important;
  margin-left: -4px;
  top: -8px !important;
  bottom: -4px !important;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffe08a, #ffc93c 50%, #c7860c) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-hit {
  top: 50% !important;
  bottom: auto !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  box-shadow: none !important;
  z-index: 3;
}
/* Enderperle am Treffer */
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-hit > i {
  position: absolute;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #e6fff9 0 12%, #2ee5c4 32%, #0f6b5f 64%, #062521 100%);
  box-shadow: 0 0 0 2px #0b1020, 0 0 16px rgba(46, 229, 196, .75), 0 4px 6px rgba(0, 0, 0, .5);
}
body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-hit > i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: #062521;
  box-shadow: 0 0 0 2px rgba(46, 229, 196, .5);
}
/* Regler: Goldbarren-Griff, Spur in Amethyst */
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceTarget {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2248, #3a2f5f) !important;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .5), 0 0 0 1px rgba(181, 140, 255, .25);
  cursor: pointer;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceTarget::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe08a, #ffc93c 55%, #c7860c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #6b4a0c, 0 0 14px rgba(255, 201, 60, .45);
  transition: scale .14s var(--mx-ease);
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceTarget::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe08a, #ffc93c 55%, #c7860c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #6b4a0c, 0 0 14px rgba(255, 201, 60, .45);
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceTarget:hover::-webkit-slider-thumb { scale: 1.12; }
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceTarget:active::-webkit-slider-thumb { scale: .96; }
/* Richtung: Pfeil zeigt Über/Unter */
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceOver {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-width: 98px;
  justify-content: center;
  transition: translate var(--mx-fast) var(--mx-ease), filter var(--mx-fast) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceOver::before { content: "▼"; color: var(--mx-amethyst); font-size: 11px; }
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceOver[data-over="1"]::before { content: "▲"; }
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceOver:hover { filter: brightness(1.15); translate: 0 -1px; }
body.tc-redesign.tc-max #gameOverlay .theme-dice #diceOver:active { translate: 0 2px; }

/* ------------------------------------------------------------ 4. Mobil */
@media (max-width: 820px) {
  body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-shoe { top: 18px; right: 30px; width: 42px; height: 34px; }
  body.tc-redesign.tc-max #gameOverlay .theme-blackjack .mxt-shoe > i { top: -8px; height: 24px; left: 6px; right: 6px; }
  body.tc-redesign.tc-max #gameOverlay .theme-blackjack .felt::before { display: none; }
}
@media (max-width: 600px) {
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-wrap { width: 140px !important; height: 140px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .wheel-hub { width: 24% !important; height: 24% !important; margin: -12% !important; border-width: 2px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .ball > i { width: 8px !important; height: 8px !important; margin-left: -4px !important; top: 5px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .ball.settled > i { top: calc(21% - 4px) !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result { margin-top: 0; min-width: 96px; padding: 7px 14px 8px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .roulette-result b { height: 44px; min-width: 50px; font-size: 30px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-roulette .pocket-num { font-size: 14px; }
  body.tc-redesign.tc-max #gameOverlay .theme-dice .dice-hit > i { left: -11px; top: -11px; width: 22px; height: 22px; }
}

/* ------------------------------------------------------------ 5. Bewegung (nur ohne reduzierte Bewegung) */
@keyframes mxtBit {
  0% { opacity: 1; translate: 0 0; rotate: 0deg; scale: .4; }
  55% { opacity: 1; translate: var(--dx) var(--dy); rotate: calc(var(--rot) * .6); scale: 1; }
  100% { opacity: 0; translate: calc(var(--dx) * 1.1) calc(var(--dy) + 60px); rotate: var(--rot); scale: .7; }
}
@keyframes mxtSweep { to { rotate: 360deg; } }
@keyframes mxtBallDrop { 0% { scale: 1; } 55% { scale: 1.35; } 80% { scale: .85; } 100% { scale: 1; } }
@keyframes mxtPocketPulse { 0%, 100% { stroke-opacity: 1; stroke-width: 2.5px; } 50% { stroke-opacity: .45; stroke-width: 4px; } }
@keyframes mxtMedalPop { 0% { scale: .6; opacity: 0; } 60% { scale: 1.14; opacity: 1; } 100% { scale: 1; opacity: 1; } }
@keyframes mxtRing { 0% { opacity: .9; scale: .7; } 100% { opacity: 0; scale: 1.6; } }
@keyframes mxtNope { 0%, 100% { translate: 0 0; } 25% { translate: -5px 0; } 60% { translate: 4px 0; } 85% { translate: -2px 0; } }
@keyframes mxtChipDrop { 0% { translate: 0 -16px; scale: 1.3; opacity: 0; } 60% { translate: 0 2px; scale: .95; opacity: 1; } 100% { translate: 0 0; scale: 1; opacity: 1; } }
@keyframes mxtDeal {
  0% { opacity: 0; translate: var(--mxt-fx, 180px) var(--mxt-fy, -140px); rotate: -16deg; scale: .72; }
  12% { opacity: 1; }
  62% { translate: 0 0; rotate: 1deg; scale: 1.03; }
  100% { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
}
@keyframes mxtDealFlip {
  0% { opacity: 0; translate: var(--mxt-fx, 180px) var(--mxt-fy, -140px); rotate: -16deg; scale: .72 .72; }
  12% { opacity: 1; }
  50% { translate: 0 0; rotate: 0deg; scale: 1 1; }
  62% { scale: .04 1.03; }
  78% { scale: 1.05 1.02; }
  100% { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1 1; }
}
@keyframes mxtBackHide { 0%, 61% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes mxtFlip { 0% { scale: 1 1; translate: 0 0; } 45% { scale: .04 1.04; translate: 0 -8px; } 75% { scale: 1.05 1.02; translate: 0 -3px; } 100% { scale: 1 1; translate: 0 0; } }
@keyframes mxtFlipBack { 0%, 44% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes mxtBump { 0% { scale: 1; } 40% { scale: 1.28; } 100% { scale: 1; } }
@keyframes mxtHandWin {
  0% { translate: 0 0; filter: drop-shadow(0 0 0 rgba(46, 229, 157, 0)); }
  30% { translate: 0 -10px; filter: drop-shadow(0 0 16px rgba(46, 229, 157, .85)); }
  70% { translate: 0 -6px; filter: drop-shadow(0 0 12px rgba(46, 229, 157, .6)); }
  100% { translate: 0 0; filter: drop-shadow(0 0 0 rgba(46, 229, 157, 0)); }
}
@keyframes mxtHandBig {
  0% { translate: 0 0; filter: drop-shadow(0 0 0 rgba(255, 201, 60, 0)); }
  30% { translate: 0 -12px; filter: drop-shadow(0 0 20px rgba(255, 201, 60, .9)); }
  70% { translate: 0 -7px; filter: drop-shadow(0 0 14px rgba(255, 201, 60, .6)); }
  100% { translate: 0 0; filter: drop-shadow(0 0 0 rgba(255, 201, 60, 0)); }
}
@keyframes mxtHandLoss { 0% { translate: 0 0; filter: none; } 35% { translate: 0 7px; filter: saturate(.4) brightness(.75); } 100% { translate: 0 0; filter: none; } }
@keyframes mxtLabelRed { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } 40% { box-shadow: 0 0 0 3px rgba(255, 77, 94, .55), 0 0 18px rgba(255, 77, 94, .5); } }
@keyframes mxtLabelSilver { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 230, 255, 0); } 40% { box-shadow: 0 0 0 3px rgba(220, 230, 255, .45); } }
@keyframes mxtPearlFly { from { translate: var(--mxt-dx, 0) 0; } to { translate: 0 0; } }
@keyframes mxtPearlArc { 0% { translate: 0 0; scale: .8; } 45% { translate: 0 -24px; scale: 1.15; } 80% { translate: 0 2px; scale: .95; } 100% { translate: 0 0; scale: 1; } }
@keyframes mxtLand { 0% { scale: 1.2; } 50% { scale: .94; } 100% { scale: 1; } }
@keyframes mxtPortalGlow { 0%, 100% { filter: none; } 50% { filter: brightness(1.35) saturate(1.3); } }

@media all {
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .mxt-bits > i {
    animation-name: mxtBit;
    animation-duration: .95s;
    animation-delay: var(--d, 0ms);
    animation-timing-function: cubic-bezier(.2, .8, .3, 1);
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }

  /* Endertisch */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette .wheel-wrap:has(#wheel.is-spinning):has(.ball:not(.settled)) .mxt-wheel-light {
    animation-name: mxtSweep;
    animation-duration: .9s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette .ball > i {
    transition-property: top;
    transition-duration: .38s;
    transition-timing-function: cubic-bezier(.55, 0, .85, .45);
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette .ball.settled > i {
    animation-name: mxtBallDrop;
    animation-duration: .42s;
    animation-delay: .34s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette #gameBoard:is([data-mxt-fx="win"], [data-mxt-fx="big"]) .wedge.hit {
    animation-name: mxtPocketPulse;
    animation-duration: .6s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 3;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette .roulette-result.shown > b {
    animation-name: mxtMedalPop;
    animation-duration: .42s;
    animation-timing-function: var(--mx-ease-spring);
    animation-iteration-count: 1;
    animation-fill-mode: both;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette #gameBoard:is([data-mxt-fx="win"], [data-mxt-fx="big"]) .roulette-result::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    border: 2px solid var(--mx-gold);
    pointer-events: none;
    animation-name: mxtRing;
    animation-duration: .8s;
    animation-timing-function: ease-out;
    animation-iteration-count: 2;
    animation-fill-mode: both;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette #gameBoard[data-mxt-fx="loss"] .roulette-result {
    animation-name: mxtNope;
    animation-duration: .36s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-roulette :is(.bet-chip, .num).on::after {
    animation-name: mxtChipDrop;
    animation-duration: .32s;
    animation-timing-function: var(--mx-ease);
    animation-iteration-count: 1;
    animation-fill-mode: both;
  }

  /* Blackjack: Austeilen aus dem Schuh, Lochkarte umdrehen, Wert hüpft */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .card.mxt-deal {
    animation-name: mxtDeal !important;
    animation-duration: .5s !important;
    animation-delay: var(--mxt-delay, 0ms) !important;
    animation-timing-function: cubic-bezier(.2, .7, .25, 1) !important;
    animation-fill-mode: both !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .card.mxt-deal[data-label] { animation-name: mxtDealFlip !important; animation-duration: .6s !important; }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .card.mxt-deal[data-label]::after {
    animation-name: mxtBackHide;
    animation-duration: .6s;
    animation-delay: var(--mxt-delay, 0ms);
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .card.mxt-flip {
    animation-name: mxtFlip !important;
    animation-duration: .46s !important;
    animation-delay: 0ms !important;
    animation-timing-function: ease-in-out !important;
    animation-fill-mode: both !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .card.mxt-flip::after {
    animation-name: mxtFlipBack;
    animation-duration: .46s;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack .hand-label b.mxt-bump {
    animation-name: mxtBump;
    animation-duration: .36s;
    animation-delay: .18s;
    animation-timing-function: var(--mx-ease-spring);
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="win"] .mxt-player .hand,
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="big"] .mxt-player .hand {
    animation-name: mxtHandWin;
    animation-duration: 1.3s;
    animation-delay: .35s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="big"] .mxt-player .hand { animation-name: mxtHandBig; }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="loss"] .mxt-player .hand {
    animation-name: mxtHandLoss;
    animation-duration: .6s;
    animation-delay: .3s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="loss"] .mxt-player:has(.mxt-bust) .hand { animation-name: mxtNope; animation-duration: .4s; animation-delay: .1s; }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="loss"] .mxt-dealer .hand-label b {
    animation-name: mxtLabelRed;
    animation-duration: .8s;
    animation-delay: .3s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-blackjack #gameBoard[data-mxt-fx="push"] .hand-label b {
    animation-name: mxtLabelSilver;
    animation-duration: .8s;
    animation-delay: .3s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }

  /* Enderauge: Perle fliegt vom Zielwert zum Treffer, Zahl rollt aus und landet */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-dice .dice-hit.mxt-fly {
    animation-name: mxtPearlFly;
    animation-duration: .52s;
    animation-timing-function: cubic-bezier(.2, .8, .2, 1);
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-dice .dice-hit.mxt-fly > i {
    animation-name: mxtPearlArc;
    animation-duration: .52s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-dice .dice-roll.mxt-landed {
    animation-name: mxtLand !important;
    animation-duration: .34s !important;
    animation-timing-function: var(--mx-ease-spring) !important;
    animation-fill-mode: both !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-dice .dice-readout:has(.mxt-rolling) {
    animation-name: mxtPortalGlow;
    animation-duration: .52s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-dice #gameBoard[data-mxt-fx="loss"] .dice-readout {
    animation-name: mxtNope;
    animation-duration: .36s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
}
