/* Würfeln: Tisch mit beliebig vielen Würfeln, Ergebnis, Werkbank-Karten je Würfel. */

.buehne-wuerfel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px 12px 10px;
}

/* ---------- Tisch ---------- */
.wuerfel-flaeche {
  --w: min(44vw, 30dvh, 210px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: calc(var(--w) * .22);
  width: 100%;
  max-width: 820px;
  min-height: calc(var(--w) * 1.6);
  padding: calc(var(--w) * .25) 8px calc(var(--w) * .1);
}
/* Würfelbrett: Filz mit hellem Rand — dieselbe Sprache wie der Spieltisch der Flasche.
   Die Fläche bleibt, wie sie war; das Brett liegt als eigene Schicht dahinter. */
.wuerfel-flaeche { position: relative; isolation: isolate; }
.wuerfel-flaeche::before {
  content: "";
  position: absolute;
  inset: calc(var(--w) * .08) 0 calc(var(--w) * -.05);
  z-index: -1;
  border-radius: 32px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1.5px) 0 0 / 5px 5px,
    radial-gradient(ellipse at 45% 30%, #3b3aa8, #2a2580 55%, #191550 100%);
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, .7),
    inset 0 0 0 12px rgba(255, 255, 255, .3),
    inset 0 0 40px 12px rgba(20, 8, 60, .35),
    0 18px 40px rgba(80, 60, 160, .25);
}
.wuerfel-flaeche.g2 { --w: min(36vw, 26dvh, 180px); }
.wuerfel-flaeche.g4 { --w: min(28vw, 21dvh, 150px); }
.wuerfel-flaeche.g6 { --w: min(25vw, 18dvh, 128px); }
.wuerfel-flaeche.g12 { --w: min(19vw, 14dvh, 100px); }
.wuerfel-flaeche.g24 { --w: min(14.5vw, 10dvh, 78px); }

.wuerfel {
  position: relative;
  width: var(--w);
  height: var(--w);
  padding: 0;
  border: 0;
  background: none;
  color: var(--w-schrift);
  perspective: calc(var(--w) * 4);
  container-type: inline-size;
  rotate: var(--w-kipp);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.wuerfel:focus-visible { outline: 2px solid var(--akzent); outline-offset: 6px; border-radius: 22%; }
/* Weicher Schatten auf dem Tisch */
.wuerfel::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -9%;
  height: 16%;
  border-radius: 50%;
  background: rgb(10, 4, 30);
  opacity: .45;
  filter: blur(6px);
}

/* Festgehalten: Ring im Akzent und ein kleines Schild */
.wuerfel.gehalten { scale: .92; }
.wuerfel.gehalten::after {
  content: "fest";
  position: absolute;
  left: 50%;
  bottom: -30%;
  translate: -50% 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--verlauf);
  color: #fff;
  font-size: max(11px, 12cqw);
  font-weight: 650;
  box-shadow: 0 4px 12px rgba(139, 92, 246, .35);
}
.wuerfel.gehalten .w6-seite, .wuerfel.gehalten .w-form { box-shadow: 0 0 0 3px var(--akzent); }
.wuerfel.gehalten .w-form { box-shadow: none; filter: drop-shadow(0 0 0 var(--akzent)) drop-shadow(0 0 3px var(--akzent)); }

/* ---------- Sechsseiter in 3D ---------- */
.w6-koerper {
  position: absolute;
  inset: 7%;
  transform-style: preserve-3d;
}
.w6-seite {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10%;
  border-radius: 18%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .45), transparent 55%),
    linear-gradient(160deg, color-mix(in oklab, var(--w-farbe) 88%, #fff), color-mix(in oklab, var(--w-farbe) 82%, #000));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 -4cqw 8cqw rgba(0, 0, 0, .12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
/* Kern: eckige Platten knapp unter den runden Seiten — füllen die Ecken (gerundete Kanten) */
.w6-kern {
  position: absolute;
  inset: 3.5%;
  border-radius: 13%;
  background: color-mix(in oklab, var(--w-farbe) 70%, #000);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.w6-kern.vorn { transform: translateZ(41.5cqw); }
.w6-kern.rechts { transform: rotateY(90deg) translateZ(41.5cqw); }
.w6-kern.hinten { transform: rotateY(180deg) translateZ(41.5cqw); }
.w6-kern.links { transform: rotateY(-90deg) translateZ(41.5cqw); }
.w6-kern.oben { transform: rotateX(90deg) translateZ(41.5cqw); }
.w6-kern.unten { transform: rotateX(-90deg) translateZ(41.5cqw); }
.w6-seite.vorn { transform: translateZ(43cqw); }
.w6-seite.rechts { transform: rotateY(90deg) translateZ(43cqw); }
.w6-seite.hinten { transform: rotateY(180deg) translateZ(43cqw); }
.w6-seite.links { transform: rotateY(-90deg) translateZ(43cqw); }
.w6-seite.oben { transform: rotateX(90deg) translateZ(43cqw); }
.w6-seite.unten { transform: rotateX(-90deg) translateZ(43cqw); }

.augen {
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
  width: 82%;
  height: 82%;
}
.augen i { width: 70%; aspect-ratio: 1; border-radius: 50%; }
.augen i.auge {
  background: var(--w-schrift);
  box-shadow: inset 0 1.2cqw 1.6cqw rgba(0, 0, 0, .35);
}

/* ---------- Echte 3D-Würfel (WebGL) ----------
   Die Leinwand ist größer als der Knopf, damit Ecken beim Überschlagen nicht abgeschnitten werden. */
.w-3d {
  position: absolute;
  left: -14%;
  top: -14%;
  width: 128%;
  height: 128%;
  pointer-events: none;
}
.wuerfel.gehalten .w-3d { filter: drop-shadow(0 0 2px var(--akzent)) drop-shadow(0 0 6px var(--akzent)); }

/* ---------- Andere Seitenzahlen als Form ---------- */
.w-flach { position: absolute; inset: 0; }
.w-form { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 6px rgba(80, 60, 160, .2)); }
.w-flaeche { fill: var(--w-farbe); stroke: color-mix(in oklab, var(--w-farbe) 55%, #fff); stroke-width: 1.6; stroke-linejoin: round; }
.w-form .wv-hell { stop-color: color-mix(in oklab, var(--w-farbe) 72%, #fff); }
.w-form .wv-mitte { stop-color: var(--w-farbe); }
.w-form .wv-dunkel { stop-color: color-mix(in oklab, var(--w-farbe) 72%, #000); }
.w-facette { fill: rgba(255, 255, 255, .12); stroke: rgba(0, 0, 0, .14); stroke-width: 1; stroke-linejoin: round; }
.w-kante { stroke: rgba(0, 0, 0, .14); stroke-width: 1; }
.w-glanz { fill: rgba(255, 255, 255, .28); }
.w-schild {
  position: absolute;
  inset: 22%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2cqw;
}
.w-schild.unten { inset: 34% 24% 12%; }

/* Text und Bild auf einer Seite (beide Bauarten) */
.w-text {
  max-width: 100%;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.w6-seite img, .w-schild img {
  width: 74%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5cqw rgba(255, 255, 255, .7);
}
.w-text.mit-bild { margin-top: -6cqw; padding: 1cqw 3cqw; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #1e1b3a; }

/* Pasch: alle Würfel leuchten golden auf */
/* am Knopf, nicht am Körper: ein filter auf preserve-3d drückt den Würfel flach */
.wuerfel-flaeche.jubel .wuerfel:not(.gehalten) { animation: pasch-jubel 1.4s ease-out; }
@keyframes pasch-jubel {
  0% { filter: drop-shadow(0 0 0 rgba(253, 224, 71, 0)); }
  25% { filter: drop-shadow(0 0 18px rgba(253, 224, 71, .95)) brightness(1.15); }
  100% { filter: drop-shadow(0 0 0 rgba(253, 224, 71, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  .wuerfel-flaeche.jubel .wuerfel { animation: none; }
}

/* ---------- Ergebnis ---------- */
.wuerfel-ergebnis { display: grid; justify-items: center; gap: 2px; min-height: 4.4rem; text-align: center; }
.w-ergebnis {
  margin: 0;
  font-size: clamp(2.6rem, 13vw, 4.2rem);
  font-weight: 750;
  letter-spacing: -.04em;
  line-height: 1;
}
.w-ergebnis.lang { font-size: clamp(1.4rem, 6vw, 2.2rem); letter-spacing: -.02em; }
.w-ergebnis.neu { animation: aufploppen .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes aufploppen { from { transform: scale(.5); opacity: 0; } }
.w-ergebnis-detail { margin: 0; min-height: 1.2em; font-weight: 550; color: var(--tusche-weich); }

.wuerfel-knoepfe { display: grid; justify-items: center; gap: 8px; }
.wurf-knopf {
  min-width: min(80vw, 300px);
  min-height: 60px;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -.01em;
}
/* Würfe pro Runde (A.16.1.0): „Wurf 2 von 3“ mit Punkten */
.wurf-zaehler { margin: 0; display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600; color: var(--tusche-weich); }
.wurf-zaehler .punkte { display: inline-flex; gap: 6px; }
.wurf-zaehler .punkte i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; opacity: .5; }
.wurf-zaehler .punkte i.an { background: var(--akzent); border-color: var(--akzent); opacity: 1; }
.wurf-zaehler.vorbei { color: var(--tusche); }
.halt-hinweis { margin: 0; max-width: 30em; font-size: .9rem; font-weight: 500; color: var(--tusche-weich); text-align: center; }

.verlauf { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 680px; }
.verlauf-titel { font-weight: 600; color: var(--tusche-weich); }
.verlauf ol { display: contents; list-style: none; }
.verlauf li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--flaeche);
  box-shadow: var(--schatten-klein);
  font-weight: 550;
  font-size: .9rem;
  max-width: 16em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.verlauf li:first-child { background: var(--verlauf); color: #fff; }
.verlauf .knopf.leise { min-height: 32px; padding: 0 6px; font-size: .9rem; }

/* ---------- Werkbank: eine Karte je Würfel ---------- */
.w-liste { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 12px; }
.w-karte {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--flaeche);
  box-shadow: var(--schatten-klein);
}
.w-karte-kopf { display: flex; align-items: center; gap: 8px; }
.w-karte-kopf strong { flex: 1; font-weight: 650; }
.w-marke {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 36px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--w-farbe);
  color: var(--w-schrift, #fff);
  font-weight: 700;
  font-size: .9rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(80, 60, 160, .2);
}
.w-seiten { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.w-seiten .gewicht { margin-left: 0; }
.w-zahl {
  width: 70px;
  min-height: 40px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--papier-2);
  font-weight: 650;
  text-align: center;
}
.w-zahl:focus { outline: none; border-color: var(--akzent); background: #fff; }
/* Alle sieben in einer Reihe (vorher brach W100 allein in die zweite Zeile) */
.w-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.w-chips .knopf { min-height: 36px; padding: .3em 0; font-size: .85rem; letter-spacing: -.01em; }
.w-chips .knopf[aria-pressed="true"] { background: var(--verlauf); color: #fff; }
.w-flaechen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.w-flaechen li { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.w-flaechen li > * { grid-area: auto; }
.w-flaechen .feld-bild.hat-bild { padding: 2px; overflow: hidden; }
.w-flaechen .feld-bild img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.farb-wahl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.farb-wahl button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), inset 0 -4px 0 rgba(0, 0, 0, .12);
  cursor: pointer;
}
.farb-wahl.klein button { width: 32px; height: 32px; }
.farb-wahl button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px #fff, 0 0 0 5px var(--akzent); }
.farb-wahl input { width: 52px; height: 40px; border: 0; border-radius: 12px; padding: 3px; background: var(--flaeche); box-shadow: var(--schatten-klein); }

@media (pointer: coarse) {
  .w-chips .knopf { min-height: 44px; }
  .farb-wahl.klein button { width: 40px; height: 40px; }
  .w-flaechen li { grid-template-columns: 44px minmax(0, 1fr) 44px; }
}

@media (min-width: 980px) {
  .wuerfel-flaeche { --w: min(20vw, 30dvh, 230px); }
  .wuerfel-flaeche.g2 { --w: min(17vw, 26dvh, 200px); }
  .wuerfel-flaeche.g4 { --w: min(13vw, 22dvh, 160px); }
  .wuerfel-flaeche.g6 { --w: min(11vw, 19dvh, 140px); }
  .wuerfel-flaeche.g12 { --w: min(8.5vw, 15dvh, 110px); }
  .wuerfel-flaeche.g24 { --w: min(6.5vw, 11dvh, 84px); }
}

/* ---------- Handy quer: Würfel links, Ergebnis und Knopf rechts ---------- */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 480px) {
  .buehne-wuerfel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: 1fr repeat(5, auto) 1fr;
    align-content: center;
    justify-items: center;
    column-gap: 24px;
    row-gap: 10px;
    padding: 0 16px 8px;
  }
  .buehne-wuerfel > :first-child { grid-row: 1 / -1; grid-column: 1; }
  .buehne-wuerfel > :not(:first-child) { grid-column: 2; }
  .buehne-wuerfel > :nth-child(2) { grid-row: 2; }
  .buehne-wuerfel > :nth-child(3) { grid-row: 3; }
  .buehne-wuerfel > :nth-child(4) { grid-row: 4; }
  .buehne-wuerfel > :nth-child(5) { grid-row: 5; }
  .wuerfel-flaeche { --w: min(22vw, 34dvh); min-height: 0; }
  .wuerfel-flaeche.g2 { --w: min(18vw, 30dvh); }
  .wuerfel-flaeche.g4 { --w: min(13vw, 24dvh); }
  .wuerfel-flaeche.g6 { --w: min(11vw, 20dvh); }
  .wuerfel-flaeche.g12, .wuerfel-flaeche.g24 { --w: min(7.5vw, 14dvh); }
}

/* Verdeckt würfeln im Raum (A.18.4.0, js/verdeckt.js): eigene Würfel noch nicht geworfen = blass, darunter die Tafel */
.wuerfel-flaeche.verdeckt-leer .wuerfel { opacity: .45; filter: saturate(.5); }
.verdeckt-tafel {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: min(100%, 460px);
  margin: 4px auto 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .62);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .16), 0 6px 20px rgba(42, 29, 92, .08);
  text-align: center;
}
.verdeckt-kopf, .verdeckt-text, .verdeckt-summe { margin: 0; font-size: .9rem; color: var(--tusche-weich); }
.verdeckt-kopf strong { color: var(--tusche); }
.verdeckt-summe { color: var(--tusche); font-weight: 650; }
.verdeckt-anzahl { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.verdeckt-anzahl .knopf { min-width: 44px; justify-content: center; }
.verdeckt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; }
.verdeckt-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .7); font-size: .9rem; }
.verdeckt-liste li.offen { color: var(--tusche-weich); }
.verdeckt-augen { display: flex; flex-wrap: wrap; gap: 4px; }
.verdeckt-augen b { min-width: 28px; padding: 2px 7px; border-radius: 8px; background: var(--tusche); color: #fff; font-size: .85rem; }
.verdeckt-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* ======================================================================
   Punkteblock zum Ankreuzen (block.js, block-fuenf.js, block-farbreihen.js)
   Glas wie der Rest; am Handy (390 px) ohne waagerechtes Scrollen.
   ====================================================================== */
.punkteblock {
  width: 100%;
  max-width: 760px;
  display: grid;
  gap: 10px;
  padding: 14px 12px 12px;
  border-radius: 26px;
  background: var(--flaeche);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  box-shadow: var(--schatten);
  scroll-margin-top: 12px;
}
.punkteblock[hidden], .punkteblock [hidden] { display: none !important; }
.pb-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 0 4px; }
.pb-titel { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; }
.pb-titel small { display: block; margin-top: 1px; font-size: .78em; font-weight: 600; letter-spacing: 0; color: var(--tusche-weich); }
.pb-kopf-tun { display: flex; gap: 2px; }
.pb-kopf-tun .knopf.leise { min-height: 36px; padding: 0 8px; font-size: .92rem; }

/* Spieler mit Punkten; wer dran ist, trägt den Verlauf */
.pb-leiste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pb-leiste li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  box-shadow: var(--schatten-klein);
  font-weight: 600;
  font-size: .92rem;
}
.pb-leiste li b { font-variant-numeric: tabular-nums; font-weight: 750; }
.pb-leiste li.dran { background: var(--verlauf); color: #fff; box-shadow: 0 6px 16px rgba(139, 92, 246, .3); }
.pb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pb-lage {
  margin: 0;
  padding: 9px 14px;
  border-radius: 16px;
  background: rgba(139, 92, 246, .09);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .14);
  font-weight: 600;
  line-height: 1.35;
}
.pb-lage:focus { outline: none; }
.pb-lage:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Spieler einrichten ---------- */
.pb-einrichten { display: grid; gap: 10px; padding: 4px; }
.pb-frage { margin: 0; font-weight: 600; color: var(--tusche-weich); }
.pb-namen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pb-namen li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.pb-namen li > * { grid-area: auto; }
.pb-namen .platz-nr { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--verlauf); color: #fff; font-weight: 700; font-size: .85rem; }
.pb-einrichten-tun { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pb-los { min-width: min(100%, 220px); }

/* ---------- Fünf Würfel: Tabelle ---------- */
.pb-rollbar { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.pb-tabelle {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.pb-tabelle .pb-feldkopf { width: 8.6rem; }
.pb-tabelle th, .pb-tabelle td { padding: 3px 4px; border-bottom: 1px solid rgba(30, 27, 58, .07); text-align: center; vertical-align: middle; }
.pb-tabelle thead th {
  padding: 4px 4px 8px;
  border-bottom: 0;
  font-size: .86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pb-tabelle thead th .pb-name { display: block; }
.pb-tabelle thead th.dran { border-radius: 12px 12px 0 0; background: var(--verlauf); color: #fff; }
.pb-tabelle tbody th { padding-left: 8px; text-align: left; font-weight: 650; font-size: .95rem; line-height: 1.15; }
.pb-tabelle tbody th small { display: block; font-size: .74rem; font-weight: 550; color: var(--tusche-weich); }
.pb-tabelle td { height: 40px; font-weight: 650; }
.pb-tabelle td.dran { background: rgba(139, 92, 246, .08); }
.pb-tabelle tr:last-child td.dran { border-radius: 0 0 12px 12px; }
.pb-gestrichen { color: var(--tusche-weich); opacity: .6; }
.pb-summe th, .pb-summe td { background: rgba(255, 255, 255, .45); }
.pb-summe td.dran { background: rgba(139, 92, 246, .14); }
.pb-summe.zwischen th, .pb-summe.zwischen td { font-weight: 750; }
.pb-summe.bonus td { color: #059669; font-weight: 750; }
.pb-fehlt { color: var(--tusche-weich); font-weight: 600; font-size: .8rem; }
.pb-summe.gesamt th, .pb-summe.gesamt td { border-bottom: 0; font-size: 1.08rem; font-weight: 800; height: 46px; }
.pb-summe.gesamt th { border-radius: 0 0 0 14px; }
tr.pb-unten:first-of-type th, .pb-summe.bonus + tr th, .pb-summe.bonus + tr td { border-top: 10px solid transparent; background-clip: padding-box; }

.pb-vorschlag {
  width: 100%;
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: #6d28d9;
  box-shadow: inset 0 0 0 1.5px rgba(139, 92, 246, .45), 0 3px 8px rgba(80, 60, 160, .12);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .1s ease;
}
.pb-vorschlag:hover { background: #f5f0ff; }
.pb-vorschlag:active { transform: scale(.94); }
.pb-vorschlag:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.pb-vorschlag.null { background: rgba(255, 255, 255, .35); color: rgba(95, 90, 126, .8); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(30, 27, 58, .12); }
.pb-vorschlag.beste {
  background: var(--verlauf);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px rgba(139, 92, 246, .45);
  animation: pb-tipp 1.8s ease-in-out infinite;
}
@keyframes pb-tipp { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 22px rgba(236, 72, 153, .55); } }

/* ---------- Vier Farbreihen ---------- */
.pb-farb { display: grid; gap: 10px; }
.pb-zug { display: grid; gap: 8px; }
.pb-wurf { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-chip {
  --reihe: #fff;
  display: inline-grid;
  justify-items: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 120px;
  padding: 4px 4px 5px;
  white-space: nowrap;
  border-radius: 14px;
  background: color-mix(in oklab, var(--reihe) 16%, #fff);
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--reihe) 55%, #fff), 0 3px 8px rgba(80, 60, 160, .08);
  line-height: 1.1;
}
.pb-chip b { font-size: 1.1rem; font-weight: 800; color: color-mix(in oklab, var(--reihe) 70%, #000); }
.pb-chip small { font-size: .72rem; font-weight: 600; color: var(--tusche-weich); }
.pb-chip.weiss { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(139, 92, 246, .35), 0 4px 12px rgba(139, 92, 246, .2); }
.pb-chip.weiss b { color: var(--tusche); font-size: 1.35rem; }
.pb-zug-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-zug-knoepfe .knopf { flex: 1 1 120px; }
.pb-legende { margin: -2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .78rem; font-weight: 600; color: var(--tusche-weich); }
.pb-legende i { width: 14px; height: 14px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px var(--akzent); }
.pb-legende i.farbe { margin-left: 6px; box-shadow: 0 0 0 2px var(--akzent-2); }

.pb-karten { display: grid; gap: 10px; }
.pb-karte {
  display: grid;
  gap: 6px;
  padding: 8px 8px 7px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--schatten-klein);
}
.pb-karte.dran { box-shadow: inset 0 0 0 2px var(--akzent), 0 8px 22px rgba(139, 92, 246, .22); background: rgba(255, 255, 255, .75); }
.pb-karte header { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.pb-karte header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.pb-amzug { padding: 1px 9px; border-radius: 999px; background: var(--verlauf); color: #fff; font-size: .75rem; font-weight: 700; }
.pb-gesamt { margin-left: auto; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pb-gesamt small { font-size: .7rem; font-weight: 600; color: var(--tusche-weich); }
.pb-reihen { display: grid; gap: 4px; }
.pb-reihe {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr)) minmax(0, .75fr);
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--reihe) 88%, #fff), color-mix(in oklab, var(--reihe) 92%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px color-mix(in oklab, var(--reihe) 30%, transparent);
}
.pb-zahl {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: color-mix(in oklab, var(--reihe) 72%, #000);
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.pb-zahl.schluss { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--reihe) 60%, #fff); }
.pb-zahl.vorbei { opacity: .38; }
/* Kreuz: zwei Striche in Tinte über der Zahl */
.pb-zahl.an { color: color-mix(in oklab, var(--reihe) 45%, #fff); }
.pb-zahl.an::after {
  content: "";
  position: absolute;
  inset: 5px 3px;
  background:
    linear-gradient(to top right, transparent calc(50% - 1.6px), var(--tusche) calc(50% - 1.6px), var(--tusche) calc(50% + 1.6px), transparent calc(50% + 1.6px)),
    linear-gradient(to top left, transparent calc(50% - 1.6px), var(--tusche) calc(50% - 1.6px), var(--tusche) calc(50% + 1.6px), transparent calc(50% + 1.6px));
}
.pb-zahl.kann {
  z-index: 1;
  background: #fff;
  color: var(--tusche);
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--akzent), 0 4px 12px rgba(30, 27, 58, .35);
  cursor: pointer;
  animation: pb-kann 1.6s ease-in-out infinite;
}
.pb-zahl.kann.farbe { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--akzent-2), 0 4px 12px rgba(30, 27, 58, .35); }
.pb-zahl.kann:active { transform: scale(.92); }
.pb-zahl.kann:focus-visible { outline: 3px solid var(--tusche); outline-offset: 3px; }
@keyframes pb-kann { 50% { transform: translateY(-2px); } }
.pb-schloss { display: grid; place-items: center; color: rgba(255, 255, 255, .85); }
.pb-schloss svg { width: 18px; height: 18px; }
.pb-schloss.an { border-radius: 8px; background: var(--tusche); color: #fff; }
.pb-reihe.zu .pb-schloss:not(.an) { color: var(--tusche); }
.pb-reihe.zu { filter: saturate(.55); }
.pb-karte footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 0 4px; font-size: .8rem; font-weight: 600; color: var(--tusche-weich); }
.pb-fehl { display: inline-flex; align-items: center; gap: 4px; }
.pb-fehl span { margin-right: 2px; }
.pb-fehl i { position: relative; width: 16px; height: 16px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(30, 27, 58, .25); }
.pb-fehl i.an { background: #fee2e2; box-shadow: inset 0 0 0 1.5px #ef4444; }
.pb-fehl i.an::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: #dc2626; font-weight: 800; font-size: 15px; line-height: 1; }
.pb-reihenpunkte { display: inline-flex; gap: 4px; }
.pb-reihenpunkte b {
  min-width: 26px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--reihe) 18%, #fff);
  color: color-mix(in oklab, var(--reihe) 70%, #000);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pb-reihenpunkte b.minus { background: #fee2e2; color: #b91c1c; }

/* ---------- Spielende ---------- */
.pb-ende {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(236, 72, 153, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
  text-align: center;
}
.pb-pokal { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--verlauf); color: #fff; box-shadow: 0 8px 22px rgba(139, 92, 246, .4); }
.pb-pokal svg { width: 28px; height: 28px; }
.pb-sieger { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.pb-rang { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; min-width: min(100%, 260px); counter-reset: rang; }
.pb-rang li { display: flex; gap: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .6); font-weight: 600; counter-increment: rang; }
.pb-rang li::before { content: counter(rang) "."; color: var(--tusche-weich); }
.pb-rang li span { flex: 1; text-align: left; }
.pb-rang li:first-child { background: #fff; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .pb-vorschlag.beste, .pb-zahl.kann { animation: none; }
}
@media (max-width: 420px) {
  .punkteblock { padding: 12px 8px 10px; border-radius: 22px; }
  .pb-tabelle .pb-feldkopf { width: 6.4rem; }
  .pb-tabelle.n5 .pb-feldkopf, .pb-tabelle.n6 .pb-feldkopf { width: 5.6rem; }
  .pb-tabelle tbody th { padding-left: 4px; font-size: .86rem; }
  .pb-tabelle tbody th small { font-size: .68rem; }
  .pb-tabelle th, .pb-tabelle td { padding: 2px 2px; }
  .pb-karte { padding: 7px 6px 6px; }
  .pb-zahl { font-size: .86rem; height: 38px; border-radius: 7px; }
  .pb-schloss svg { width: 15px; height: 15px; }
}
/* Rechner: Spalten nicht endlos breit — höchstens ~130 px je Spieler, Tabelle mittig */
.pb-tabelle { margin-inline: auto; }
.pb-tabelle.n1 { max-width: calc(8.6rem + 130px); }
.pb-tabelle.n2 { max-width: calc(8.6rem + 260px); }
.pb-tabelle.n3 { max-width: calc(8.6rem + 390px); }
.pb-tabelle.n4 { max-width: calc(8.6rem + 520px); }

/* Dunkelmodus „Graphit“ (A.23.3.0, Grundlage in css/basis.css) — Würfel und die Zahlenreihen des Blocks bleiben hell */
[data-thema="dunkel"] .verdeckt-tafel, [data-thema="dunkel"] .verdeckt-liste li, [data-thema="dunkel"] .pb-leiste li, [data-thema="dunkel"] .pb-karte, [data-thema="dunkel"] .pb-rang li { background: var(--g-flaeche); }
[data-thema="dunkel"] .pb-karte.dran, [data-thema="dunkel"] .pb-rang li:first-child { background: var(--g-flaeche-hoch); }
[data-thema="dunkel"] .pb-summe th, [data-thema="dunkel"] .pb-summe td { background: rgba(255, 255, 255, .05); }
[data-thema="dunkel"] .pb-summe.bonus td { color: #34d399; }
[data-thema="dunkel"] .pb-vorschlag { background: var(--g-flaeche-hoch); color: #c4b5fd; }
[data-thema="dunkel"] .pb-vorschlag:hover { background: #3a3a3a; }
[data-thema="dunkel"] .w-zahl:focus { background: var(--g-feld); }
[data-thema="dunkel"] .pb-zahl.kann { --tusche: #1e1b3a; color: var(--tusche); }
[data-thema="dunkel"] .pb-zahl.an { --tusche: #1e1b3a; }
[data-thema="dunkel"] .pb-chip { background: color-mix(in oklab, var(--reihe) 24%, #232323); }
[data-thema="dunkel"] .pb-reihenpunkte b { background: color-mix(in oklab, var(--reihe) 24%, #232323); }
[data-thema="dunkel"] .pb-fehl i { background: #2e2e2e; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
[data-thema="dunkel"] .pb-fehl i.an { background: #3f1d1d; box-shadow: inset 0 0 0 1.5px #ef4444; }
[data-thema="dunkel"] .pb-reihenpunkte b.minus { background: #3f1d1d; color: #fca5a5; }
[data-thema="dunkel"] .pb-chip b, [data-thema="dunkel"] .pb-reihenpunkte b { color: color-mix(in oklab, var(--reihe) 55%, #fff); }
[data-thema="dunkel"] .pb-chip.weiss { background: var(--g-flaeche-hoch); }
[data-thema="dunkel"] .pb-legende i { background: #2e2e2e; }
