/* Spielebox – Handy zuerst, Hoch- und Querformat vollwertig */
:root {
  --felt: #1f4a3a;
  --felt-2: #133226;
  --card: #f7f1e6;
  --card-2: #efe5d4;
  --ink: #2a1d12;
  --muted: #6f5d4b;
  --line: rgba(42, 29, 18, .16);
  --accent: #e4a53c;
  --accent-2: #c9862a;
  --accent-ink: #2a1a05;
  --ok: #2f9e6a;
  --warn: #d6962b;
  --bad: #c8463d;
  --radius: 16px;
  --tap: 48px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 17px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 0%, #2a5c49 0%, var(--felt) 45%, var(--felt-2) 100%) fixed;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
#app { min-height: 100%; }

/* ---------- Knöpfe ---------- */
.btn {
  min-height: var(--tap); padding: 10px 18px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fffaf2; font-weight: 650; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; box-shadow: 0 1px 0 rgba(0,0,0,.06); transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(#f0b54c, var(--accent-2)); border-color: #a86e1f; color: var(--accent-ink); }
.btn.big { width: 100%; min-height: 60px; font-size: 18px; }
.btn.big small { font-weight: 500; font-size: 13.5px; opacity: .8; }
.btn.small { min-height: var(--tap); padding: 6px 14px; font-size: 15px; }
.btn.link { background: none; border: none; box-shadow: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; padding: 8px 10px; }
/* n9 (nur Compositor): Ring als eigenes Pseudo-Element, das sich per transform/opacity ausdehnt – statt box-shadow
   zu animieren (das malte den Knopf in jedem Frame neu) */
.btn.pulse { position: relative; }
.btn.pulse::after { content: ''; position: absolute; inset: -1.5px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 4px rgba(228,165,60,.7); opacity: 0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0; transform: scale(1); } 15% { opacity: 1; transform: scale(1); } 60% { opacity: 0; transform: scale(1.06, 1.18); } }
.icon-btn {
  width: var(--tap); height: var(--tap); flex: none; border-radius: 12px; border: none; background: rgba(255,255,255,.08);
  color: inherit; font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 0; }

/* ---------- Lobby ---------- */
.lobby { max-width: 1100px; margin: 0 auto; padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(16px + var(--safe-b)) calc(12px + var(--safe-l)); }
.lobby-head { display: flex; align-items: center; gap: 14px; color: #fbf3e4; padding: 6px 4px 14px; }
.lobby-head .logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.lobby-head h1 { font-size: 30px; letter-spacing: .3px; }
.lobby-head p { margin: 2px 0 0; opacity: .85; font-size: 15px; }
.lobby-grid { display: grid; gap: 12px; }
.col { display: grid; gap: 12px; align-content: start; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.card h2 { font-size: 19px; margin-bottom: 10px; }
.card-label { display: block; font-weight: 650; margin-bottom: 6px; }
.card p { margin: 0 0 10px; }
.input {
  width: 100%; min-height: var(--tap); border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  padding: 10px 12px; font-size: 18px; outline: none;
}
.input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(228,165,60,.3); }
.input.ok { border-color: var(--ok); background: #f3fbf6; }
.input.bad { border-color: var(--bad); background: #fff5f4; }
.input.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game {
  border: 1.5px solid var(--line); background: #fffaf2; border-radius: 14px; padding: 12px 10px 12px; display: flex;
  flex-direction: column; align-items: center; gap: 6px; min-height: 150px; text-align: center;
}
.game:active { transform: scale(.98); }
/* n9: jede Kachel rechnet und malt für sich (Effekte/Animationen lösen keine Neuberechnung der ganzen Lobby aus).
   content-visibility: auto bewusst nicht: die geschätzte Höhe ließ im Querformat den Scrollbalken springen
   (1884 → 1819 px beim Durchscrollen), bei 16 Kacheln spart es kaum etwas */
.games > .game { contain: layout paint style; }
.game .mini { width: 74px; height: 74px; border-radius: 10px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.game-t { font-weight: 750; font-size: 19px; }
.game-sub { font-size: 13.5px; color: var(--muted); }
.wordfields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wordfields .input { padding: 10px 8px; text-align: center; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 8px; margin: 10px 0; }
.chip { min-height: 44px; min-width: 48px; padding: 8px 14px; border-radius: 22px; border: 1.5px solid #c7b89f; background: #fff; font-weight: 600; }
.resume-list { display: grid; gap: 8px; }
.resume-item { display: flex; gap: 6px; align-items: stretch; }
.resume-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: #fffaf2; padding: 8px 10px; min-height: 64px; }
.resume-main .mini { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.resume-text { display: flex; flex-direction: column; min-width: 0; }
.resume-t { font-weight: 700; }
.resume-sub, .resume-meta { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-item .icon-btn { background: transparent; color: var(--muted); font-size: 18px; }
.lobby-foot { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: center; color: #e9dcc6; padding: 14px 0 4px; }
.lobby-foot .btn.link { color: #f4e7d1; }
.version { font-size: 13px; opacity: .7; }

/* ---------- Blätter (Dialoge) ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 18, 14, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s; }
.sheet-wrap.out { opacity: 0; transition: opacity .18s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(560px, 100%); max-height: 92dvh; overflow: auto; background: var(--card); border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(18px + var(--safe-b)); box-shadow: 0 -8px 30px rgba(0,0,0,.35); animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -10px; background: var(--card); padding: 6px 0; z-index: 1; }
.sheet-head h2 { font-size: 21px; }
.sheet-head .icon-btn { background: var(--card-2); font-size: 18px; }
.sheet-body { display: grid; gap: 12px; }
.sheet-body ul { margin: 0; padding-left: 20px; }
.sheet-body li { margin: 4px 0; }
.field-label { font-weight: 650; margin-bottom: 6px; }
.seg { display: flex; gap: 6px; background: var(--card-2); padding: 4px; border-radius: 14px; }
.seg-btn { flex: 1; min-height: var(--tap); border: none; border-radius: 11px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; }
.seg-btn.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); font-weight: 700; }
.seg-t { font-weight: 650; }
.seg-sub { font-size: 12.5px; color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; min-height: 56px; border: 1.5px solid var(--line); border-radius: 14px; background: #fffaf2; padding: 8px 12px; width: 100%; }
.sw-text { display: flex; flex-direction: column; }
.sw-label { font-weight: 650; }
.sw-sub { font-size: 13.5px; color: var(--muted); }
.sw-knob { width: 50px; height: 30px; border-radius: 15px; background: #cdbfa8; position: relative; flex: none; transition: background .15s; }
.sw-knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch.on .sw-knob { background: var(--ok); }
.switch.on .sw-knob::after { transform: translateX(20px); }
.bot-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.bot-row .btn { min-width: 96px; min-height: 56px; }
.menu-item { min-height: 54px; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; padding: 0 6px; font-weight: 600; font-size: 17.5px; }
.rules h3 { font-size: 19px; margin: 6px 0 6px; }
.rules h4 { font-size: 16px; margin: 10px 0 4px; }
.rules p { margin: 4px 0; }

/* ---------- Hinweise ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; }
.toast { pointer-events: auto; border: none; font: inherit; text-align: center; min-height: 48px; background: rgba(30, 22, 14, .94); color: #fff; padding: 11px 18px; border-radius: 14px; max-width: 92vw; font-size: 16.5px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.3); transition: opacity .35s, transform .35s; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
/* am Tisch: Meldungen oben über der Titelleiste, damit sie nie die Spielknöpfe unten verdecken (Antippen schließt) */
body[data-screen='table'] .toasts { bottom: auto; top: calc(4px + var(--safe-t)); }
body[data-screen='table'] .toast { max-width: min(92vw, 560px); }
@media (orientation: landscape) { body[data-screen='table'] .toasts { left: 50%; } body[data-screen='table'] .toast { max-width: 46vw; } }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Tisch ---------- */
.table-screen {
  height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fbf3e4;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}
.tbar { display: flex; align-items: center; gap: 6px; padding: 4px 6px; min-height: 56px; }
.tb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tb-game { font-weight: 750; font-size: 19px; }
.tb-var { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  min-height: var(--tap); padding: 6px 12px 6px 26px; border-radius: 24px; border: none; background: rgba(0,0,0,.25); color: #fbf3e4;
  font-size: 14px; font-weight: 600; position: relative; white-space: nowrap;
}
.pill::before { content: ''; position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #9aa; }
.pill[data-net='direkt']::before { background: #3fd08c; box-shadow: 0 0 8px #3fd08c; }
.pill[data-net='relay']::before { background: #f2b53c; box-shadow: 0 0 8px #f2b53c; }
.pill[data-net='getrennt']::before { background: #ef5b4f; box-shadow: 0 0 8px #ef5b4f; }
.pill[data-net='wartet']::before { background: #cfd6d2; animation: blink 1.2s infinite; }
.pill[data-net='lokal'] { padding-left: 12px; }
.pill[data-net='lokal']::before { display: none; }
@keyframes blink { 50% { opacity: .25; } }
.tmain { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; padding: 0 4px; }
/* Hochformat: Brett so breit wie möglich, Spielerleisten direkt darüber/darunter */
.board-wrap { position: relative; flex: 0 1 auto; width: 100%; aspect-ratio: 1 / 1; min-height: 0; }
.board-wrap > svg.board { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
.pbar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; margin: 4px 2px; min-height: 52px; border: 2px solid transparent; position: relative; isolation: isolate; contain: layout style; }
/* n9 (nur Compositor): Grundfläche (::after) und aktive Fläche mit Rahmen (::before) als eigene Ebenen, der Wechsel
   ist eine Überblendung per opacity – vorher liefen background/border-color als Übergang und malten den Balken neu */
.pbar::before, .pbar::after { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; pointer-events: none; transition: opacity .2s; }
.pbar::after { background: rgba(0,0,0,.18); }
.pbar::before { background: rgba(228,165,60,.22); border: 2px solid rgba(240,190,90,.85); opacity: 0; }
.pbar.active::before { opacity: 1; }
.pbar.active::after { opacity: 0; }
.pbar.multi::before, .pbar.multi::after { display: none; }
.stone-ico { width: 26px; height: 26px; flex: none; }
.pb-text { flex: 1; min-width: 0; }
.pb-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sub { font-size: 13.5px; opacity: .85; }
.pb-score { font-weight: 800; font-size: 20px; min-width: 32px; text-align: right; }
.tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; margin-left: 6px; vertical-align: 2px; }
.tag.off { background: rgba(239,91,79,.25); color: #ffd4cf; }
.tside { padding: 2px 10px 8px; display: flex; flex-direction: column; gap: 6px; contain: layout style; }
.side-players { display: none; }
.status { font: inherit; color: inherit; background: none; border: none; padding: 2px 8px; border-radius: 10px; font-size: 19px; font-weight: 750; text-align: center; min-height: 48px; cursor: pointer; }
.status:active { background: rgba(0,0,0,.15); }
.status-i { font-size: .72em; opacity: .55; margin-left: 6px; font-weight: 600; vertical-align: 1px; }
.status[data-state='over'] { color: #ffd98a; }
.hint { font-size: 14.5px; text-align: center; opacity: .88; min-height: 20px; }
.offer-box .btn { color: var(--ink); }
.netwarn { display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(239, 91, 79, .22); border: 1.5px solid rgba(239, 91, 79, .6); border-radius: 12px; padding: 4px 10px; font-weight: 650; }
.offer-box { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.1); border-radius: 12px; padding: 6px 10px; }
.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.actions .btn { flex: 1 1 0; max-width: 220px; background: rgba(255,250,242,.95); color: var(--ink); }
.actions .btn.primary { background: linear-gradient(#f0b54c, var(--accent-2)); }
.actions .muted { color: #e8dcc8; }
.moves-box { display: none; }
.movelist { margin: 0; padding: 0 0 0 34px; max-height: 100%; overflow: auto; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.movelist .mv { padding: 1px 0; }
.movelist .stone-ico { width: 13px; height: 13px; vertical-align: -1px; margin-right: 6px; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; z-index: 5; background: rgba(12, 28, 21, .35); border-radius: 14px; }
.ov-card { background: var(--card); color: var(--ink); border-radius: 18px; padding: 16px; width: min(420px, 100%); max-height: 100%; overflow: auto; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: grid; gap: 10px; }
.ov-card h2 { font-size: 22px; }
.ov-card p { margin: 0; }
.words-big { display: grid; gap: 6px; }
.word-big { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 2px solid #e2d3b9; border-radius: 14px; padding: 6px 10px; }
.word-n { font-size: 15px; font-weight: 700; color: var(--muted); width: 22px; height: 22px; border-radius: 11px; background: var(--card-2); display: inline-flex; align-items: center; justify-content: center; }
.word-t { font-size: 34px; font-weight: 800; letter-spacing: .5px; }

/* SVG-Brett */
.board .last-sq { fill: rgba(255, 214, 90, .34); }
.board .last-from, .board .last-to { fill: none; stroke: rgba(255, 196, 60, .95); stroke-width: 6; }
.board .last-from { stroke-dasharray: 10 8; }
.board .last-path { stroke: rgba(255, 196, 60, .8); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 3 14; }
.board .last-cap { stroke: rgba(200, 40, 30, .8); stroke-width: 8; stroke-linecap: round; fill: none; }
.board .mill-line { stroke: rgba(255, 220, 90, .75); stroke-width: 22; stroke-linecap: round; }
.board .hint-dot { fill: rgba(40, 175, 105, .9); stroke: #fff; stroke-width: 4; }
.board .hint-dot.soft { fill: rgba(40, 175, 105, .42); stroke: rgba(255,255,255,.55); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transform: scale(.72); }
.board .hint-can { fill: none; stroke: rgba(40, 175, 105, .75); stroke-width: 5; stroke-dasharray: 8 8; }
.board .hint-sel { fill: rgba(255, 224, 120, .2); stroke: #ffd24a; stroke-width: 8; }
.board .hint-take { fill: none; stroke: #e5483b; stroke-width: 8; animation: take 1s ease-in-out infinite; }
/* n9: Puls nur über opacity (Strichstärke animieren hieß SVG-Layout und Neumalen in jedem Frame) */
.board .hint-x { stroke: #e5483b; stroke-width: 9; stroke-linecap: round; fill: none; }
@keyframes take { 50% { opacity: .4; } }
.board .ghost { opacity: .6; }
.board .pc.dim { opacity: .35; }
.board .coord { fill: rgba(255, 236, 206, .85); font: 700 21px system-ui, sans-serif; text-anchor: middle; }
.board .sqnum { fill: rgba(255, 245, 225, .5); font: 600 17px system-ui, sans-serif; }
/* n9: will-change setzt svg.js nur, solange ein Stein/eine Karte animiert wird (nicht dauerhaft auf allen) */

/* ---------- Querformat (Handy quer, Tablet, Desktop) ---------- */
@media (orientation: landscape) {
  .lobby-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .lobby-head { padding-bottom: 8px; }
  .table-screen {
    grid-template-columns: minmax(0, auto) minmax(260px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: 'main bar' 'main side';
    column-gap: 10px;
  }
  .tbar { grid-area: bar; padding-top: 6px; }
  .tmain { grid-area: main; flex-direction: row; width: min(100dvh - var(--safe-t) - var(--safe-b), 64vw); padding: 2px 0 2px 2px; }
  .tmain .pbar { display: none; }
  .board-wrap { height: 100%; width: auto; flex: 1 1 auto; aspect-ratio: auto; }
  .tside { grid-area: side; overflow: auto; padding: 0 10px 10px 0; }
  .side-players { display: flex; flex-direction: column; gap: 0; }
  .status { text-align: left; }
  .hint { text-align: left; }
  .actions { justify-content: flex-start; }
  .moves-box { display: flex; flex-direction: column; min-height: 0; flex: 1; background: rgba(0,0,0,.14); border-radius: 12px; padding: 6px 8px; }
  .moves-h { font-size: 13px; font-weight: 700; opacity: .7; margin-bottom: 2px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 20px; max-height: 94dvh; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tbar { min-height: 50px; }
  .pbar { min-height: 48px; padding: 4px 8px; }
  .status { font-size: 17px; }
  .lobby-head .logo { width: 44px; height: 44px; }
  .lobby-head h1 { font-size: 24px; }
  .word-t { font-size: 28px; }
  .ov-card { padding: 12px; gap: 8px; }
}
@media (min-width: 900px) and (orientation: landscape) {
  .tmain { width: min(100dvh - 8px, 60vw); }
}

/* Schach */
.board .check-glow { fill: rgba(230, 50, 40, .55); filter: blur(6px); }
.board .hint-capture { fill: none; stroke: rgba(40, 175, 105, .9); stroke-width: 9; }
.board .hint-selsq { fill: rgba(255, 224, 120, .45); }
.board .promo-veil { fill: rgba(10, 20, 15, .45); }
.board .promo-bg { fill: #f6ecd8; stroke: #b8862c; stroke-width: 5; }
.menu-item[data-game] { font-weight: 700; }
img.stone-ico { object-fit: contain; }

/* Kein versehentlicher Zoom: Doppeltipp-Zoom aus, Scroll-Container nur senkrecht, Eingaben ≥ 16 px (sonst zoomt iOS) */
button, .btn, .game, .chip, .seg-btn, .switch, .menu-item, .icon-btn, .pill, .card-el, a { touch-action: manipulation; }
html, body, .screen, .sheet, .ov-card, .movelist, .tside, .sheet-body, .lobby { touch-action: pan-y; }
input, select, textarea { font-size: max(16px, 1em); }
.board .coord-in { font: 700 19px system-ui, sans-serif; }
.board .coord-in.on-light { fill: rgba(92, 58, 32, .85); }
.board .coord-in.on-dark { fill: rgba(250, 232, 205, .85); }

/* Kartentisch */
.board .felt { fill: #1d5a3f; stroke: rgba(0,0,0,.35); stroke-width: 4; }
.board-cards .card.dim { opacity: .5; }
/* Kartenbild = <image> (Einzeldatei) oder <svg class=card-face> (Atlas, n9): Leuchten am Ausschnitt, nicht am ganzen Atlas */
.board-cards .card.sel > image, .board-cards .card.sel > .card-face, .board-cards .card.sel > rect:last-of-type { filter: drop-shadow(0 0 10px #ffd24a); }
.board-cards .card.done { opacity: .82; }
.board .card-rank { font-family: Georgia, 'Times New Roman', serif; font-weight: 800; text-anchor: middle; }
.board .card-fig { font-family: Georgia, serif; font-weight: 800; text-anchor: middle; }
.board .card-name { font-family: system-ui, sans-serif; font-weight: 700; text-anchor: middle; fill: #5a4a35; }
.board .card-count { font: 700 30px system-ui, sans-serif; fill: rgba(255,245,225,.9); text-anchor: middle; }
.board .atout-label { font: 800 32px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; }
.board .trick-label { font: 700 30px system-ui, sans-serif; fill: rgba(255,245,225,.92); text-anchor: middle; }
.board .closed-bar { stroke: #ffd24a; stroke-width: 10; stroke-linecap: round; }
.board .end-card { fill: rgba(251,246,234,.96); stroke: #b8862c; stroke-width: 4; }
.board .end-title { font: 800 40px system-ui, sans-serif; fill: #3a2515; text-anchor: middle; }
.board .end-sub { font: 600 30px system-ui, sans-serif; fill: #5a4a35; text-anchor: middle; }
.fair-badge { align-self: center; border: none; background: rgba(63, 208, 140, .18); color: #c9f5dc; border-radius: 12px; min-height: 48px; padding: 4px 14px; font-weight: 650; font-size: 14.5px; }
.fair-badge.bad { background: rgba(239, 91, 79, .25); color: #ffd4cf; }
.fair-badge.hidden { display: none; }
table.bummerl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.bummerl td, table.bummerl th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.bummerl .bt-num { text-align: right; width: 22%; }
table.bummerl .bt-head td { font-weight: 800; background: var(--card-2); }

/* Backgammon */
.board .pt-a { fill: #8b2f24; }
.board .pt-b { fill: #efe2c4; stroke: rgba(80,50,20,.25); stroke-width: 1.5; }
.board .pt-target { fill: rgba(60, 200, 120, .45); }
.board .pt-num { font: 700 20px system-ui, sans-serif; fill: rgba(70, 40, 15, .7); text-anchor: middle; dominant-baseline: middle; }
.board .stack-n { font: 800 26px system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }
.board .stack-n.on-w { fill: #5a3a1a; }
.board .stack-n.on-b { fill: #f3e3c0; }
.board .die-face { fill: #fffdf6; stroke: #3a2515; stroke-width: 2.5; }
.board .die-pip { fill: #1f140c; }
.board .die.used .die-face { fill: #b9ad97; }
.board .die.used .die-pip { fill: #6d6252; }
.board .cube-face { fill: #f6ecd8; stroke: #8a6412; stroke-width: 3; }
.board .cube-n { font: 800 24px system-ui, sans-serif; fill: #3a2515; text-anchor: middle; dominant-baseline: middle; }
.table-screen[data-game='backgammon'] .board-wrap { aspect-ratio: 640 / 1000; }
.actions .btn[disabled] { opacity: .5; }
@media (orientation: landscape) {
  .table-screen[data-game='backgammon'] { grid-template-columns: minmax(0, auto) minmax(240px, 1fr); }
  .table-screen[data-game='backgammon'] .tmain { width: min((100dvh - var(--safe-t) - var(--safe-b)) * 1.5625, 72vw); }
  .table-screen[data-game='backgammon'] .board-wrap { aspect-ratio: auto; }
}
@media (orientation: portrait) {
  .table-screen[data-game='backgammon'] .tmain .pbar { min-height: 44px; padding: 2px 10px; margin: 2px; }
  .table-screen[data-game='backgammon'] .tmain .pbar .pb-sub { display: inline; margin-left: 8px; }
  .table-screen[data-game='backgammon'] .tmain .pbar .pb-name { display: inline; }
  .table-screen[data-game='backgammon'] .hint { min-height: 0; font-size: 13.5px; }
}
.tb-title { min-width: 0; overflow: hidden; }
.tb-game { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar .pill { max-width: 48%; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }

/* mehr als zwei Plätze: kompakte Spielerliste */
.pbar.multi { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; min-height: 0; background: none; border: none; }
.pchip { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 12px; background: rgba(0,0,0,.18); min-height: 48px; border: 2px solid transparent; min-width: 0; }
.pchip.active { background: rgba(228,165,60,.22); border-color: rgba(240,190,90,.85); }
.pchip .pb-name { font-size: 14.5px; }
.pchip .pb-sub { font-size: 12.5px; }
.pchip .stone-ico { width: 22px; height: 22px; }
@media (orientation: landscape) { .side-players .pbar.multi { grid-template-columns: 1fr; } }

/* Blackjack */
.board .bj-arc { fill: none; stroke: rgba(255, 230, 170, .35); stroke-width: 3; }
.board .bj-rule { font: 700 21px system-ui, sans-serif; fill: rgba(255, 230, 170, .55); text-anchor: middle; letter-spacing: 1px; }
.board .bj-label { font: 800 30px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; }
.board .bj-sub { font: 600 25px system-ui, sans-serif; fill: rgba(255, 245, 225, .85); text-anchor: middle; }
.board .bj-spot { fill: rgba(0,0,0,.18); stroke-width: 4; stroke-dasharray: 8 6; }
.board .bj-bet { font: 800 30px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; }
.board .bj-active { fill: rgba(255, 210, 74, .18); stroke: #ffd24a; stroke-width: 5; }
.board .bj-badge { stroke: rgba(0,0,0,.35); stroke-width: 2; }
.board .bj-badge.plus { fill: #2e9e57; }
.board .bj-badge.minus { fill: #b83a30; }
.board .bj-badge.even { fill: #6d6252; }
.board .bj-badge-t { font: 800 24px system-ui, sans-serif; fill: #fff; text-anchor: middle; }
.bet-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; width: 100%; }
.bet-row .btn { flex: 1 1 48px; min-width: 48px; max-width: 90px; padding: 6px 4px; }
.bet-t { font-weight: 700; width: 100%; text-align: center; }
@media (orientation: landscape) { .bet-t { text-align: left; } }
@media (orientation: landscape) { .tmain .pbar.multi { display: none; } }
@media (orientation: landscape) {
  .side-players .pbar.multi { grid-template-columns: 1fr 1fr; }
  .side-players .pchip { min-height: 40px; padding: 2px 6px; }
  .side-players .pchip .pb-name { font-size: 13.5px; }
  .side-players .pchip .pb-sub { font-size: 11.5px; }
}

/* Stern-Halma */
.board .hole { fill: rgba(60, 35, 15, .55); }
.board .hs-sym { font: 800 42px system-ui, sans-serif; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 3; }
.board .hint-dot.far { fill: rgba(40, 175, 105, .75); }
.board-wrap.zoom { overflow: auto; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.board-wrap.zoom > svg.board { width: 190%; height: 190%; }
/* n10 E2: Ziehen – das Brett gehört dem Finger (kein Scrollen über dem Brett), in der Lupe darf weiter geschoben werden */
.board-wrap > svg.board.drag-on { touch-action: none; }
.board-wrap.zoom > svg.board.drag-on { touch-action: pan-x pan-y; }
.board .drag-src { opacity: .35; }
.board .drag-fly { pointer-events: none; will-change: transform; filter: drop-shadow(0 14px 10px rgba(0, 0, 0, .35)); }

/* Wer gewinnt? */
.evalbar { position: absolute; left: 0; top: 6%; bottom: 6%; width: 7px; border-radius: 4px; background: #2b2320; overflow: hidden; z-index: 3; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.evalbar .evalfill { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: #f3ead8; transform-origin: 50% 100%; transform: scaleY(.5); transition: transform .4s ease; }
.evalbar.hidden, .eval-btn.hidden { display: none; }
.eval-btn { align-self: center; border: none; background: rgba(0,0,0,.2); color: #fbf3e4; border-radius: 12px; min-height: 48px; padding: 4px 14px; font-weight: 650; font-size: 14.5px; font-variant-numeric: tabular-nums; }
@media (orientation: landscape) { .eval-btn, .fair-badge { align-self: flex-start; } }
.status-row { display: flex; flex-direction: column; align-items: center; gap: 4px; }
@media (orientation: landscape) {
  .status-row { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .status-row .eval-btn { padding: 2px 10px; font-size: 13.5px; }
}
@media (orientation: portrait) {
  .table-screen[data-game='backgammon'] .hint { display: none; }
  .table-screen[data-game='backgammon'] .status-row { flex-direction: row; justify-content: center; gap: 10px; }
  .table-screen[data-game='backgammon'] .status { font-size: 17px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .table-screen[data-game='halma'] .hint, .table-screen[data-game='blackjack'] .hint { display: none; }
  .side-players .pchip { min-height: 38px; }
}
.eval-btn.pending { visibility: hidden; }

/* ---------- n3: Banner, Ereignisse, Stichstapel, Stich-Blatt ---------- */
.banner {
  position: fixed; z-index: 40; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6px 14px; border: 2px solid #f0c04d; border-radius: 14px; background: #2b1c0d; color: #fff6dd;
  font: inherit; font-size: 19px; font-weight: 800; line-height: 1.2; box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer;
}
.banner.hidden { display: none; }
.banner.pop { animation: banner-pop .35s ease-out; }
@keyframes banner-pop { from { transform: scale(.92); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } }
@media (orientation: landscape) and (max-height: 520px) { .banner { font-size: 17px; } }
.eventlist { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.eventlist li { font-size: 17px; }
.eventlist .ev-t { font-weight: 650; }
.eventlist .ev-ago { color: var(--muted); font-size: 13.5px; margin-left: 8px; white-space: nowrap; }
.board .pile-label { font: 700 26px system-ui, sans-serif; fill: rgba(255,245,225,.92); text-anchor: middle; }
.board .pile-tap { font: 400 40px system-ui, sans-serif; text-anchor: middle; opacity: .9; }
.board .pile-empty { fill: rgba(0,0,0,.12); stroke: rgba(255,245,225,.45); stroke-width: 3; stroke-dasharray: 10 8; }
.board .pile-me { cursor: pointer; }
.stichblatt { display: grid; gap: 10px; }
.sb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sb-trick { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(0,0,0,.05); }
.sb-nr { font-weight: 800; min-width: 26px; text-align: right; }
.sb-cards { display: flex; gap: 6px; }
.sb-card { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.sb-card img { width: 60px; height: 96px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.sb-card.lead img { outline: 3px solid #e4a53c; outline-offset: 1px; }
.sb-lead { font-size: 11.5px; font-weight: 700; color: #9a6410; margin-top: 2px; }
.sb-who { font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.sb-augen { font-weight: 750; }
.sb-ansagen, .sb-sum { margin: 0; font-size: 16px; }

/* ---------- n4: Ludo ---------- */
.board .ld-field { fill: #fbf3e2; stroke: rgba(60, 35, 15, .7); stroke-width: 4; }
.board .ld-field.start { stroke: rgba(0,0,0,.55); stroke-width: 5; }
.board .ld-goal { stroke: rgba(0,0,0,.45); stroke-width: 4; opacity: .85; }
.board .ld-home { stroke: rgba(0,0,0,.45); stroke-width: 4; fill-opacity: .55; }
.board .ld-sym { font: 800 34px system-ui, sans-serif; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.4); stroke-width: 3; pointer-events: none; }
.board .ld-die .die.blank .die-face { fill: rgba(255, 253, 246, .65); }
.board .ld-die-q { font: 800 40px system-ui, sans-serif; fill: #5a3a1a; text-anchor: middle; }
.board .ld-tries { font: 800 34px system-ui, sans-serif; fill: #5a3a1a; text-anchor: middle; }
.board .ld-arrow { stroke: rgba(40, 175, 105, .65); stroke-width: 7; stroke-dasharray: 4 12; stroke-linecap: round; }
.board .ld-die.can { cursor: pointer; }

/* ---------- n4: Vier in einer Reihe ---------- */
.board .v4-plate { fill: #2459b8; stroke: #163a7c; stroke-width: 4; }
.board .v4-rim { fill: none; stroke: rgba(8, 22, 60, .55); stroke-width: 5; }
.board .v4-col { fill: rgba(255, 224, 120, .16); stroke: #ffd24a; stroke-width: 5; }
.board .v4-arrow { fill: rgba(255, 245, 225, .55); }
.board .v4-last { fill: rgba(255,255,255,.85); stroke: rgba(0,0,0,.4); stroke-width: 3; }
.board .v4-win { fill: none; stroke: #fff6c8; stroke-width: 9; }
/* n9: die ganze Gewinnreihe pulsiert als eine Gruppe (ein animiertes Element statt bis zu zwölf) */
.board .v4-win-line { animation: take 1s ease-in-out infinite; }
.board .v4-stone.hover { opacity: .92; }

/* ---------- n4: Reversi ---------- */
.board .rv-felt { fill: #2f7a4a; }
.board .rv-line { stroke: rgba(10, 40, 20, .75); stroke-width: 3; }
.board .rv-dot { fill: rgba(10, 40, 20, .8); }
.board .rv-coord { font: 700 17px system-ui, sans-serif; fill: rgba(230, 255, 235, .55); }
.board .rv-coord.end { text-anchor: end; }

/* ---------- n4: Würfelglück (Würfel + Block als HTML im Brett-Bereich) ---------- */
.table-screen[data-game='wuerfel'] .board-wrap { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.board-wrap > .wg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; touch-action: pan-y;
  background: #1d5a3f; border-radius: 16px; padding: 8px; border: 6px solid #5d2a18; color: #fbf3e4; box-shadow: 0 8px 16px rgba(0,0,0,.4); }
.wg-top { display: flex; flex-direction: column; gap: 2px; }
.wg-dice { display: flex; gap: 6px; justify-content: center; }
.wg-die { flex: 0 1 64px; min-width: 50px; aspect-ratio: 1; padding: 0; border: 3px solid transparent; border-radius: 16px; background: none; position: relative; touch-action: manipulation; }
.wg-die .wg-face { width: 100%; height: 100%; display: block; }
.wg-die .die-face { fill: #fffdf6; stroke: #3a2515; stroke-width: 3; }
.wg-die .die-pip { fill: #1f140c; }
.wg-die.blank .die-face { fill: rgba(255,253,246,.35); }
.wg-die.held { border-color: #ffd24a; background: rgba(255, 210, 74, .25); transform: translateY(3px); }
.wg-hold { position: absolute; left: 0; right: 0; bottom: -2px; font-size: 10.5px; font-weight: 800; color: #3a2515; background: #ffd24a; border-radius: 0 0 12px 12px; line-height: 14px; }
.wg-hold:empty { display: none; }
.wg-info { text-align: center; font-size: 13.5px; opacity: .85; min-height: 18px; }
.wg-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; align-content: start; }
.wg-col { display: flex; flex-direction: column; gap: 4px; }
.wg-cat { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 48px; padding: 2px 8px; border-radius: 10px; border: 2px solid rgba(255,255,255,.12);
  background: rgba(255, 250, 240, .1); color: #fbf3e4; font: inherit; font-size: 14.5px; text-align: left; touch-action: manipulation; }
.wg-cat.done { background: rgba(0,0,0,.18); color: rgba(251,243,228,.75); }
.wg-cat.done .wg-val { font-weight: 800; color: #fff; }
.wg-cat.can { background: rgba(255, 250, 240, .92); color: #2b1c0d; border-color: rgba(40, 175, 105, .6); }
.wg-cat.can .wg-val { color: #1c7c4a; font-weight: 800; }
.wg-cat.best { border-color: #2fbf71; box-shadow: 0 0 0 2px rgba(47, 191, 113, .45); }
.wg-cat.sel { border-color: #ffd24a; background: #ffe9a8; box-shadow: 0 0 0 3px rgba(255, 210, 74, .6); }
/* z-index: Überlagerung über dem Hintergrund, aber unter Text und Wert (wie vorher die Hintergrundfarbe) */
.wg-cat.just { position: relative; z-index: 0; }
.wg-cat.just::after { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: rgba(255, 210, 74, .7); pointer-events: none;
  opacity: 0; animation: wg-just 1.6s ease-out 2; }
@keyframes wg-just { 30% { opacity: 1; } }
.wg-cat[disabled] { opacity: 1; }
.wg-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-sum, .wg-total { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 13.5px; font-weight: 700; opacity: .9; }
.wg-total { grid-column: 1 / -1; font-size: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.wg-extra { text-align: center; font-weight: 800; color: #ffe08a; }
@media (orientation: landscape) {
  .table-screen[data-game='wuerfel'] .tmain { width: min(64vw, 620px); }
  .board-wrap > .wg { flex-direction: row; }
  .wg-top { flex: 0 0 auto; }
  .wg-dice { flex-direction: column; }
  .wg-die { flex: 0 0 auto; width: 58px; min-width: 0; }
  .wg-info { display: none; }
  .wg-sheet { flex: 1; }
  .wg-cat { min-height: 48px; font-size: 13.5px; }
}

/* ---------- n4: Schiffe versenken ---------- */
.table-screen[data-game='schiffe'] .board-wrap { aspect-ratio: 1000 / 1300; }
@media (orientation: landscape) {
  .table-screen[data-game='schiffe'] .tmain { width: min((100dvh - var(--safe-t) - var(--safe-b)) * 1.5, 70vw); }
  .table-screen[data-game='schiffe'] .board-wrap { aspect-ratio: auto; }
}
@media (orientation: portrait) {
  .table-screen[data-game='schiffe'] .tmain .pbar { min-height: 44px; padding: 2px 10px; margin: 2px; }
  .table-screen[data-game='schiffe'] .hint { min-height: 0; font-size: 13.5px; }
}
.board .sv-frame { fill: #5d2a18; }
.board .sv-sea { fill: #2a6f9e; }
.board .sv-line { stroke: rgba(255,255,255,.28); stroke-width: 2; }
.board .sv-lab { font: 700 30px system-ui, sans-serif; fill: rgba(255, 245, 225, .85); text-anchor: middle; }
.board .sv-ship { stroke-width: 3; }
.board .sv-ship.own { fill: #c9d1d8; stroke: #46525c; }
.board .sv-ship.sunk { fill: #5b4a44; stroke: #e5483b; stroke-width: 5; }
.board .sv-ship.pick { fill: #ffe9a8; stroke: #d39b12; stroke-width: 6; }
.board .sv-ship.bad { fill: #f2a097; stroke: #b8261a; stroke-width: 5; }
.board .sv-hit { fill: #e5483b; stroke: #fff3c4; stroke-width: 3; }
.board .sv-hit.sunk { fill: #8a2018; }
.board .sv-x { stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.board .sv-miss { fill: #f3f7fa; }
.board .sv-water { fill: rgba(255,255,255,.45); }
.board .sv-last { fill: none; stroke: #ffd24a; stroke-width: 5; }
.board .sv-aim circle { fill: rgba(255, 210, 74, .25); stroke: #ffd24a; stroke-width: 6; }
.board .sv-aim path { stroke: #ffd24a; stroke-width: 6; stroke-linecap: round; }
.board .sv-boom { fill: rgba(255, 170, 40, .7); }
.board .sv-splash { fill: none; stroke: #fff; stroke-width: 6; }
.board .sv-word { font: 900 120px system-ui, sans-serif; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(10, 30, 60, .7); stroke-width: 10; pointer-events: none; }
.board .sv-word.hit { fill: #ffd24a; }
.board .sv-word.small { font-size: 64px; stroke-width: 6; }
.board .sv-title { font: 800 30px system-ui, sans-serif; fill: #fbf3e4; }
.board .sv-title.mid, .board .sv-sub.mid { text-anchor: middle; }
.board .sv-sub { font: 600 26px system-ui, sans-serif; fill: rgba(251,243,228,.8); }
.board .sv-ico { fill: #c9d1d8; stroke: #46525c; stroke-width: 2; }
.board .sv-ico.gone { fill: #8a2018; stroke: #e5483b; opacity: .7; }
/* Kriegsschiffe (n8, nur Deko-Stufe 1/2): Tönung beim Aufstellen über der Silhouette, kleine Marken auf Wracks.
   Schaukeln: Web Animations aus view.js (Dünung), gedreht um die Schiffsmitte (transform-origin inline, Brett-Einheiten). */
.board .sv-tint { fill: rgba(255, 214, 90, .4); stroke: #ffd24a; stroke-width: .07; }
.board .sv-tint.bad { fill: rgba(229, 72, 59, .5); stroke: #c0281b; }
.board .sv-tint.pick.bad { stroke: #ffd24a; }
.board .sv-hit.sunk.n8 { fill: #8a2018; stroke: #ffcfa0; stroke-width: 2; opacity: .9; }
.board .sv-x.n8 { stroke-width: 3.5; }
.board .sv-rock, .board .sv-shd { transform-box: view-box; }
.handoff-note { font-weight: 750; color: #7a3a10; }
/* Hochformat: Spalte nie breiter als der Bildschirm (hohe Bretter wie Schiffe versenken schoben sie sonst auf) */
@media (orientation: portrait) { .table-screen { grid-template-columns: minmax(0, 1fr); } }

/* ---------- n4: Mau-Mau ---------- */
.board .mm-can { fill: rgba(255, 210, 74, .14); stroke: #ffd24a; stroke-width: 6; stroke-dasharray: 14 10; }
.board .mm-count { font: 800 30px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; }
.board .mm-mau { font: 900 34px system-ui, sans-serif; fill: #ffd24a; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.5); stroke-width: 5; }
.board .mm-badge { fill: #2b1c0d; stroke: #f0c04d; stroke-width: 4; }
.board .mm-badge.pen { fill: #8a2018; }
.board .mm-badge-t { font: 800 32px system-ui, sans-serif; fill: #fff6dd; text-anchor: middle; }
.board-cards .card.drawn > image, .board-cards .card.drawn > .card-face { filter: drop-shadow(0 0 12px #6fe3a4); }
.pbar.top.solo { display: none; }
table.wg-block td, table.wg-block th { padding: 3px 5px; font-size: 14px; }

/* ---------- n4: Paare finden ---------- */
.board .pa-back { fill: #2f6f8f; stroke: #1d4357; stroke-width: 4; }
.board .pa-back-in { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 3; stroke-dasharray: 10 8; }
.board .pa-q { font-weight: 800; fill: rgba(255,255,255,.4); text-anchor: middle; font-family: system-ui, sans-serif; }
.board .pa-face { fill: #fffaf0; stroke: #b8862c; stroke-width: 4; }
.board .pa-face.open { stroke: #ffd24a; stroke-width: 8; }
.board .pa-face.wrong { stroke: #e5483b; stroke-width: 8; }
.board .pa-emoji { text-anchor: middle; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.board .pa-card.found { opacity: .55; }
.board .pa-card { cursor: pointer; }

/* ---------- n6: Schach-Trainer ---------- */
.game.trainer-tile { background: linear-gradient(#fffaf2, #f3ead2); border-color: rgba(40, 140, 90, .45); }
.trainer { max-width: 760px; }
.tr-head { display: flex; align-items: center; gap: 10px; color: #fbf3e4; padding: 2px 0 12px; }
.tr-head h1 { font-size: 26px; }
.tr-head .icon-btn { color: #fbf3e4; font-size: 26px; }
.tr-cards { display: grid; gap: 12px; }
.tr-lead { color: #f1e6d2; margin: 0 2px; }
.tr-card { display: grid; gap: 10px; }
.tr-card-main { display: flex; gap: 14px; align-items: center; text-align: left; border: none; background: none; padding: 0; min-height: 80px; width: 100%; color: inherit; font: inherit; }
.tr-card-main .mini { width: 72px; height: 72px; flex: none; border-radius: 10px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.tr-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-card-t { font-weight: 800; font-size: 21px; }
.tr-card-sub { color: var(--muted); font-size: 14.5px; }
.tr-card-stat { font-weight: 650; font-size: 14.5px; color: #2f6f4f; }
.tr-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; text-align: left; border: none; border-top: 1px solid var(--line); background: none; padding: 8px 4px; font: inherit; color: inherit; }
.tr-row:active { background: rgba(0,0,0,.05); }
.tr-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tr-row-t { font-weight: 700; font-size: 17px; }
.tr-row-sub { font-size: 13.5px; color: var(--muted); }
.tr-badge { flex: none; font-size: 13px; font-weight: 750; padding: 3px 9px; border-radius: 10px; background: var(--card-2); color: var(--ink); white-space: nowrap; }
.tr-badge.new { background: #e8e1d3; color: var(--muted); }
.tr-badge.due { background: #f6d38b; color: #4a3005; }
.tr-badge.ok { background: #cfe9d9; color: #1d5a3f; }
.tr-badge.stars { font-size: 16px; letter-spacing: 1px; color: #b8862c; background: none; }
.tr-badge.stars.ok { color: #d79a1e; }
.tr-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.tr-big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-stat .btn { width: 100%; }
.tr-src { color: #e8dcc8; text-align: center; }
.tr-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; }
.tr-dl dt { color: var(--muted); }
.tr-dl dd { margin: 0; font-weight: 650; }
.tr-bar-row { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: center; font-size: 14px; margin-top: 4px; }
.tr-bar { height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.tr-bar > span { display: block; height: 100%; background: var(--ok); }
.trainer-board .tr-info { background: rgba(0,0,0,.16); border-radius: 12px; padding: 8px 12px; font-size: 15px; line-height: 1.4; max-height: 24dvh; overflow: auto; }
.trainer-board .tr-info.hidden { display: none; }
.trainer-board .tr-info p { margin: 0 0 4px; }
.trainer-board .tr-info .muted { color: #e2d6c1; }
.trainer-board .tr-status[data-state='ok'] { color: #8fe0b5; }
.trainer-board .tr-status[data-state='warn'] { color: #ffc2a8; }
.trainer-board .tr-status[data-state='over'] { color: #ffd98a; }
.trainer-board .status { cursor: default; }
.trainer-board .movelist .mv.on { color: #ffd98a; font-weight: 700; }
.trainer-board .actions .btn { min-width: 0; padding: 8px 10px; }
.board .arrow line { stroke: rgba(40, 175, 105, .82); stroke-linecap: round; }
.board .arrow polygon { fill: rgba(40, 175, 105, .9); }
.board .arrow.b line { stroke: rgba(45, 120, 210, .82); }
.board .arrow.b polygon { fill: rgba(45, 120, 210, .9); }
.board .arrow.hint line { stroke: rgba(240, 160, 30, .88); }
.board .arrow.hint polygon { fill: rgba(240, 160, 30, .95); }
.board .arrow { pointer-events: none; }
.board .mark-sq.hint { fill: rgba(255, 190, 40, .42); stroke: rgba(240, 160, 30, .95); stroke-width: 6; animation: take 1.2s ease-in-out infinite; }
@media (orientation: portrait) {
  .trainer-board .actions { flex-wrap: nowrap; }
  .trainer-board .actions .btn { font-size: 15px; }
}
@media (orientation: landscape) {
  .trainer-board .tr-info { max-height: none; }
}
.board .mark-sq.hint-to { fill: rgba(255, 190, 40, .18); stroke: rgba(240, 160, 30, .95); stroke-width: 6; stroke-dasharray: 14 10; }
@media (orientation: portrait) {
  .trainer-board .tmain { justify-content: flex-start; padding-top: 4px; }
  .trainer-board .tside { padding-top: 6px; }
}
.trainer-board .moves-box.empty { display: none; }
.trainer-board .movelist { list-style: none; padding-left: 4px; }

/* ---------- Texas Hold'em ---------- */
.board .he-room { fill: #23392f; }
.board .he-rail { fill: #4a2a17; stroke: #2a160b; stroke-width: 6; }
.board .he-felt { fill: #1f6045; stroke: #123b2a; stroke-width: 5; }
.board .he-line { fill: none; stroke: rgba(255, 236, 190, .16); stroke-width: 3; }
.board .he-blinds { font: 700 26px system-ui, sans-serif; fill: rgba(255, 236, 190, .62); text-anchor: middle; }
.board .he-slot { fill: rgba(0, 0, 0, .12); stroke: rgba(255, 236, 190, .22); stroke-width: 2.5; stroke-dasharray: 9 7; }
.board .he-pot-t { font: 800 34px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 4; }
.board .he-side-t { font: 700 24px system-ui, sans-serif; fill: rgba(255, 240, 210, .9); text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.4); stroke-width: 3; }
.board .he-amt { font: 800 28px system-ui, sans-serif; fill: #fff6e0; paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 4; }
.board .he-amt.big { font-size: 32px; }
.board .he-amt.left { text-anchor: end; }
.board .he-av { stroke: rgba(0,0,0,.45); stroke-width: 3; }
.board .he-av-t { font: 800 36px system-ui, sans-serif; fill: #fff; text-anchor: middle; }
.board .he-name { font: 750 30px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.5); stroke-width: 4; }
.board .he-stack { font: 800 30px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.5); stroke-width: 4; }
.board .he-seat.folded .he-av, .board .he-seat.folded .he-av-t { opacity: .45; }
.board .he-seat.out { opacity: .38; }
.board .he-turn { fill: rgba(255, 210, 74, .16); stroke: #ffd24a; stroke-width: 6; }
.board circle.he-turn { animation: he-pulse 1.4s ease-in-out infinite; }
@keyframes he-pulse { 50% { opacity: .45; } }
.board .he-seat.win .he-av { stroke: #ffd24a; stroke-width: 7; }
.board .he-label rect { fill: rgba(20, 14, 8, .82); stroke: rgba(255, 236, 190, .5); stroke-width: 2; }
.board .he-label text { font: 800 25px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; }
.board .he-label.aggr rect { fill: #8c3a1f; }
.board .he-label.fold text { fill: rgba(255, 246, 224, .6); }
.board .he-label.blind rect { fill: rgba(30, 60, 90, .85); }
.board .he-label.win rect { fill: #2e8b57; stroke: #ffd24a; }
.board .he-me-name { font: 800 34px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; }
.board .he-me-stack { font: 800 38px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; }
.board .he-me-label { font: 800 28px system-ui, sans-serif; fill: #fff6e0; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.5); stroke-width: 4; }
.board .he-me-label.win { fill: #9ff0bf; }
.board .he-me-label.fold { fill: rgba(255, 246, 224, .55); }
.board .he-me-label.help { fill: #cfe8ff; font-size: 26px; }
.board .he-me-label.aggr, .board .he-me-label.blind { fill: #ffd9a0; }
.board .he-me-empty { font: 700 30px system-ui, sans-serif; fill: rgba(255, 246, 224, .55); text-anchor: middle; }
.board .he-tag.allin { font: 900 28px system-ui, sans-serif; fill: #ff8a6a; text-anchor: middle; letter-spacing: 1px; }
.board .he-btn circle { fill: #fbf6ea; stroke: #6b5636; stroke-width: 3; }
.board .he-btn text { font: 900 24px system-ui, sans-serif; fill: #3a2515; text-anchor: middle; }
.board .he-clock { font: 900 30px system-ui, sans-serif; fill: #ffe7a8; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 5; }
.board .he-clock.low { fill: #ff8a6a; }
.board .he-end .end-sub.first { font-weight: 850; fill: #8a5a08; }
.board-holdem .card.dim { opacity: .45; }
.table-screen[data-game='holdem'] .pbar.multi { display: none; }
/* eigener Platz steht auf dem Tisch → keine eigene Leiste; Hochformat: höheres Brett (1000 × 1150) */
.table-screen[data-game='holdem'] .pbar.bottom { display: none; }
@media (orientation: portrait) {
  .table-screen[data-game='holdem'] .board-wrap { aspect-ratio: 1000 / 1150; }
  .table-screen[data-game='holdem'] .status { font-size: 17px; }
  .table-screen[data-game='holdem'] .tside { gap: 4px; }
  .table-screen[data-game='holdem'] .status-row { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
  .table-screen[data-game='holdem'] .eval-btn { padding: 2px 10px; font-size: 13.5px; }
}
/* Aktionsleiste */
.actions .he-bar { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.he-main { display: flex; gap: 6px; width: 100%; align-items: stretch; }
.actions .he-main .btn { flex: 1 1 0; max-width: none; min-height: 56px; padding: 4px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.he-act-t { font-weight: 800; font-size: 16.5px; white-space: nowrap; }
.he-act small { font-size: 11.5px; font-weight: 600; opacity: .7; }
.actions .he-quick .btn.he-x { flex: 0 0 48px; min-width: 48px; font-size: 18px; }
.he-raise { display: flex; flex-direction: column; gap: 6px; background: rgba(0,0,0,.22); border-radius: 14px; padding: 6px; }
.he-quick { display: flex; gap: 6px; }
.actions .he-quick .btn { flex: 1 1 0; max-width: none; min-height: 48px; padding: 2px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.he-q span { font-weight: 800; font-size: 15px; }
.he-q small { font-size: 11.5px; opacity: .75; }
.he-slide-row { display: flex; gap: 8px; align-items: center; }
.actions .he-slide-row .he-pm { flex: 0 0 48px; max-width: 48px; min-height: 48px; font-size: 24px; font-weight: 800; padding: 0; }
.he-slider { flex: 1; min-width: 0; height: 48px; accent-color: #f0b54c; touch-action: pan-x; }
.he-pre-row { display: flex; gap: 6px; width: 100%; }
.actions .he-pre { flex: 1 1 0; max-width: none; min-height: 48px; padding: 4px 8px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,.25); color: #fbf3e4; border: 2px solid rgba(255,255,255,.35); font-weight: 700; }
.actions .he-pre.on { background: rgba(240, 181, 76, .35); border-color: #f0b54c; }
.he-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.actions .he-show { max-width: none; width: 100%; }
/* Regeln: Hand-Rangliste */
.he-note { background: #fff3d6; border: 1.5px solid #e2c27a; border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.he-ranking { list-style: decimal; padding-left: 24px; display: grid; gap: 6px; margin: 6px 0; }
.he-ranking li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.he-rank-cards { display: flex; gap: 2px; flex: none; }
.he-rank-card { width: 30px; height: auto; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.he-rank-t { display: flex; flex-direction: column; line-height: 1.2; min-width: 120px; flex: 1; }
.he-rank-t span { font-size: 13.5px; color: var(--muted); }
.he-mini img { width: 30px; height: auto; margin-right: 2px; vertical-align: middle; border-radius: 3px; }
@media (orientation: landscape) and (max-height: 520px) {
  .actions .he-main .btn { min-height: 50px; }
  .table-screen[data-game='holdem'] .hint { font-size: 13px; min-height: 0; }
  .table-screen[data-game='holdem'] .tside { gap: 4px; }
  .table-screen[data-game='holdem'] .status { min-height: 48px; font-size: 16px; padding: 0 4px; }
  .he-raise { padding: 4px; gap: 4px; }
}

/* ===================================================================================================================
   Deko (Verschönerung 05.10.2026) – alles nur mit html.deko (src/ui/deko.js); ?deko=0 zeigt das alte Aussehen.
   Statisches liegt in eigenen Ebenen (einmal gerastert), Effekte laufen nur kurz, keine Dauer-Animation im Leerlauf.
   =================================================================================================================== */
/* Tisch-Umgebung: grüner Filz mit warmem Licht von oben und dunklem Rand – eigene, feste Ebene (kein Neuzeichnen beim Scrollen) */
html.deko body { background: #133526; }
#deko-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; will-change: transform;
  background:
    radial-gradient(85% 52% at 50% 30%, rgba(255, 226, 160, .17), rgba(255, 226, 160, 0) 72%),
    radial-gradient(150% 115% at 50% 42%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .52) 100%),
    var(--deko-noise, linear-gradient(transparent, transparent)) 0 0 / 160px 160px repeat,
    linear-gradient(180deg, #2b5f46 0%, #1e4b36 46%, #11301f 100%); }
#deko-bg[hidden] { display: none; }
@media (orientation: landscape) {
  #deko-bg { background:
    radial-gradient(60% 75% at 36% 45%, rgba(255, 226, 160, .16), rgba(255, 226, 160, 0) 72%),
    radial-gradient(120% 140% at 45% 50%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .52) 100%),
    var(--deko-noise, linear-gradient(transparent, transparent)) 0 0 / 160px 160px repeat,
    linear-gradient(180deg, #2b5f46 0%, #1e4b36 46%, #11301f 100%); }
}

/* Bretter in Ebenen: statische Ebene darunter (Holz, Filz, Licht, gebackener Schatten), Brett mit den Steinen,
   ggf. Ebene darüber (Vier in einer Reihe: die Platte). Kein CSS-Filter mehr am Brett (Schatten ist gebacken). */
html.deko .board-wrap { isolation: isolate; }
html.deko .board-wrap > svg.deko-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; filter: none; will-change: transform; }
html.deko .board-wrap > svg.deko-under { z-index: -1; }
html.deko .board-wrap > svg.deko-over { z-index: 1; }
html.deko .board-wrap > svg.board.deko-main { filter: none; will-change: transform; }
html.deko .board-wrap.zoom > svg.deko-layer { width: 190%; height: 190%; }

/* Effekt-Leinwand: über dem Brett, unter Bannern/Meldungen/Blättern, nimmt nie Tipps an */
canvas.deko-fx { position: fixed; left: 0; top: 0; z-index: 35; pointer-events: none; }
canvas.deko-fx[hidden] { display: none; }

/* Spielerleisten: leicht gläsern, aktive Leiste mit warmem Schein (ruhig, ohne Pulsieren) */
html.deko .pchip, html.deko .pbar::after { background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(0,0,0,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.22); }
html.deko .pbar.multi { background: none; box-shadow: none; }
html.deko .pbar::before, html.deko .pchip.active { background: linear-gradient(180deg, rgba(240,190,90,.3), rgba(160,110,30,.2)); box-shadow: inset 0 1px 0 rgba(255,236,190,.25), 0 0 14px rgba(240,190,90,.35), 0 2px 6px rgba(0,0,0,.25); }
html.deko .stone-ico { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.45)); }
html.deko .pb-score { text-shadow: 0 1px 2px rgba(0,0,0,.5); }
html.deko .tbar .icon-btn, html.deko .pill { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
/* Knöpfe am Tisch: leichte Wölbung */
html.deko .actions .btn { background: linear-gradient(#fffdf8, #efe4d0); box-shadow: 0 2px 0 rgba(90,60,25,.35), 0 4px 10px rgba(0,0,0,.25); }
html.deko .actions .btn.primary, html.deko .btn.primary { background: linear-gradient(#f6c15a, #d7952f 60%, #c07f22); box-shadow: inset 0 1px 0 rgba(255,246,210,.6), 0 2px 0 rgba(120,70,10,.55), 0 4px 10px rgba(0,0,0,.25); }
html.deko .actions .btn:active { transform: translateY(1px) scale(.99); box-shadow: 0 1px 0 rgba(90,60,25,.35), 0 2px 5px rgba(0,0,0,.25); }
html.deko .eval-btn, html.deko .fair-badge { box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
html.deko .banner { background: linear-gradient(#3a2610, #241608); box-shadow: inset 0 1px 0 rgba(255,220,150,.25), 0 6px 18px rgba(0,0,0,.45); }

/* Gedrucktes auf dem Filz (Blackjack-Bogen, Hold'em-Linie) in mattem Gold */
html.deko .board .bj-arc.dk-print { stroke: rgba(236, 200, 120, .55); stroke-width: 3.5; }
html.deko .board .bj-arc.dk-print.thin { stroke-width: 1.5; stroke: rgba(236, 200, 120, .35); }
html.deko .board .bj-rule.dk-print { fill: rgba(236, 200, 120, .7); }
html.deko .board .he-line.dk-print { stroke: rgba(236, 200, 120, .26); stroke-width: 3; }
html.deko .board .he-seat.folded .dk-av { opacity: .45; }
html.deko .board .he-room { fill: #1c3128; }

/* Kein endloses Pulsieren im Leerlauf: Hinweise pulsieren ein paar Mal und bleiben dann ruhig stehen */
html.deko .board .v4-win-line { animation: take 1s ease-in-out 3; }
/* n9: Leuchten ohne Filter (TODO Heavy-Job: am Bild mit dem alten drop-shadow vergleichen, Breiten/Deckkraft abstimmen) */
html.deko .board .v4-win-glow { fill: none; stroke: #fff6c8; pointer-events: none; }
html.deko .board .v4-win-glow.g0 { stroke-width: 25; stroke-opacity: .16; }
html.deko .board .v4-win-glow.g1 { stroke-width: 16; stroke-opacity: .3; }
html.deko .board .hint-take { animation: take 1s ease-in-out 4; }
html.deko .board circle.he-turn { animation: he-pulse 1.4s ease-in-out 3; }
html.deko .board .mark-sq.hint { animation: take 1.2s ease-in-out 4; }

/* Würfelglück: Würfelschale aus Filz mit Holzrand, gehaltene Würfel leuchten */
html.deko .board-wrap > .wg { border-color: transparent;
  background: radial-gradient(90% 60% at 50% 25%, rgba(255, 240, 200, .14), rgba(255, 240, 200, 0) 70%) padding-box,
    radial-gradient(130% 100% at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.32) 100%) padding-box,
    var(--deko-noise, linear-gradient(transparent, transparent)) 0 0 / 160px 160px padding-box,
    linear-gradient(#21644a, #1a5039) padding-box,
    url(../assets/wood/frame.webp) 0 0 / 260px 260px border-box;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.45), 0 10px 22px rgba(0,0,0,.45); }
html.deko .wg-die { overflow: visible; }
html.deko .wg-die.held { background: rgba(255, 210, 74, .2); box-shadow: 0 0 0 2px rgba(255, 210, 74, .9), 0 0 16px rgba(255, 210, 74, .55); }
html.deko .wg-cat { box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
html.deko .wg-cat.can { background: linear-gradient(#fffdf7, #f3ead7); }

/* Lobby: Karten wie Papier mit Licht von oben, Kacheln mit Tiefe und farbigem Lichtfleck je Spiel-Art */
html.deko .lobby-head h1 { text-shadow: 0 2px 0 rgba(0,0,0,.22), 0 6px 18px rgba(0,0,0,.35); }
html.deko .lobby-head .logo { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 2px rgba(255,230,180,.22); }
html.deko .card { background: linear-gradient(180deg, #fbf7ee, #f1e7d4); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 2px 0 rgba(80,55,25,.18), 0 12px 28px rgba(0,0,0,.34); }
html.deko .card h2 { display: flex; align-items: center; gap: 10px; }
html.deko .card h2::after { content: ''; flex: 1; height: 2px; border-radius: 1px; background: linear-gradient(90deg, rgba(185,140,60,.6), rgba(185,140,60,0)); }
html.deko .game { --acc: rgba(214, 150, 60, .2);
  background: radial-gradient(70% 48% at 50% 30%, var(--acc), rgba(255,255,255,0) 72%), linear-gradient(180deg, #fffdf8 0%, #f5ecda 100%);
  border-color: rgba(120, 85, 40, .2); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(90, 60, 25, .15), 0 5px 12px rgba(60, 40, 15, .13); transition: transform .12s, box-shadow .12s; }
html.deko .game:active { transform: translateY(1px) scale(.985); box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(90, 60, 25, .15), 0 2px 5px rgba(60, 40, 15, .13); }
html.deko .game[data-game=schnapsen], html.deko .game[data-game=blackjack], html.deko .game[data-game=maumau], html.deko .game[data-game=holdem] { --acc: rgba(40, 140, 90, .22); }
html.deko .game[data-game=ludo] { --acc: rgba(216, 69, 59, .18); }
html.deko .game[data-game=vier], html.deko .game[data-game=schiffe] { --acc: rgba(40, 100, 190, .2); }
html.deko .game[data-game=wuerfel] { --acc: rgba(46, 150, 100, .2); }
html.deko .game[data-game=paare] { --acc: rgba(47, 111, 143, .22); }
html.deko .game.trainer-tile { --acc: rgba(40, 140, 90, .2); border-color: rgba(40, 140, 90, .4); }
html.deko .game .mini, html.deko .resume-main .mini, html.deko .tr-card-main .mini { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.35), 0 5px 12px rgba(0,0,0,.25); }
html.deko .resume-main { background: linear-gradient(180deg, #fffdf8, #f5ecda); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(90, 60, 25, .12); }
html.deko .input { box-shadow: inset 0 2px 3px rgba(60, 40, 15, .1); }
html.deko .chip { background: linear-gradient(#fff, #f4ecdc); box-shadow: 0 1px 0 rgba(90, 60, 25, .2); }
html.deko .sheet { background: linear-gradient(180deg, #fbf7ee, #f3eadb); }
html.deko .sheet-head { background: #fbf7ee; }
html.deko .ov-card { background: linear-gradient(180deg, #fbf7ee, #f1e7d4); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 14px 34px rgba(0,0,0,.5); }
html.deko .word-big { background: linear-gradient(#fff, #f7f0e2); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(90, 60, 25, .15); }
html.deko .tr-card { background: linear-gradient(180deg, #fbf7ee, #f1e7d4); }
/* einmal beim ersten Öffnen: Kacheln erscheinen nacheinander (nur mit Effekten, nicht bei reduzierter Bewegung) */
html.deko-fx .games.enter > .game { animation: tile-in .34s cubic-bezier(.2, .7, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 26ms + 60ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
html.deko .board .bj-bet.dk-bet { font-size: 26px; paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 4; }
html.deko .board .dk-badge { fill: rgba(22, 14, 6, .55); stroke: rgba(240, 192, 77, .65); stroke-width: 2.5; }
html.deko .board .atout-label { font-size: 29px; }
/* „Wer gewinnt?“-Balken: gedrechselte Leiste statt flachem Strich; Meldungen mit warmem Rand */
html.deko .evalbar { width: 8px; border-radius: 5px; background: linear-gradient(90deg, #1a1210, #3a2e28 55%, #1a1210); box-shadow: 0 0 0 1px rgba(255,236,200,.28), 0 2px 6px rgba(0,0,0,.4); }
html.deko .evalbar .evalfill { background: linear-gradient(90deg, #d8ccb4, #fffaf0 50%, #d8ccb4); }
html.deko .toast { background: linear-gradient(rgba(52, 36, 18, .97), rgba(30, 20, 10, .97)); box-shadow: inset 0 1px 0 rgba(255, 220, 150, .2), 0 6px 18px rgba(0,0,0,.4); }

/* n10 E3: Online-Paket – Reaktionen, Vertretung, Bedenkzeit, Revanche-Angebot */
.emote-btn { font-size: 22px; }
.emote-btn.hidden { display: none; }
.emote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.emote-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; padding: 8px 4px; }
.emote-pick .emote-e { font-size: 32px; line-height: 1.1; }
.emote-pick .emote-t { font-size: 13px; }
.emote-bubble { position: fixed; z-index: 40; pointer-events: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px;
  background: #fffaf0; color: #2a2118; border-radius: 18px 18px 18px 4px; box-shadow: 0 6px 16px rgba(0,0,0,.35);
  animation: emote-in 2.5s ease-out forwards; }
.emote-bubble .emote-e { font-size: 30px; line-height: 1; }
.emote-bubble .emote-t { font-size: 13px; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes emote-in { 0% { opacity: 0; transform: translateY(10px) scale(.7); } 10% { opacity: 1; transform: translateY(0) scale(1.06); }
  16% { transform: scale(1); } 85% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-12px); } }
.tag.sub { background: rgba(240,181,76,.28); color: #ffe8b8; }
.pb-clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.25); min-width: 58px; text-align: center; }
.pb-clock.run { background: #f6efe0; color: #1f1a14; }
.pb-clock.low { background: #c0392b; color: #fff; }
.btn.nudge { animation: nudge 1.2s ease-in-out 3; }
@keyframes nudge { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.08); } 60% { transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .btn.nudge, .emote-bubble { animation: none; } }

/* n10 E4: Auszeichnungen am Ende, Statistik */
.awards { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 12px; background: rgba(240,181,76,.14); }
.awards.hidden { display: none; }
.award { font-size: 14.5px; }
@media (orientation: landscape) and (max-height: 500px) { .awards { padding: 2px 8px; gap: 0; } .award { font-size: 12.5px; line-height: 1.25; } }
.award-i { margin-right: 6px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td { padding: 4px 6px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
