/* ==========================================================================
   wg-frostkarten – Frostkarten (Winterupdate 2026), Brett und Knöpfe aus js/wg-frostkarten.js (.wg-fc-*).
   Farben nur über Tokens aus max-base.css: Eis (--wt-*) ist Schmuck (Tisch, Kartenrücken, Funkeln); Gold = Faktor/Geld,
   Smaragd = Treffer/gesichert, Redstone = Fehltipp. Animationen laufen immer (nicht an prefers-reduced-motion gekoppelt).
   JS-Verträge: .wg-fc[data-phase=idle|live|won|lost]; Karte .wg-fc-card.wg-fc-face.is-red|is-dark[data-len] bzw. .wg-fc-back;
   Spur .wg-fc-mini.is-ok|is-bad|is-skip[data-age] (+ .is-far, .is-pending), .wg-fc-more; Bühne .wg-fc-slot > .wg-fc-flip > .wg-fc-flip-inner >
   .wg-fc-side.wg-fc-front(.is-cracking|.is-broken, --clip) + .wg-fc-side.wg-fc-rear; .wg-fc-stamp.is-won|is-lost|is-end; Splitter .wg-fc-shard;
   Knöpfe #gameActions .wg-fc-tips > .btn.wg-fc-tip.wg-fc-tip-{hoch|gleich|tief}, .btn.wg-fc-skip, .btn.cash.wg-fc-cash, [data-fc-wait].
   Kartengröße über --cw (Breite), alles in der Karte in em (font-size = --cw / 10).
   ========================================================================== */

/* ------------------------------------------------------------ Grundgerüst */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc {
  --cw-stage: 176px;
  --cw-mini: 58px;
  --cw-deck: 84px;
  --wgfc-step: 30px;
  container: wgfc / inline-size;
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  color: var(--mx-text);
  font-family: var(--mx-font-body);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-fx {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ------------------------------------------------------------ Faktorleiste */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-bar {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  grid-template-areas: "now meter counts";
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--mx-line-soft);
  border-radius: var(--mx-r-lg, 16px);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--wt-frost) 6%, transparent), transparent 70%),
    color-mix(in srgb, var(--wt-night) 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--wt-snow) 8%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-now { grid-area: now; display: grid; gap: 1px; min-width: 0; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-k { color: var(--mx-text-2); font: 700 12.5px/1.2 var(--mx-font-body); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-x {
  display: block;
  color: var(--mx-gold);
  font: 800 40px/1 var(--mx-font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  transform-origin: left center;
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-x.is-none { color: var(--mx-text-3); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="won"] .wg-fc-x { color: var(--mx-emerald); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="lost"] .wg-fc-x:not(.is-none) {
  color: var(--mx-redstone);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: color-mix(in srgb, var(--mx-redstone) 80%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-cash {
  overflow: hidden;
  color: var(--mx-text-2);
  font: 600 13px/1.3 var(--mx-font-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-cash b { color: var(--mx-text); font-weight: 800; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="won"] .wg-fc-cash b { color: var(--mx-emerald); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="lost"] .wg-fc-cash b { color: var(--mx-redstone); }

body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-meter { grid-area: meter; display: grid; gap: 7px; min-width: 0; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), color-mix(in srgb, var(--wt-frost) 14%, transparent) calc(20% - 1px) 20%),
    color-mix(in srgb, var(--wt-night) 92%, transparent);
  box-shadow: inset 0 2px 3px color-mix(in srgb, var(--wt-night) 85%, transparent), 0 0 0 1px color-mix(in srgb, var(--wt-ice) 14%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wt-ice-lo), var(--wt-ice) 45%, var(--mx-gold-hi) 80%, var(--mx-gold));
  box-shadow: 0 0 12px color-mix(in srgb, var(--wt-ice) 45%, transparent), inset 0 1px 0 color-mix(in srgb, var(--wt-snow) 55%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="won"] .wg-fc-fill { background: linear-gradient(90deg, var(--mx-emerald-lo), var(--mx-emerald)); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="lost"] .wg-fc-fill { background: color-mix(in srgb, var(--mx-redstone) 55%, var(--wt-night)); box-shadow: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-meter-cap {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--mx-text-3);
  font: 600 12px/1.2 var(--mx-font-body);
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-meter-cap > span:first-child { color: var(--mx-text-2); }

body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-counts { grid-area: counts; display: flex; gap: 8px; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count {
  display: grid;
  justify-items: center;
  min-width: 62px;
  padding: 6px 10px 7px;
  border: 1px solid var(--mx-line-soft);
  border-radius: var(--mx-r-md, 12px);
  background: color-mix(in srgb, var(--wt-glacier) 22%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count > span { color: var(--mx-text-3); font: 700 11.5px/1.2 var(--mx-font-body); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count > b {
  color: var(--mx-text);
  font: 800 22px/1.05 var(--mx-font-display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count small { color: var(--mx-text-3); font-size: .68em; font-weight: 700; }

/* ------------------------------------------------------------ Eistisch */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-table {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: calc(var(--cw-stage) * 1.4 + 56px);
  padding: 28px 22px;
  border: 1px solid color-mix(in srgb, var(--wt-ice) 22%, transparent);
  border-radius: var(--mx-r-xl, 22px);
  background:
    radial-gradient(ellipse 46% 62% at 50% 46%, color-mix(in srgb, var(--wt-ice) 20%, transparent), transparent 72%),
    radial-gradient(ellipse 80% 70% at 50% 120%, color-mix(in srgb, var(--wt-aurora) 9%, transparent), transparent 70%),
    repeating-linear-gradient(118deg, transparent 0 22px, color-mix(in srgb, var(--wt-frost) 3%, transparent) 22px 23px),
    linear-gradient(180deg, color-mix(in srgb, var(--wt-glacier) 74%, var(--wt-night)), var(--wt-night));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--wt-snow) 22%, transparent),
    inset 0 0 0 3px color-mix(in srgb, var(--wt-frost) 5%, transparent),
    inset 0 -18px 40px -18px color-mix(in srgb, var(--wt-night) 90%, transparent),
    0 18px 34px -20px color-mix(in srgb, var(--wt-night) 95%, transparent);
}
/* Raureif am Tischrand */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-table::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--wt-frost) 16%, transparent), transparent 90px),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--wt-frost) 12%, transparent), transparent 80px),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--wt-frost) 10%, transparent), transparent 70px),
    radial-gradient(circle at 0 100%, color-mix(in srgb, var(--wt-frost) 10%, transparent), transparent 70px);
  pointer-events: none;
}

/* Spur der bisherigen Karten: Fächer, der sich in die Spalte drückt (ältere Karten zeigen nur ihre Ecke, die neueste liegt ganz da) */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-trail {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  min-height: calc(var(--cw-mini) * 1.4 + 14px);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini {
  --cw: var(--cw-mini);
  position: relative;
  flex: 0 1 var(--wgfc-step);
  min-width: 13px;
  height: calc(var(--cw-mini) * 1.4);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini:last-of-type { flex: none; width: var(--cw-mini); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini .wg-fc-card {
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wt-night) 50%, transparent), -3px 3px 8px -2px color-mix(in srgb, var(--wt-night) 85%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-ok .wg-fc-card { box-shadow: 0 0 0 2px color-mix(in srgb, var(--mx-emerald) 70%, transparent), -3px 3px 8px -2px color-mix(in srgb, var(--wt-night) 85%, transparent); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-bad .wg-fc-card { box-shadow: 0 0 0 2px var(--mx-redstone), -3px 3px 8px -2px color-mix(in srgb, var(--wt-night) 85%, transparent); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-skip .wg-fc-card { filter: saturate(.55) brightness(.82); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini:is([data-age="4"], [data-age="5"], [data-age="6"]) .wg-fc-card { filter: brightness(.86); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mark {
  position: absolute;
  bottom: -9px;
  left: 1px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  border-radius: 999px;
  font: 800 12px/1 var(--mx-font-body);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--wt-night) 70%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-ok .wg-fc-mark { background: var(--mx-emerald); color: var(--mx-emerald-ink); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-bad .wg-fc-mark { background: var(--mx-redstone); color: var(--wt-snow); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-skip .wg-fc-mark { background: var(--mx-raised); color: var(--wt-frost); box-shadow: 0 0 0 1px var(--mx-line), 0 0 0 3px color-mix(in srgb, var(--wt-night) 70%, transparent); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-pending .wg-fc-mark { opacity: 0; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more {
  position: absolute;
  bottom: calc(50% + var(--cw-mini) * .7 + 5px);
  left: 0;
  padding: 3px 7px;
  border: 1px solid var(--mx-line-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--wt-night) 80%, transparent);
  color: var(--mx-text-2);
  font: 800 11.5px/1 var(--mx-font-body);
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more.is-near-only,
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more-near { display: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-trail-empty {
  display: grid;
  place-items: center;
  width: var(--cw-mini);
  aspect-ratio: 5 / 7;
  padding: 4px;
  border: 1.5px dashed color-mix(in srgb, var(--wt-frost) 28%, transparent);
  border-radius: calc(var(--cw-mini) * .09);
  color: var(--mx-text-3);
  font: 600 10.5px/1.25 var(--mx-font-body);
  text-align: center;
}

/* Bühne mit der aktuellen Karte */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 6px;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-glow {
  position: absolute;
  inset: -22% -40%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--wt-ice) 30%, transparent), color-mix(in srgb, var(--wt-ice) 8%, transparent) 60%, transparent);
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="won"] .wg-fc-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--mx-emerald) 26%, transparent), color-mix(in srgb, var(--mx-gold) 8%, transparent) 60%, transparent); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc[data-phase="lost"] .wg-fc-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--mx-redstone) 20%, transparent), transparent); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-slot {
  --cw: var(--cw-stage);
  position: relative;
  width: var(--cw);
  aspect-ratio: 5 / 7;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-flip { position: absolute; inset: 0; perspective: 900px; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-side {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-rear { transform: rotateY(180deg); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-slot .wg-fc-card {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--wt-ice-lo) 40%, transparent),
    0 14px 26px -10px color-mix(in srgb, var(--wt-night) 95%, transparent),
    0 0 26px -6px color-mix(in srgb, var(--wt-ice) 35%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-front.is-broken { filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--wt-night) 90%, transparent)); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-front.is-broken .wg-fc-card { clip-path: var(--clip); box-shadow: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-shard {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-shard .wg-fc-card { box-shadow: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-shard .wg-fc-cracks { opacity: 1; }

/* Stempel nach dem Rundenende */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp {
  position: absolute;
  top: 52%;
  left: 50%;
  z-index: 3;
  translate: -50% -50%;
  rotate: -11deg;
  padding: 5px 14px 6px;
  border: 3px solid currentColor;
  border-radius: 10px;
  background: color-mix(in srgb, var(--wt-night) 82%, transparent);
  font: 800 28px/1 var(--mx-font-display);
  letter-spacing: .03em;
  white-space: nowrap;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--wt-night) 95%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--wt-night) 60%, transparent);
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp[hidden] { display: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp.is-won { color: var(--mx-emerald); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp.is-lost { color: var(--mx-redstone); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp.is-end { color: var(--mx-text-2); }

/* Stapel */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck {
  --cw: var(--cw-deck);
  position: relative;
  justify-self: start;
  width: var(--cw);
  aspect-ratio: 5 / 7;
  margin-left: 6px;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck-layer {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--cw) * .08);
  background: linear-gradient(160deg, var(--wt-glacier), var(--wt-night));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wt-ice) 22%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck-layer:nth-child(1) { translate: 5px 6px; opacity: .65; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck-layer:nth-child(2) { translate: 2.5px 3px; opacity: .85; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck-top {
  position: absolute;
  inset: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wt-ice) 30%, transparent), 0 10px 18px -10px color-mix(in srgb, var(--wt-night) 95%, transparent);
}

body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-hint {
  margin: 0;
  color: var(--mx-text-2);
  font: 600 14px/1.45 var(--mx-font-body);
  text-align: center;
  text-wrap: balance;
}

/* ------------------------------------------------------------ Karten */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card {
  position: relative;
  box-sizing: border-box;
  width: var(--cw, 120px);
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: calc(var(--cw, 120px) * .085);
  font-size: calc(var(--cw, 120px) / 10);
  line-height: 1;
  user-select: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-face {
  background:
    radial-gradient(ellipse 70% 45% at 50% 0, color-mix(in srgb, var(--wt-snow) 85%, transparent), transparent 70%),
    linear-gradient(165deg, var(--wt-snow) 0%, var(--wt-snow) 52%, var(--wt-frost) 100%);
  color: var(--wt-night);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-face.is-red { color: var(--wt-holly); }
/* Eisblumen in den Ecken und ein feiner Frostrahmen */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--wt-ice) 38%, transparent), transparent 2.6em),
    radial-gradient(circle at 0 100%, color-mix(in srgb, var(--wt-ice) 38%, transparent), transparent 2.6em),
    repeating-conic-gradient(from 10deg at 100% 0, transparent 0 7deg, color-mix(in srgb, var(--wt-snow) 70%, transparent) 7deg 8deg) top right / 2.8em 2.8em no-repeat,
    repeating-conic-gradient(from 190deg at 0 100%, transparent 0 7deg, color-mix(in srgb, var(--wt-snow) 70%, transparent) 7deg 8deg) bottom left / 2.8em 2.8em no-repeat;
  box-shadow: inset 0 0 0 .3em color-mix(in srgb, var(--wt-snow) 60%, transparent), inset 0 0 0 calc(.3em + 1px) color-mix(in srgb, var(--wt-ice-lo) 26%, transparent);
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-idx {
  position: absolute;
  top: .55em;
  left: .55em;
  display: grid;
  justify-items: center;
  gap: .08em;
  min-width: 1.4em;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-idx b { font: 800 1.75em/0.95 var(--mx-font-display); letter-spacing: -.02em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-idx i { font-style: normal; font-size: 1.3em; line-height: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-idx-b { top: auto; left: auto; right: .55em; bottom: .55em; rotate: 180deg; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-rank {
  position: absolute;
  top: 18%;
  right: 0;
  left: 0;
  font: 800 4.9em/1 var(--mx-font-display);
  letter-spacing: -.03em;
  text-align: center;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card[data-len="2"] .wg-fc-rank { font-size: 4.1em; top: 21%; letter-spacing: -.06em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-pip {
  position: absolute;
  right: 0;
  bottom: 15%;
  left: 0;
  font-size: 3em;
  line-height: 1;
  text-align: center;
}
/* Kleine Karten: nur Ecke und großer Rang, ohne Rahmenzierde */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-idx-b { display: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-idx { top: .5em; left: .45em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-idx b { font-size: 2.1em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-idx i { font-size: 1.7em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-rank { top: auto; bottom: 10%; left: 18%; font-size: 4.4em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini[data-len="2"] .wg-fc-rank { font-size: 3.6em; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini .wg-fc-pip { display: none; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-card.is-mini::before { box-shadow: none; }

/* Rückseite: Gletschergitter mit Schneeflocke */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-back {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--wt-ice) 26%, transparent), transparent 55%),
    repeating-linear-gradient(45deg, transparent 0 .9em, color-mix(in srgb, var(--wt-ice) 13%, transparent) .9em calc(.9em + 1px)),
    repeating-linear-gradient(-45deg, transparent 0 .9em, color-mix(in srgb, var(--wt-ice) 13%, transparent) .9em calc(.9em + 1px)),
    linear-gradient(160deg, var(--wt-glacier), color-mix(in srgb, var(--wt-glacier) 45%, var(--wt-night)));
  box-shadow: inset 0 0 0 .35em color-mix(in srgb, var(--wt-night) 55%, transparent), inset 0 0 0 calc(.35em + 1.5px) color-mix(in srgb, var(--wt-frost) 45%, transparent);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-flake {
  width: 56%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: var(--wt-frost);
  stroke-width: 1.35;
  stroke-linecap: round;
  filter: drop-shadow(0 0 .3em color-mix(in srgb, var(--wt-ice) 70%, transparent));
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-flake-core { fill: var(--wt-frost); stroke: none; }

/* Risse */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-cracks {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard :is(.wg-fc-front.is-cracking, .wg-fc-front.is-broken) .wg-fc-cracks { opacity: 1; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-crack-lo { fill: none; stroke: color-mix(in srgb, var(--wt-night) 55%, transparent); stroke-width: 2.6; stroke-linejoin: round; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-crack-hi { fill: none; stroke: var(--wt-snow); stroke-width: 1.1; stroke-linejoin: round; }

/* ------------------------------------------------------------ Schmales Brett (Handy) */
@container wgfc (max-width: 560px) {
  /* Eine Container-Abfrage erreicht nur Nachfahren: Größen daher auf die Kinder des Bretts setzen */
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc > * {
    --cw-stage: 132px;
    --cw-mini: 46px;
    --cw-deck: 54px;
    --wgfc-step: 26px;
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-table { margin-top: -4px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "now counts" "meter meter";
    gap: 10px 12px;
    padding: 10px 12px;
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-x { font-size: 34px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count { min-width: 52px; padding: 5px 8px 6px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-count > b { font-size: 20px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-track { height: 10px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-table {
    gap: 10px;
    min-height: calc(var(--cw-stage) * 1.4 + 40px);
    padding: 20px 12px;
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mini.is-far { display: none; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more.is-near-only { display: block; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more-wide { display: none; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-more-near { display: inline; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-mark { bottom: -8px; min-width: 17px; height: 17px; font-size: 11px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-trail-empty { font-size: 9.5px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stage { padding: 0; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-stamp { font-size: 23px; padding: 4px 10px 5px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-deck { margin-left: 2px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameBoard .wg-fc-hint { font-size: 13px; }
}

/* ------------------------------------------------------------ Knöpfe im Steuerdock */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  gap: 10px !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head x" "head auto";
  align-content: center;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  min-height: 60px !important;
  padding: 8px 16px !important;
  text-align: left;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--wt-frost) 30%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--wt-ice) 14%, transparent),
    0 4px 0 var(--b-lo, var(--mx-bg)),
    0 14px 22px -10px color-mix(in srgb, var(--wt-night) 90%, transparent) !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-head {
  grid-area: head;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--mx-text);
  -webkit-text-fill-color: var(--mx-text);
  font: 800 16px/1.15 var(--mx-font-body);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-ico {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wt-ice) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wt-ice) 30%, transparent);
  color: var(--wt-ice);
  -webkit-text-fill-color: var(--wt-ice);
  font: 800 13px/1 var(--mx-font-body);
  font-style: normal;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-gleich .wg-fc-tip-ico { font-size: 17px; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip .wg-fc-tip-x {
  grid-area: x;
  justify-self: end;
  color: var(--mx-gold);
  -webkit-text-fill-color: var(--mx-gold);
  font: 800 25px/1 var(--mx-font-display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-auto {
  grid-area: auto;
  justify-self: end;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mx-emerald) 18%, transparent);
  color: var(--mx-emerald);
  -webkit-text-fill-color: var(--mx-emerald);
  font: 800 11px/1.3 var(--mx-font-body);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip:disabled { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--wt-snow) 6%, transparent), 0 4px 0 var(--b-lo, var(--mx-bg)) !important; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip:disabled :is(.wg-fc-tip-head, .wg-fc-tip-x, .wg-fc-tip-ico) {
  color: var(--mx-text-3);
  -webkit-text-fill-color: var(--mx-text-3);
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip:disabled .wg-fc-tip-ico { background: transparent; box-shadow: inset 0 0 0 1px var(--mx-line); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip {
  min-height: 44px !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip > span { color: var(--wt-ice); -webkit-text-fill-color: var(--wt-ice); font-size: 16px; }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip:disabled > span { color: var(--mx-text-3); -webkit-text-fill-color: var(--mx-text-3); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip b { font-size: 16px; }
/* Freier Tausch (nur „Gleich“ möglich, noch kein Treffer): „(frei)“ eisblau, zählt nicht vom Vorrat ab */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip.is-free b { color: var(--wt-ice); -webkit-text-fill-color: var(--wt-ice); }
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-cash {
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 0;
  min-height: 58px !important;
}
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-cash .wg-fc-cash-v { white-space: nowrap; font-size: 19px; }
/* Kurze Sperre nach dem Aufdecken: Knöpfe sehen normal aus, nehmen aber noch keine Klicks an */
body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn[data-fc-wait] { pointer-events: none; }

@media (max-width: 820px) {
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tips {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "x" "auto";
    justify-items: center;
    row-gap: 3px;
    min-height: 64px !important;
    padding: 6px 4px !important;
    text-align: center;
  }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-head { gap: 5px; font-size: 14px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-ico { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-gleich .wg-fc-tip-ico { font-size: 14px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-tip .wg-fc-tip-x { justify-self: center; font-size: 21px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .wg-fc-tip-auto { justify-self: center; margin-top: 0; font-size: 10px; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-skip { min-height: 48px !important; padding: 6px 8px !important; font-size: 13.5px !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-cash { min-height: 48px !important; padding: 6px 8px !important; font-size: 13.5px !important; line-height: 1.15 !important; }
  body.tc-redesign.tc-max #gameOverlay .theme-frostkarten #gameActions .btn.wg-fc-cash .wg-fc-cash-v { font-size: 16px; }
}
