/* ==========================================================================
   max-game-risk – Spieltisch-Design für Erzader (mines), Gerüstturm (tower), Hühnerpfad (chicken).
   Lädt nach max-games.css und schärft dessen Grundlage (gleiche Anker + #gameBoard = höhere Spezifität).
   Neue Momente kommen aus js/max-game-risk.js (Klassen mxr-*), dauerhafte Zustände nur aus den
   Klassen/Attributen der Renderer (app.js). Keine Laufzeit hängt an JS-Timern dieser Spiele.
   Verträge: .runner-transform gehört moveChicken, .tile.open / .slot tragen transform !important
   aus max-games.css – bewegt wird deshalb mit translate/scale/rotate.
   ========================================================================== */

/* ------------------------------------------------------------ 0. Erzfarben (data-ore aus renderMines) */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile { --ore: #5be7f0; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="kohle"] { --ore: #aab3c6; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="eisen"] { --ore: #efcfae; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="kupfer"] { --ore: #f39062; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="gold"] { --ore: #ffc93c; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="redstone"] { --ore: #ff4d5e; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="lapis"] { --ore: #6f8fff; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="diamant"] { --ore: #5be7f0; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="smaragd"] { --ore: #2ee59d; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile[data-ore="lava"] { --ore: #ff7a2e; }

/* ------------------------------------------------------------ 1. Erzader – Stollenwand mit Laternenlicht */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(80% 42% at 50% -6%, rgba(255, 190, 90, .16), transparent 70%),
    radial-gradient(60% 40% at 50% 108%, rgba(91, 231, 240, .10), transparent 70%),
    linear-gradient(180deg, rgba(10, 16, 32, .55), rgba(10, 16, 32, .85)),
    var(--tex-deepslate) center / 64px 64px !important;
  box-shadow:
    inset 0 0 0 1px rgba(91, 231, 240, .16),
    inset 0 2px 0 rgba(255, 255, 255, .06),
    inset 0 -3px 0 rgba(0, 0, 0, .45),
    inset 0 0 40px rgba(0, 0, 0, .55),
    0 0 0 1px #2b3a60, 0 8px 0 #090e1b, 0 34px 60px -24px rgba(0, 0, 0, .95) !important;
  transition: box-shadow .4s ease !important;
}
/* Lava getroffen: Glut steigt von unten in den Stollen */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid:has(.tile.boom) {
  background:
    radial-gradient(90% 55% at 50% 112%, rgba(255, 90, 40, .28), transparent 70%),
    linear-gradient(180deg, rgba(16, 10, 18, .6), rgba(20, 8, 12, .88)),
    var(--tex-deepslate) center / 64px 64px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 77, 94, .35), inset 0 -3px 0 rgba(0, 0, 0, .45), inset 0 0 40px rgba(0, 0, 0, .55), 0 0 0 1px #4a2030, 0 8px 0 #090e1b, 0 34px 60px -24px rgba(0, 0, 0, .95) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid.mxr-won,
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid:not(:has(.tile.boom)):has(.tile.open:not([data-dug])) {
  box-shadow: inset 0 0 0 1px rgba(255, 201, 60, .4), inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -3px 0 rgba(0, 0, 0, .45), inset 0 0 40px rgba(0, 0, 0, .5), 0 0 0 1px #5a4a1c, 0 8px 0 #090e1b, 0 0 60px -10px rgba(255, 201, 60, .25) !important;
}

/* Stein: gewölbter Tiefenschiefer, keine Wiederholungs-Animation aus älteren Schichten */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile {
  overflow: visible;
  animation-name: none !important;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 255, 255, .13), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, .06), transparent 42%, rgba(0, 0, 0, .26)),
    var(--tex-deepslate) center / 100% 100% !important;
}
/* Riss beim Zielen (Minecraft-Abbaustufe), schon vor dem Klick sichtbar */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile::before {
  content: "";
  position: absolute;
  inset: 12%;
  pointer-events: none;
  opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23060912' fill-opacity='.72' d='M7 2h1v3h1v2h3v1h2v1h-2V8H9v1H8v3H7v2H6v-2h1V9H5v1H3v1H2v-1h1V9h2V8h2V5H6V3h1zM11 4h1v1h-1zM4 4h1v1H4zM12 12h1v1h-1z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  transition: opacity var(--mx-fast) var(--mx-ease), scale var(--mx-fast) var(--mx-ease);
  scale: .7;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile:enabled:hover::before { opacity: .55; scale: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile:enabled:active::before { opacity: .95; scale: 1.08; }
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile:enabled:hover {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -2px 0 rgba(0, 0, 0, .28), 0 0 0 2px rgba(91, 231, 240, .7), 0 0 22px -2px rgba(91, 231, 240, .45), 0 8px 0 #121828, 0 14px 18px -6px rgba(0, 0, 0, .8) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open::before { opacity: 0; }

/* Abgebaut: Mulde, die im Farbton des Erzes glüht */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open {
  background:
    radial-gradient(62% 62% at 50% 50%, color-mix(in srgb, var(--ore) 34%, transparent), transparent 72%),
    linear-gradient(180deg, #070c18, #101a2e) !important;
  box-shadow: inset 0 5px 12px rgba(0, 0, 0, .7), inset 0 0 0 1.5px color-mix(in srgb, var(--ore) 55%, transparent), 0 1px 0 rgba(255, 255, 255, .05) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open .block {
  width: 78% !important;
  height: 78% !important;
  filter: drop-shadow(0 5px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 10px color-mix(in srgb, var(--ore) 45%, transparent)) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 64%) 0 0 / 260% 100% no-repeat;
}
/* Am Rundenende nur gezeigt (nicht selbst abgebaut): gedämpft, damit die eigenen Funde führen */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open:not([data-dug]) {
  opacity: .4 !important;
  filter: saturate(.45);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .06) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.open:not([data-dug])[data-ore="lava"] {
  opacity: .72 !important;
  filter: none;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .6), inset 0 0 0 1.5px rgba(255, 110, 60, .45) !important;
}
/* Verloren: eigene Funde bleiben hell, aber ohne Gewinnrand */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid:has(.tile.boom) .tile.open[data-dug]:not(.boom) {
  opacity: .8 !important;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .65), inset 0 0 0 1.5px rgba(255, 255, 255, .12) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .mines-grid:has(.tile.boom) .tile:not(.open) { filter: saturate(.5) brightness(.7); }
/* Lava-Treffer: fließende Glut, heller Rand */
body.tc-redesign.tc-max #gameOverlay .theme-mines #gameBoard .tile.boom {
  opacity: 1 !important;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 55%, #fff1a8 0 10%, #ffb23a 26%, #ff6a24 46%, #c8261f 70%, #4a0f14 100%) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35), 0 0 0 2px #ff7a4a, 0 0 30px rgba(255, 100, 40, .7) !important;
}

/* ------------------------------------------------------------ 2. Gerüstturm – Gerüst aus Bambus und Eiche */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower {
  position: relative;
  background:
    radial-gradient(70% 30% at 50% -4%, rgba(255, 201, 60, .14), transparent 70%),
    var(--frame-bg) !important;
}
/* Etagen-Schild links */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row .mult { position: relative; }
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.active .mult::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -6px;
  border: 6px solid transparent;
  border-left: 7px solid var(--mx-gold);
  border-right: 0;
}
/* Plattform = Gerüstblock: Bambusrahmen mit Kreuzstreben */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot {
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 30%, rgba(0, 0, 0, .25)),
    linear-gradient(90deg, #b88f3a 0 4px, transparent 4px calc(100% - 4px), #b88f3a calc(100% - 4px)),
    linear-gradient(180deg, #caa04a 0 4px, transparent 4px calc(100% - 4px), #8a6a2a calc(100% - 4px)),
    repeating-linear-gradient(135deg, transparent 0 13px, rgba(202, 160, 74, .22) 13px 15px),
    linear-gradient(180deg, #2a2616, #1c1a10) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 4px 0 #0c0f18 !important;
  filter: saturate(.55) brightness(.62);
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot .block { width: 32px !important; height: 32px !important; }
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.active .slot {
  filter: none;
  background:
    linear-gradient(180deg, rgba(255, 240, 190, .16), transparent 34%, rgba(0, 0, 0, .22)),
    linear-gradient(90deg, #e2b44c 0 4px, transparent 4px calc(100% - 4px), #e2b44c calc(100% - 4px)),
    linear-gradient(180deg, #f3cc6a 0 4px, transparent 4px calc(100% - 4px), #a8791f calc(100% - 4px)),
    repeating-linear-gradient(135deg, transparent 0 13px, rgba(255, 214, 110, .30) 13px 15px),
    linear-gradient(180deg, #3b3216, #2a230f) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 4px 0 #6b4c10, 0 0 18px -4px rgba(255, 201, 60, .45) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.active .slot:enabled:hover {
  filter: brightness(1.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), 0 0 0 2px var(--mx-gold-hi), 0 7px 0 #6b4c10, 0 12px 22px -6px rgba(255, 201, 60, .55) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.active .slot:enabled:active {
  filter: brightness(.95);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), 0 1px 0 #6b4c10 !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot-badge {
  padding: 4px 8px 3px !important;
  border-radius: 6px !important;
  background: rgba(24, 16, 0, .78) !important;
  color: var(--mx-gold-hi) !important;
}
/* Geschafft: Smaragd auf dem Gerüst; der gewählte Block leuchtet */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot.safe,
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.done .slot:not(.gravel) {
  filter: none;
  background:
    radial-gradient(60% 80% at 50% 45%, rgba(46, 229, 157, .20), transparent 75%),
    linear-gradient(90deg, rgba(46, 229, 157, .28) 0 3px, transparent 3px calc(100% - 3px), rgba(46, 229, 157, .28) calc(100% - 3px)),
    linear-gradient(180deg, #0b1a22, #0f2230) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(46, 229, 157, .3) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row .slot.picked:not(.gravel) {
  background:
    radial-gradient(60% 90% at 50% 45%, rgba(46, 229, 157, .42), transparent 75%),
    linear-gradient(180deg, #0c2a26, #0f2a33) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 2px var(--mx-emerald), 0 0 20px -2px rgba(46, 229, 157, .45) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row .slot.picked:not(.gravel) .block { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .5)) drop-shadow(0 0 8px rgba(46, 229, 157, .6)); }
/* Kies: grauer Schotter, rot umrandet wenn gewählt */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot.gravel {
  filter: none;
  background:
    radial-gradient(60% 80% at 50% 45%, rgba(255, 77, 94, .14), transparent 75%),
    linear-gradient(180deg, #1a1218, #20141c) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 77, 94, .3) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row .slot.picked.gravel {
  background: radial-gradient(60% 90% at 50% 45%, rgba(255, 77, 94, .38), transparent 75%), linear-gradient(180deg, #2a1119, #1c0c14) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 2px var(--mx-redstone), 0 0 22px -2px rgba(255, 77, 94, .5) !important;
}
/* Nach Rundenende aufgedeckte Etagen darüber: nur zur Info, gedämpft */
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row:not(.done):not(.active) .slot:is(.safe, .gravel):not(.picked) { opacity: .45 !important; filter: saturate(.5); }
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.mxr-crash { background: rgba(255, 77, 94, .08) !important; box-shadow: inset 0 0 0 1.5px rgba(255, 77, 94, .45) !important; }
body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row.mxr-crash .mult { color: var(--mx-redstone) !important; }

/* ------------------------------------------------------------ 3. Hühnerpfad – Gleise quer über die Strecke */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .road-track {
  align-items: stretch !important;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(255, 181, 71, .06), transparent 75%),
    linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 16%, transparent 84%, rgba(0, 0, 0, .4)),
    linear-gradient(180deg, #0d1322, #111a2c) !important;
}
/* Jede Bahn ist ein Gleis: Schwellen aus Eiche, zwei Eisenschienen */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane {
  position: relative;
  height: auto !important;
  min-height: 150px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 25%, #8d99b2 25% calc(25% + 3px), #4a5470 calc(25% + 3px) calc(25% + 5px), transparent calc(25% + 5px) calc(75% - 5px), #8d99b2 calc(75% - 5px) calc(75% - 2px), #4a5470 calc(75% - 2px) 75%, transparent 75%),
    repeating-linear-gradient(180deg, transparent 0 10px, #5a4228 10px 16px, #3d2c1a 16px 17px, transparent 17px 22px),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 40%, rgba(0, 0, 0, .25)),
    var(--tex-deepslate) center / 48px 48px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 10px 14px -8px rgba(0, 0, 0, .7), 0 4px 0 #0a0f1c !important;
  filter: saturate(.75) brightness(.78);
}
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.start {
  background:
    linear-gradient(180deg, #57b04a 0 10px, #3d8a33 10px 14px, transparent 14px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #6b4a2c, #4e3520) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 0 #0a0f1c !important;
  filter: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.start .lane-mult { background: rgba(10, 20, 8, .75) !important; color: #d5f5c8 !important; }
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane-mult { position: relative; z-index: 2; }
/* Lore liegt mittig auf dem Gleis, dort, wo das Huhn steht */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane-art {
  position: absolute !important;
  left: 50%;
  top: 50%;
  margin: -22px 0 0 -22px;
  z-index: 1;
}
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane-art svg { width: 44px !important; height: 44px !important; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, .6)); }
/* Nächstes Feld: goldenes Antriebsgleis statt voller Goldfläche – die Schienen bleiben sichtbar */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.next {
  filter: none;
  background:
    linear-gradient(90deg, transparent 0 25%, #ffe08a 25% calc(25% + 3px), #c7860c calc(25% + 3px) calc(25% + 5px), transparent calc(25% + 5px) calc(75% - 5px), #ffe08a calc(75% - 5px) calc(75% - 2px), #c7860c calc(75% - 2px) 75%, transparent 75%),
    repeating-linear-gradient(180deg, transparent 0 10px, #7a5a30 10px 16px, #4f3a1f 16px 17px, transparent 17px 22px),
    radial-gradient(90% 55% at 50% 50%, rgba(255, 201, 60, .38), rgba(255, 201, 60, .12) 70%),
    linear-gradient(180deg, #3a2f14, #2a220e) !important;
  box-shadow: inset 0 0 0 2px var(--mx-gold), inset 0 0 26px rgba(255, 201, 60, .25), 0 4px 0 var(--mx-gold-lo), 0 0 26px -4px rgba(255, 201, 60, .45) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.next:enabled:hover { filter: brightness(1.12); }
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.next:enabled:active { filter: brightness(.95); translate: 0 2px; }
/* Geschafft: Schienen leuchten smaragdgrün */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.passed {
  filter: none;
  background:
    linear-gradient(90deg, transparent 0 25%, #57d9a3 25% calc(25% + 3px), #0b6e49 calc(25% + 3px) calc(25% + 5px), transparent calc(25% + 5px) calc(75% - 5px), #57d9a3 calc(75% - 5px) calc(75% - 2px), #0b6e49 calc(75% - 2px) 75%, transparent 75%),
    repeating-linear-gradient(180deg, transparent 0 10px, #3d3322 10px 16px, #2a2217 16px 17px, transparent 17px 22px),
    radial-gradient(90% 55% at 50% 50%, rgba(46, 229, 157, .18), transparent 75%),
    linear-gradient(180deg, #0c201f, #0b1820) !important;
  box-shadow: inset 0 0 0 1.5px rgba(46, 229, 157, .5), 0 4px 0 #06221a !important;
}
/* Lore: das Feld, auf dem es passiert ist, in Redstone */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.crashed {
  filter: none;
  background:
    linear-gradient(90deg, transparent 0 25%, #ff9aa4 25% calc(25% + 3px), #9e1f2c calc(25% + 3px) calc(25% + 5px), transparent calc(25% + 5px) calc(75% - 5px), #ff9aa4 calc(75% - 5px) calc(75% - 2px), #9e1f2c calc(75% - 2px) 75%, transparent 75%),
    repeating-linear-gradient(180deg, transparent 0 10px, #4a2a22 10px 16px, #2e1a15 16px 17px, transparent 17px 22px),
    radial-gradient(90% 55% at 50% 50%, rgba(255, 77, 94, .34), transparent 75%),
    linear-gradient(180deg, #2a1119, #1a0c14) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 77, 94, .75), 0 4px 0 #3a0c14, 0 0 22px rgba(255, 77, 94, .3) !important;
}
/* Nach Rundenende aufgedeckte Loren (nicht das Unglücksfeld): nur Hinweis */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .road-track:not(:has(.runner.crashed)) .lane.crashed,
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .lane.crashed ~ .lane.crashed {
  opacity: .55;
  filter: saturate(.45);
  box-shadow: inset 0 0 0 1.5px rgba(255, 77, 94, .35), 0 4px 0 #0a0f1c !important;
}
/* Huhn: Schatten auf dem Gleis; .runner-transform gehört JS, Wackeln aus älteren Schichten aus */
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .runner { animation-name: none !important; }
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .runner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 38px;
  height: 9px;
  margin-left: -19px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  z-index: -1;
}
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .runner-inner { position: relative; width: 56px !important; height: 56px !important; }
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .runner.crashed { filter: none !important; }
body.tc-redesign.tc-max #gameOverlay .theme-chicken #gameBoard .runner.crashed .runner-inner {
  rotate: 76deg;
  translate: 14px 34px;
  filter: grayscale(.7) brightness(.85) drop-shadow(0 0 10px rgba(255, 77, 94, .7));
}

/* ------------------------------------------------------------ 4. Bewegung (nur ohne reduzierte Bewegung) */
@keyframes mxrBump { 0% { scale: 1; } 35% { scale: 1.22; color: #fff4c8; text-shadow: 0 0 16px rgba(255, 201, 60, .8); } 100% { scale: 1; } }
@keyframes mxrDigTile { 0% { scale: 1.06; filter: brightness(1.9); } 30% { scale: .92; filter: brightness(1.3); } 100% { scale: 1; filter: brightness(1); } }
@keyframes mxrOrePop { 0% { opacity: 0; scale: .15; rotate: -30deg; translate: 0 26%; } 55% { opacity: 1; scale: 1.2; rotate: 7deg; translate: 0 -6%; } 80% { scale: .95; rotate: -2deg; translate: 0 0; } 100% { opacity: 1; scale: 1; rotate: 0deg; translate: 0 0; } }
@keyframes mxrShards { 0% { opacity: 1; scale: .45; rotate: 0deg; translate: 0 0; } 70% { opacity: .9; } 100% { opacity: 0; scale: 2.5; rotate: 40deg; translate: 0 10px; } }
@keyframes mxrFlash { 0% { opacity: 0; scale: .5; } 25% { opacity: 1; } 100% { opacity: 0; scale: 1.5; } }
@keyframes mxrSweep { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -60% 0; } }
@keyframes mxrUnveil { 0% { opacity: 0; rotate: x 90deg; } 100% { rotate: x 0deg; } }
@keyframes mxrBurst { 0% { scale: 1; filter: brightness(2.2); } 25% { scale: 1.18; } 55% { scale: .96; } 100% { scale: 1; filter: brightness(1); } }
@keyframes mxrEmbers { 0% { opacity: 1; scale: .4; translate: 0 0; } 100% { opacity: 0; scale: 2.2; translate: 0 -18px; } }
@keyframes mxrRing { 0% { opacity: .95; scale: .4; } 100% { opacity: 0; scale: 2.1; } }
@keyframes mxrRise { 0% { opacity: .3; translate: 0 12px; } 60% { opacity: 1; translate: 0 -2px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes mxrRowGlow { 0% { filter: brightness(1) drop-shadow(0 0 0 rgba(255, 201, 60, 0)); } 40% { filter: brightness(1.35) drop-shadow(0 0 14px rgba(255, 201, 60, .55)); } 100% { filter: brightness(1) drop-shadow(0 0 0 rgba(255, 201, 60, 0)); } }
@keyframes mxrFlipY { 0% { opacity: 0; rotate: y 90deg; } 100% { rotate: y 0deg; } }
@keyframes mxrGravel { 0% { translate: 0 -34px; rotate: -18deg; opacity: 0; } 45% { translate: 0 4px; rotate: 6deg; opacity: 1; } 70% { translate: 0 -3px; rotate: -2deg; } 100% { translate: 0 0; rotate: 0deg; opacity: 1; } }
@keyframes mxrDust { 0% { opacity: .9; scale: .4; translate: 0 6px; } 100% { opacity: 0; scale: 2; translate: 0 -6px; } }
@keyframes mxrShake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 0; } 45% { translate: 5px 0; } 70% { translate: -3px 0; } 85% { translate: 2px 0; } }
@keyframes mxrGlory { 0% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
@keyframes mxrHop { 0% { translate: 0 0; scale: 1.08 .9; } 18% { scale: .9 1.12; } 45% { translate: 0 -30px; scale: 1 1; rotate: -6deg; } 78% { translate: 0 0; scale: 1.14 .84; rotate: 0deg; } 100% { translate: 0 0; scale: 1 1; } }
@keyframes mxrShadow { 0% { scale: 1; opacity: 1; } 45% { scale: .55; opacity: .45; } 78%, 100% { scale: 1; opacity: 1; } }
@keyframes mxrPuff { 0%, 60% { opacity: 0; scale: .4; } 72% { opacity: .85; } 100% { opacity: 0; scale: 1.6; } }
@keyframes mxrKnock { 0% { rotate: 0deg; translate: 0 0; } 35% { rotate: 30deg; translate: 10px -22px; } 70% { rotate: 88deg; translate: 16px 38px; } 100% { rotate: 76deg; translate: 14px 34px; } }
@keyframes mxrFeathers { 0% { opacity: 1; scale: .3; rotate: 0deg; } 100% { opacity: 0; scale: 2.2; rotate: -30deg; translate: 0 10px; } }
@keyframes mxrCartIn { 0% { translate: 0 -150px; opacity: 0; filter: blur(2px); } 70% { translate: 0 6px; opacity: 1; filter: blur(0); } 100% { translate: 0 0; opacity: 1; filter: blur(0); } }
@keyframes mxrFade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes mxrCheer { 0%, 100% { translate: 0 0; scale: 1 1; } 20% { translate: 0 -22px; scale: .92 1.1; } 40% { translate: 0 0; scale: 1.1 .9; } 60% { translate: 0 -12px; scale: .96 1.05; } 80% { translate: 0 0; scale: 1.05 .95; } }

/* Handy: Turm kompakter, damit die unterste Etage nicht unter der Ergebnis-Plakette liegt */
@media (max-width: 600px) {
  body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower { gap: 5px !important; margin-bottom: 28px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .tower-row { padding-top: 4px !important; padding-bottom: 5px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot { height: 38px !important; min-height: 0 !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-tower #gameBoard .slot .block { width: 28px !important; height: 28px !important; }
}

@media all {
  /* Multiplikator zählt sichtbar hoch (Erzader, Gerüstturm) */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay #gameBoard :is(.mines-meta, .tower-meta) .meta b.mxr-bump {
    display: inline-block;
    transform-origin: left center;
    animation-name: mxrBump;
    animation-duration: .38s;
    animation-timing-function: var(--mx-ease);
    animation-iteration-count: 1;
  }

  /* Erzader: Stein bricht, Splitter fliegen, Erz springt heraus */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-dig {
    animation-name: mxrDigTile !important;
    animation-duration: .34s !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile:is(.mxr-dig, .mxr-burst) > svg {
    animation-name: mxrOrePop !important;
    animation-duration: .46s !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: both !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile:is(.mxr-dig, .mxr-burst)::before {
    inset: auto;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: #4a5270;
    box-shadow: -14px -10px 0 0 #596382, 12px -14px 0 1px #3b4257, 16px 6px 0 0 #6a7596, -10px 14px 0 1px #2c3246, 2px -18px 0 0 var(--ore), -18px 2px 0 0 #596382, 8px 16px 0 0 var(--ore), 18px -4px 0 1px #3b4257, -6px -6px 0 -1px var(--ore), -16px -16px 0 -1px #6a7596;
    opacity: 0;
    z-index: 3;
    animation-name: mxrShards;
    animation-duration: .5s;
    animation-timing-function: cubic-bezier(.15, .7, .3, 1);
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile:is(.mxr-dig, .mxr-burst)::after {
    background: radial-gradient(closest-side, color-mix(in srgb, var(--ore) 70%, #fff), transparent) !important;
    animation-name: mxrFlash;
    animation-duration: .45s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  /* Lava: Glutstoß, Funken steigen, Druckring */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-burst {
    animation-name: mxrBurst !important;
    animation-duration: .5s !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-burst::before {
    background: #ffd36b;
    box-shadow: -14px -10px 0 0 #ff8a2e, 12px -14px 0 1px #ffb547, 16px 6px 0 0 #ff5a24, -10px 14px 0 0 #ffd36b, 2px -20px 0 0 #fff1a8, -18px 2px 0 1px #ff7a2e, 8px 16px 0 -1px #ff5a24, 18px -6px 0 0 #ffd36b, -4px -26px 0 -1px #fff1a8, 22px -18px 0 -1px #ff8a2e;
    animation-name: mxrEmbers;
    animation-duration: .7s;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-burst::after {
    background: none !important;
    box-shadow: 0 0 0 4px rgba(255, 122, 46, .85), 0 0 24px rgba(255, 90, 40, .7);
    animation-name: mxrRing;
    animation-duration: .55s;
  }
  /* Rundenende: der Rest kippt als Welle vom letzten Feld auf */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-unveil {
    animation-name: mxrUnveil !important;
    animation-duration: .3s !important;
    animation-delay: var(--mxr-d, 0ms) !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: backwards !important;
  }
  /* Ausgezahlt: Glanz läuft über die eigenen Funde */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-shine::after {
    animation-name: mxrSweep;
    animation-duration: .6s;
    animation-delay: var(--mxr-d, 0ms);
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-mines #gameBoard .tile.mxr-shine > svg {
    animation-name: mxrBump;
    animation-duration: .42s;
    animation-delay: var(--mxr-d, 0ms);
    animation-timing-function: var(--mx-ease);
    animation-iteration-count: 1;
  }

  /* Gerüstturm: Etage geschafft – Smaragd landet, Nachbarn drehen sich auf, nächste Etage steigt heran */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot.mxr-land > svg {
    animation-name: mxrOrePop !important;
    animation-duration: .46s !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: both !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot:is(.mxr-land, .mxr-fall)::after {
    content: "";
    position: absolute;
    inset: 4px 18%;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(46, 229, 157, .9), 0 0 20px rgba(46, 229, 157, .6);
    opacity: 0;
    animation-name: mxrRing;
    animation-duration: .5s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot.mxr-flip {
    animation-name: mxrFlipY !important;
    animation-duration: .3s !important;
    animation-delay: var(--mxr-d, 60ms) !important;
    animation-timing-function: var(--mx-ease) !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: backwards !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .tower-row.mxr-arrive {
    animation-name: mxrRise, mxrRowGlow !important;
    animation-duration: .36s, .7s !important;
    animation-timing-function: var(--mx-ease), ease-out !important;
    animation-iteration-count: 1 !important;
  }
  /* Kies: Block rutscht ein, Staub, kurzes Wackeln */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot.mxr-fall > svg {
    animation-name: mxrGravel !important;
    animation-duration: .4s !important;
    animation-timing-function: ease-out !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: both !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot.mxr-fall::after { box-shadow: 0 0 0 3px rgba(255, 77, 94, .9), 0 0 20px rgba(255, 77, 94, .6); }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .slot.mxr-fall::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background: #8b8f99;
    box-shadow: -14px 0 0 1px #6d717c, 12px -2px 0 0 #a3a7b0, -6px -8px 0 -1px #8b8f99, 20px 2px 0 -1px #6d717c, -22px -2px 0 -1px #a3a7b0, 4px -12px 0 -1px #6d717c;
    pointer-events: none;
    opacity: 0;
    animation-name: mxrDust;
    animation-duration: .5s;
    animation-delay: .14s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .tower-row.mxr-crash {
    animation-name: mxrShake !important;
    animation-duration: .34s !important;
    animation-delay: .12s !important;
    animation-timing-function: ease-out !important;
    animation-iteration-count: 1 !important;
  }
  /* Ausgezahlt: Goldglanz läuft die geschafften Etagen hinauf */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-tower #gameBoard .tower.mxr-won .tower-row.done {
    background-image: linear-gradient(100deg, transparent 30%, rgba(255, 224, 138, .30) 50%, transparent 70%) !important;
    background-size: 260% 100% !important;
    background-repeat: no-repeat !important;
    background-position: 130% 0;
    animation-name: mxrGlory !important;
    animation-duration: .55s !important;
    animation-delay: calc(var(--mxr-i, 0) * 70ms) !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: both !important;
  }

  /* Hühnerpfad: Sprung mit Stauchen, Schatten atmet mit, Staub bei der Landung */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .runner-inner.hop {
    animation-name: mxrHop !important;
    animation-duration: .4s !important;
    animation-timing-function: cubic-bezier(.3, .7, .4, 1) !important;
    animation-iteration-count: 1 !important;
    transform-origin: 50% 100%;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .runner:has(.runner-inner.hop)::after {
    animation-name: mxrShadow;
    animation-duration: .4s;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .runner-inner.hop::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 5px;
    height: 5px;
    margin-left: -2px;
    background: #9aa3b5;
    box-shadow: -12px 0 0 0 #7d879c, 12px 0 0 0 #7d879c, -20px -3px 0 -1px #aab3c6, 20px -3px 0 -1px #aab3c6;
    opacity: 0;
    pointer-events: none;
    animation-name: mxrPuff;
    animation-duration: .5s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  /* Schritt geschafft: grüner Ring auf dem Gleis */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .lane.mxr-pass::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(46, 229, 157, .9), 0 0 18px rgba(46, 229, 157, .6);
    pointer-events: none;
    opacity: 0;
    animation-name: mxrRing;
    animation-duration: .5s;
    animation-delay: .22s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .lane.mxr-pass .lane-mult {
    animation-name: mxrBump;
    animation-duration: .38s;
    animation-delay: .2s;
    animation-timing-function: var(--mx-ease);
    animation-iteration-count: 1;
  }
  /* Lore schießt das Gleis herunter; Huhn wird umgeworfen, Federn fliegen */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .lane-art.cart-in {
    animation-name: mxrCartIn !important;
    animation-duration: .32s !important;
    animation-timing-function: cubic-bezier(.3, .6, .3, 1) !important;
    animation-iteration-count: 1 !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .road-track:not(:has(.runner.crashed)) .lane-art.cart-in,
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .lane.crashed ~ .lane.crashed .lane-art.cart-in {
    animation-name: mxrFade !important;
    animation-duration: .3s !important;
    animation-delay: calc(.25s + var(--mxr-i, 0) * 25ms) !important;
    animation-fill-mode: backwards !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .runner.crashed .runner-inner {
    animation-name: mxrKnock !important;
    animation-duration: .46s !important;
    animation-delay: .12s !important;
    animation-timing-function: cubic-bezier(.3, .6, .4, 1) !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: backwards !important;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .runner.crashed::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 45%;
    width: 6px;
    height: 4px;
    margin-left: -3px;
    background: #f4f1e8;
    box-shadow: -16px -8px 0 0 #fffdf6, 14px -12px 0 0 #e8e2d2, 18px 8px 0 -1px #fffdf6, -12px 12px 0 0 #e8e2d2, 2px -20px 0 -1px #fffdf6, -22px 0 0 -1px #ff4d5e, 6px 16px 0 -1px #ffd36b;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    animation-name: mxrFeathers;
    animation-duration: .6s;
    animation-delay: .12s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
  }
  /* Ausgezahlt: grüne Gleise leuchten der Reihe nach golden auf, das Huhn jubelt */
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .road.mxr-won .lane.passed {
    animation-name: mxrBump;
    animation-duration: .4s;
    animation-delay: calc(var(--mxr-i, 0) * 45ms);
    animation-timing-function: var(--mx-ease);
    animation-iteration-count: 1;
  }
  body.tc-redesign.tc-max:not(.tc-reduced-motion) #gameOverlay .theme-chicken #gameBoard .road.mxr-won .runner-inner {
    animation-name: mxrCheer !important;
    animation-duration: .7s !important;
    animation-delay: .1s !important;
    animation-timing-function: ease-out !important;
    animation-iteration-count: 1 !important;
    transform-origin: 50% 100%;
  }
}
