/* Nomopoly – Spielfiguren im Sticker-Stil (29.11.). Jede Figur besteht aus vier deckungsgleichen Bildern
   (stehen, laufen, jubeln, anzug); sichtbar ist immer genau eins. Gezeichnet in public/js/figur.js. */
.fig { display: block; position: relative; width: 100%; }
.fig.sticker { aspect-ratio: 220 / 264; transform-origin: 50% 100%; }
.fig.sticker img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; opacity: 0; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.fig.sticker .sp-stehen { opacity: 1; }
/* Nach der Razzia (und solange man sitzt): Trainingsanzug */
.fig.sticker[data-outfit='knast'] .sp-stehen { opacity: 0; } .fig.sticker[data-outfit='knast'] .sp-anzug { opacity: 1; }
/* Laufen: Seitenansicht; läuft die Figur nach links, wird sie gespiegelt */
:is(.figur.huepft, .laeuft) .fig.sticker img { opacity: 0; } :is(.figur.huepft, .laeuft) .fig.sticker .sp-laufen { opacity: 1; }
:is(.figur.links, .nachlinks) .fig.sticker { scale: -1 1; }
/* Freude: Arme hoch, kleine Hüpfer */
:is(.figur.froh, .jubelt) .fig.sticker img { opacity: 0; } :is(.figur.froh, .jubelt) .fig.sticker .sp-jubeln { opacity: 1; }
:is(.figur.froh, .jubelt) .fig.sticker { animation: stjubel .32s ease-in-out infinite alternate; }
@keyframes stjubel { from { transform: translateY(0); } to { transform: translateY(-9%); } }
/* Ärger: kurz schütteln */
:is(.figur.sauer, .aergert) .fig.sticker { animation: stsauer .16s ease-in-out infinite alternate; }
@keyframes stsauer { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
/* In Ruhe: ganz leichtes Atmen */
.figur:not(.huepft):not(.froh):not(.sauer) .fig.sticker { animation: statmen 3.4s ease-in-out infinite; animation-delay: var(--versatz, 0s); }
@keyframes statmen { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
.figur.sitzt .fig.sticker { animation: none; }

/* ---------- Nur der Kopf im Rund (Spielerliste, Figurenwahl, Handel …) ---------- */
.kopf { display: block; position: relative; width: 100%; }
.kopf.stkopf { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--farbe, #8590a6) 24%, #fff); box-shadow: inset 0 0 0 2.5px var(--farbe, #8590a6); }
.kopf.stkopf img { position: absolute; width: 230%; max-width: none; left: -65%; top: -10%; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }

/* ---------- Auf dem Brett ---------- */
.figur:has(.sticker) { width: 5.4cqw; } .figur.sitzt:has(.sticker) { width: 4.2cqw; }
/* Adrian 29.11.: unter der Figur nur ein weicher Schatten, wem sie gehört zeigt das Namensschild in Spielerfarbe */
.figur:has(.sticker) .figur-ring, .figur.dran:has(.sticker) .figur-ring { display: block; animation: none; left: 50%; bottom: -5%; width: 80%; aspect-ratio: 3.1; translate: -50% 0; border-radius: 50%; box-shadow: none;
  background: radial-gradient(closest-side, rgba(18, 26, 48, .45), rgba(18, 26, 48, .18) 60%, rgba(18, 26, 48, 0)); }
.figur:has(.sticker) .schild { display: block; position: absolute; left: 50%; top: 99%; translate: -50% 0; z-index: 2; box-sizing: border-box; white-space: nowrap; max-width: 8.4cqw; overflow: hidden; text-overflow: ellipsis;
  font: 800 max(8px, 1.2cqw)/1 var(--jost, 'Jost', sans-serif); letter-spacing: 0; text-transform: none; color: #fff; text-shadow: 0 1px 0 rgba(23, 34, 61, .6);
  background: var(--farbe, #8590a6); border: max(1px, .17cqw) solid #17223d; border-radius: 99px; padding: .2em .55em .26em; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.figur.kurz:has(.sticker) .schild { min-width: 1.55em; padding-inline: .3em; text-align: center; }
.figur.zweite:has(.sticker) .schild { top: calc(99% + 1.5em); }
.figur.stammgast:has(.sticker) .schild { background: #ffd45e; color: #17223d; text-shadow: none; }
.figur.sitzt:has(.sticker) .schild { display: none; }   /* steht stattdessen am Zellenrahmen */
.zellenschilder { position: absolute; translate: -50% -50%; display: flex; gap: .2cqw; z-index: 210; pointer-events: none; }
.zellenschilder span { font: 800 max(8px, 1.15cqw)/1 var(--jost, 'Jost', sans-serif); color: #fff; text-shadow: 0 1px 0 rgba(23, 34, 61, .6); background: var(--farbe, #8590a6); border: max(1px, .17cqw) solid #17223d; border-radius: 99px;
  padding: .2em .55em .26em; min-width: 1.55em; max-width: 8cqw; box-sizing: border-box; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.zellenschilder:has(span:nth-child(3)) span { margin-inline: max(-3px, -.25cqw); }
@media (max-width: 899px) { .zellenschilder:has(span:nth-child(3)) span { font-size: 7px; padding-inline: 1px; margin-inline: -1px; min-width: 1.6em; } }
.zellenschilder span.stamm { background: #ffd45e; color: #17223d; text-shadow: none; }
.figur.dran { z-index: 3; }

/* ---------- Lobby, Besitz, Sieg ---------- */
.lo-figur > .fig.sticker { width: 62px; }
.lo-vorschau > .fig.sticker { width: 92px; }
.bz-figur > .fig.sticker { width: 64px; margin: 0 .2rem; }
.sieger-figur > .fig.sticker { width: 120px; }
@media (max-width: 560px) { .lo-figur > .fig.sticker { width: 54px; } .lo-vorschau > .fig.sticker { width: 80px; } }
@media (prefers-reduced-motion: reduce) { .fig.sticker { animation: none !important; } }
