/* Shared with the workshop: built into the player and published as /assets/table.css. */
/* The table (speelveld.ts, bordweergave.ts) */
.midden, .spelerveld { display: grid; gap: 10px; min-width: 0; }
.spelerveld { border-top: 2px dashed var(--card-edge); padding-top: 10px; }
.spelerveld.ik { border-top-color: var(--signal); }
.sv-kop { font-size: .84rem; font-weight: 800; color: var(--muted); }
.srij { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; min-width: 0; }
.vak { display: grid; gap: 4px; min-width: 0; align-content: start; }
.vak.breed { flex: 1 1 200px; }
.vh { display: flex; gap: 6px; align-items: baseline; font-size: .78rem; color: var(--muted); font-weight: 700; }
.vh .vn { font-family: var(--f-mono); letter-spacing: 0; background: var(--surface); border-radius: 4px; padding: 0 4px; }
.vi { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; min-width: 0; }
.kw { --kb: 90px; --kh: 124px; position: relative; width: var(--kb); height: var(--kh); flex: none; cursor: pointer; }
.kw.klein { --kb: 68px; --kh: 94px; }
.kw.groot { --kb: 124px; --kh: 172px; }
/* a hand of large cards overlaps a little, as held cards do; the one under the pointer comes forward */
.vi > .kstapel:has(> .kw.groot) + .kstapel { margin-left: -30px; }
.vi > .kstapel:has(> .kw.groot) { position: relative; transition: transform .15s ease; }
.vi > .kstapel:has(> .kw.groot):hover { z-index: 3; transform: translateY(-8px); }
@media (max-width: 760px) { .vi > .kstapel:has(> .kw.groot) + .kstapel { margin-left: 0; } }
.kw.dwars { width: var(--kh); height: var(--kb); }
.kk { position: absolute; inset: 0; background: var(--card); border: 1px solid var(--card-edge); border-radius: 7px; box-shadow: 0 1px 2px rgb(0 0 0 / .14); display: flex; flex-direction: column; overflow: hidden; }
.kw.dwars .kk { inset: auto; width: var(--kb); height: var(--kh); left: calc((var(--kh) - var(--kb)) / 2); top: calc((var(--kb) - var(--kh)) / 2); transform: rotate(90deg); }
.kband { background: var(--kl); color: #fff; padding: 2px 5px; font-size: .56rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; overflow: hidden; }
.kboven { font-family: var(--f-mono); font-weight: 800; letter-spacing: 0; }
.knaam { padding: 4px 5px 0; font-weight: 800; font-size: .7rem; line-height: 1.15; flex: 1; overflow-wrap: break-word; hyphens: auto; }
.kk.mf .knaam { padding-right: 22px; }
.kw.klein .knaam { font-size: .64rem; }
.kwaarden { display: flex; flex-wrap: wrap; gap: 1px 5px; padding: 2px 5px 4px; font-family: var(--f-mono); font-size: .64rem; font-weight: 600; }
.kw.klein .kwaarden { font-size: .58rem; gap: 0 3px; }
.ktags { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 4px 3px; }
.ktags span { font-size: .55rem; background: var(--surface-2); border-radius: 3px; padding: 0 3px; color: var(--muted); }
.kfiches { position: absolute; right: 3px; top: 18px; display: flex; flex-direction: column; gap: 2px; }
.fiche { background: var(--fk); color: #fff; border-radius: 50%; width: 19px; height: 19px; display: grid; place-items: center; font-size: .64rem; font-weight: 800; border: 2px solid var(--card); font-family: var(--f-mono); }
.kw.nieuw .kk { box-shadow: 0 0 0 2.5px var(--signal); }
.kk.rug { background: repeating-linear-gradient(45deg, var(--card) 0 5px, var(--card-edge) 5px 7px); display: grid; place-items: center; }
.kk.rug span { background: var(--card); border-radius: 4px; padding: 0 6px; font-family: var(--f-mono); font-weight: 700; color: var(--muted); }
.leeg-plek .kk { background: transparent; border: 1.5px dashed var(--card-edge); box-shadow: none; }
.leeg-plek { cursor: default; }
.stapelvak.dik .kw .kk { box-shadow: 2px 2px 0 var(--card-edge), 4px 4px 0 var(--card-edge); }
.kstapel { display: flex; flex-direction: column; }
.aanh { width: 90px; margin-top: -3px; background: var(--kl); color: #fff; font-size: .6rem; font-weight: 700; padding: 4px 5px 2px; border-radius: 0 0 6px 6px; cursor: pointer; line-height: 1.15; }
.metervak .vi { position: relative; }
.mbg { fill: none; stroke: var(--card-edge); stroke-width: 7; }
.marc { fill: none; stroke: var(--bad); stroke-width: 7; stroke-linecap: round; }
.mval { font: 800 20px var(--f-sans); fill: var(--ink); }
.mmax { font: 600 9px var(--f-mono); fill: var(--muted); }
.mdelta { position: absolute; right: -4px; top: 0; font-family: var(--f-mono); font-size: .72rem; font-weight: 800; background: var(--signal); color: #3a2a00; border-radius: 4px; padding: 0 4px; }
.qk { width: 210px; min-height: 84px; background: var(--card); border: 1px solid var(--card-edge); border-radius: 7px; box-shadow: 0 1px 2px rgb(0 0 0 / .14); border-top: 18px solid #8a6d2b; padding: 6px 8px; display: grid; gap: 6px; cursor: pointer; }
.qnaam { font-weight: 800; font-size: .82rem; line-height: 1.2; }
.qvoort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qpips { display: flex; flex-wrap: wrap; gap: 3px; }
.qpips i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #2e8b57; }
.qpips i.vol { background: #2e8b57; }
.qgetal { font-family: var(--f-mono); font-size: .76rem; font-weight: 700; }
.qgetal b { background: var(--signal); color: #3a2a00; border-radius: 4px; padding: 0 4px; }
.bord { display: grid; grid-template-columns: repeat(var(--kol), 54px); gap: 5px; }
.bord span { width: 54px; height: 54px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--card-edge); border-radius: 7px; font: 800 1.5rem var(--f-sans); }
.bord span.nieuw { box-shadow: 0 0 0 2.5px var(--signal); }
.geobordvak { flex: 1 1 100%; }
.geobord svg { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.geobord .vk-l { fill: var(--vk-l); } .geobord .vk-d { fill: var(--vk-d); } .geobord .vk { fill: var(--card); stroke: var(--card-edge); }
.geobord .vk-nieuw { fill: var(--signal); fill-opacity: .28; stroke: var(--signal); stroke-width: 2; pointer-events: none; }
.geobord .hx { fill: var(--card); stroke: var(--card-edge); stroke-width: 1.2; }
.geobord .hx-muur { fill: var(--muted); fill-opacity: .45; stroke: var(--muted); stroke-width: 1; }
.geobord .hx-nieuw { fill: none; stroke: var(--signal); stroke-width: 2.6; pointer-events: none; }
.geobord .muur { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.geobord .coord { font: 600 9px var(--f-mono); fill: var(--muted); pointer-events: none; }
.geobord .stuk { cursor: pointer; }
.geobord .stuk:focus-visible { outline: none; } .geobord .stuk:focus-visible .fiche-rond, .geobord .stuk:focus-visible .glyph { stroke: var(--signal); stroke-width: 3; }
.geobord .glyph { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif; paint-order: stroke; stroke-linejoin: round; }
.geobord .st-wit { fill: #fffdf6; stroke: #262c2a; stroke-width: 1.1; }
.geobord .st-zwart { fill: #1c2120; stroke: #e8ece9; stroke-width: .9; }
.geobord .fiche-rond { stroke: var(--surface); stroke-width: 2; }
.geobord .fiche-t { font-family: var(--f-sans); font-weight: 800; fill: #fff; pointer-events: none; }
.geobord .fiche-w { font-family: var(--f-mono); font-weight: 700; fill: #fff; pointer-events: none; }
.bordlegenda { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.bordlegenda i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--card-edge); }
.bordlegenda i[style*="url"] { width: 16px; height: 16px; vertical-align: -4px; border-radius: 4px; }
.geobord .vk-beeld { pointer-events: none; }
.dsluit { position: absolute; right: 6px; top: 4px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.dkop { border-left: 6px solid var(--kl); padding-left: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding-right: 24px; }
.dkop span { font-size: .74rem; color: var(--muted); }
.dtekst { margin: 0; font-size: .86rem; white-space: pre-line; }
.dvelden { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: .78rem; }
.dvelden b { font-family: var(--f-mono); font-weight: 600; color: var(--muted); }
/* Own images (media.ts): card faces, backs, art, the detail picture, board images and image tokens */
.kk.kimg { background-color: var(--card-edge); }
.kk.kimg .ktags { position: absolute; left: 3px; bottom: 3px; padding: 0; }
/* A designed face (card.style: frame, cardface.ts): the drawn face fills the card; tokens and tags on top.
   Until it is drawn, the typographic card shows; then its parts give way to the picture. */
.kk.kframe { background-color: #1d1915; background-size: 100% 100%; background-repeat: no-repeat; border-color: rgb(0 0 0 / .55); }
.kk.kframe > :not(.kfiches):not(.ktags) { display: none; }
.kk.kframe .ktags { position: absolute; left: 3px; bottom: 3px; padding: 0; }
.kk.ma .knaam { flex: none; }
.kart { flex: 1 1 30px; min-height: 30px; margin: 2px 4px; border-radius: 4px; background-color: var(--surface-2); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.kk.rug.rimg { background-color: var(--card-edge); }
.kk.rug.rimg span { box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.dbeeld { width: 100%; max-width: 240px; aspect-ratio: 63 / 88; justify-self: center; border-radius: 8px; border: 1px solid var(--card-edge); background-color: var(--surface-2); }
.geobord .vk-glas { fill: transparent; stroke: rgb(0 0 0 / .28); stroke-width: 1; }
.geobord .hx.vk-glas { fill: transparent; stroke: rgb(0 0 0 / .3); }
.geobord .vk-geen { fill: transparent; stroke: none; }
.geobord .bordbeeld { pointer-events: none; }
.geobord .fiche-rand { fill: none; stroke-width: 2.5; }
.geobord .fiche-badge { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
/* A table with a background image: labels and meters on a light backing so they stay readable */
.met-beeld .vh > span:first-child, .met-beeld .sv-kop { justify-self: start; width: fit-content; background: var(--surface); color: var(--ink); padding: 0 6px; border-radius: 4px; }
.met-beeld .metervak svg:not(.teller) { background: var(--surface); border-radius: 50%; }
.met-beeld .metervak .teller.munten .munt-nr, .met-beeld .metervak .teller.pips .pip-nr { fill: #fff; stroke: rgb(0 0 0 / .6); }
.met-beeld .metervak .teller.pips .pip-uit { fill: rgb(255 255 255 / .18); stroke: rgb(255 255 255 / .35); }
.met-beeld .spelerveld { border-top-color: rgb(255 255 255 / .45); }
.met-beeld .leeg-plek .kk { border-color: rgb(255 255 255 / .5); }
.met-beeld .bordlegenda { background: var(--surface); border-radius: 6px; padding: 2px 8px; width: fit-content; }
.met-beeld > p { background: var(--surface); padding: 8px 12px; border-radius: 8px; width: fit-content; }
/* card text (view: card.text) */
.kk.mt .knaam { flex: none; }
.ktekst { flex: 1; min-height: 0; overflow: hidden; white-space: pre-line; padding: 2px 5px 3px; font-size: .52rem; line-height: 1.22; color: var(--ink); opacity: .82; hyphens: auto; overflow-wrap: break-word; }
.kw.klein .ktekst { font-size: .46rem; padding: 1px 4px 2px; }

/* play mode: another player's area in one line */
.spelerveld.ander { padding-block: 6px 8px; }
.spelerveld.ander .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.spelerveld.ander .chip { font-size: .78rem; border: 1px solid var(--card-edge); border-radius: 999px; padding: 2px 9px; background: var(--card); color: var(--muted); }
.spelerveld.ander .chip b { color: var(--ink); font-weight: 700; margin-right: 3px; }
.spelerveld.ander .klein-vak .vi { gap: 4px; }

/* ── Textures: felt, wood, paper, stone, glossy tokens (CSS and inline SVG only, no files) ── */
:root { --felt-deep: #cfdad2; --wood: #8a5a3a; --wood-dark: #5e3a22; --paper: #fdfcf7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --felt-deep: #0c1412; --wood: #5a3b26; --wood-dark: #2e1d12; --paper: #243130; } }
:root[data-theme="dark"] { --felt-deep: #0c1412; --wood: #5a3b26; --wood-dark: #2e1d12; --paper: #243130; }
#veld, .ws-tafel .veld {
  background-color: var(--felt);
  background-image:
    radial-gradient(ellipse at 50% 35%, rgb(255 255 255 / .18), transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgb(0 0 0 / .14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 7px solid var(--wood);
  border-image: linear-gradient(135deg, var(--wood-dark), var(--wood) 30%, #b07a52 50%, var(--wood) 70%, var(--wood-dark)) 1;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .25), inset 0 2px 10px rgb(0 0 0 / .25), 0 6px 18px rgb(0 0 0 / .18);
}
.kk { background: var(--paper); border-radius: 8px; box-shadow: 0 1px 1px rgb(0 0 0 / .12), 0 3px 6px rgb(0 0 0 / .14), inset 0 0 0 1px rgb(255 255 255 / .6); }
.kk::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)'/%3E%3C/svg%3E"); }
.kw:hover .kk { box-shadow: 0 2px 2px rgb(0 0 0 / .12), 0 10px 18px rgb(0 0 0 / .2), inset 0 0 0 1px rgb(255 255 255 / .6); }
.kband { background: linear-gradient(180deg, color-mix(in srgb, var(--kl) 85%, white), var(--kl)); }
.kk.rug { background: var(--kl, var(--track)); background-image: repeating-linear-gradient(45deg, rgb(255 255 255 / .12) 0 6px, transparent 6px 12px), repeating-linear-gradient(-45deg, rgb(255 255 255 / .12) 0 6px, transparent 6px 12px), radial-gradient(circle at 50% 50%, rgb(255 255 255 / .22), transparent 60%); border-color: rgb(0 0 0 / .25); }
.kk.rug span { background: rgb(255 255 255 / .85); color: #333; }
.leeg-plek .kk { background: rgb(0 0 0 / .05); border: 1.5px dashed rgb(0 0 0 / .18); box-shadow: inset 0 1px 4px rgb(0 0 0 / .12); }
.leeg-plek .kk::after { display: none; }
.geobord .hx { fill: url(#tt-stone); stroke: rgb(0 0 0 / .25); stroke-width: 1; }
.geobord .vk { fill: var(--card); }
.geobord .fiche-rond { stroke: rgb(0 0 0 / .35); stroke-width: 1.2; filter: drop-shadow(0 2px 1.5px rgb(0 0 0 / .35)); }
.geobord .fiche-rand { filter: drop-shadow(0 2px 1.5px rgb(0 0 0 / .35)); }
.geobord .glyph { filter: drop-shadow(0 1px 1px rgb(0 0 0 / .3)); }
.geobord svg { filter: drop-shadow(0 2px 3px rgb(0 0 0 / .12)); }
.metervak svg { filter: drop-shadow(0 2px 2px rgb(0 0 0 / .18)); }
.mbg { stroke: rgb(0 0 0 / .12); }
.vh { text-shadow: 0 1px 0 rgb(255 255 255 / .5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vh { text-shadow: none; } :root:not([data-theme="light"]) .kk.rug span { background: rgb(0 0 0 / .5); color: #ddd; } }

/* Fixed card layout: nothing shrinks or jumps; the band, name, picture and numbers keep their place,
   the rules text takes what is left (clipped). Cards with a picture are a little taller. */
.kk > * { flex: none; }
.kband { min-height: 15px; }
.knaam { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.12; }
.kw.klein .knaam { -webkit-line-clamp: 2; }
.kart { flex: 0 0 auto !important; height: calc(var(--kh) * .26); min-height: 0; }
.ktekst { flex: 1 1 0 !important; min-height: 0; }
.kw:has(.ma) { --kh: 140px; }
.kw.klein:has(.ma) { --kh: 106px; }
.kk.ma .knaam { font-size: .66rem; }
.kk.ma .ktekst { font-size: .5rem; }
.kk.ma .kwaarden { padding-top: 1px; }
.kk.ma .kwaarden { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; gap: 0 4px; }
.kw.klein:has(.ma) { --kh: 118px; }
/* the name always takes two lines, so the picture sits at the same height on every card; the
   rules text is cut at whole lines */
.kk.ma .knaam { height: calc(2 * 1.12 * .66rem + 4px); -webkit-line-clamp: 2; }
.kw.klein .kk.ma .knaam { height: calc(2 * 1.12 * .64rem + 3px); font-size: .64rem; }
.kk.ma .ktekst { flex: 1 1 0 !important; }
.kw:has(.ma) { --kh: 146px; }
.kw.klein:has(.ma) { --kh: 120px; }
.ktekst.lang { font-size: .44rem; line-height: 1.18; }
.ktekst.zeerlang { font-size: .38rem; line-height: 1.15; }
.kw.klein .ktekst.lang { font-size: .4rem; }
.kw.klein .ktekst.zeerlang { font-size: .35rem; }
.geobord .tegel { stroke: none; }
.geobord .tegelrand { fill: none; stroke: rgb(30 25 20 / .75); stroke-width: 3; stroke-linecap: round; }

/* counters as on a table (counters.ts): a track with a cube, pips or hearts, coins, a dial */
.teller { overflow: visible; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .2)); }
.tr .tr-cel { fill: #efe6d2; stroke: #8c7a5a; stroke-width: .8; }
.tr .tr-vijf { fill: #e2d3b2; }
.tr .tr-nr { font: 700 8.5px var(--f-mono); fill: #6b5a3c; text-anchor: middle; }
.tr .tr-kubus { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.tr .tr-kb { fill: #c0392b; stroke: #7b1d14; stroke-width: .8; }
.tr .tr-kt { fill: rgb(255 255 255 / .28); }
.tr .tr-kn { font: 800 9px var(--f-sans); fill: #fff; text-anchor: middle; }
.pips .pip-aan { fill: #c0392b; stroke: #7b1d14; stroke-width: 1; }
.pips circle.pip-aan { fill: var(--track); stroke: rgb(0 0 0 / .35); }
.pips .pip-uit { fill: rgb(0 0 0 / .12); stroke: rgb(0 0 0 / .25); stroke-width: 1; }
.pips .pip-nr { font: 700 9px var(--f-mono); fill: var(--muted); text-anchor: middle; }
.munten .munt { fill: #f2c94c; stroke: #a8811c; stroke-width: .8; }
.munten .munt-rand { fill: #c9a032; }
.munten .munt-in { fill: none; stroke: #d6a92f; stroke-width: .9; }
.munten .munt-leeg { fill: none; stroke: rgb(0 0 0 / .25); stroke-dasharray: 2 2; }
.munten .munt-nr { font: 800 13px var(--f-sans); fill: var(--ink); text-anchor: end; paint-order: stroke; stroke: rgb(255 255 255 / .7); stroke-width: 3px; }
.dial .dl-rand { fill: #6b4f2c; } .dial .dl-vlak { fill: #f3ead6; stroke: #a4885c; }
.dial .dl-nr { font: 700 6px var(--f-mono); fill: #6b5a3c; text-anchor: middle; } .dial .dl-nu { fill: #c0392b; font-size: 7.5px; }
.dial .dl-wijzer { fill: #c0392b; } .dial .dl-kap { fill: #6b4f2c; } .dial .dl-waarde { font: 800 13px var(--f-sans); fill: #fff; text-anchor: middle; }
.dial g { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes tr-hop { from { transform: translate(var(--fx), var(--fy)); } }
@keyframes dl-draai { from { transform: rotate(var(--fa)); } }
.munt-nieuw { animation: munt-val .4s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes munt-val { from { transform: translateY(-26px); opacity: 0; } }
.pip-wissel { animation: pip-puls .5s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes pip-puls { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .tr-kubus, .dial g, .munt-nieuw, .pip-wissel { animation: none !important; } }
.metervak .vi svg.teller { max-width: 100%; height: auto; }
