@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --grund: #d6d0c1;
  --grund-licht: #eeeadf;
  --tinte: #1c2627;
  --tinte-leise: #4f5c5b;
  --messing: #8a6418;
  --messing-hell: #d6ad55;
  --petrol-tief: #12494a;
  --fokus: #1c3a72;
  --knopf-rand: rgb(28 38 39 / 0.32);
  --knopf-hover: rgb(255 255 255 / 0.35);
  --knopf-voll: #12494a;
  --knopf-voll-text: #f6f1e4;
  --karte-papier: #fffdf7;
  --karte-text: #1c2627;
  --karte-text-leise: #55605f;
  --papier-rand: #c9c1ae;
  --schatten-hoch: 0 6px 10px rgb(10 20 20 / 0.25), 0 14px 28px rgb(10 20 20 / 0.25);
  --spieler-dran: rgb(214 173 85 / 0.22);
  --rinne: #2b1d13;
  --rinne-rand: rgb(0 0 0 / 0.35);
  --dicke: 56px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0f1617;
    --grund-licht: #1b2829;
    --tinte: #ebe5d6;
    --tinte-leise: #a5aea9;
    --messing: #d6ad55;
    --fokus: #9cc3ff;
    --knopf-rand: rgb(235 229 214 / 0.28);
    --knopf-hover: rgb(235 229 214 / 0.08);
    --knopf-voll: #d6ad55;
    --knopf-voll-text: #13201f;
    --schatten-hoch: 0 6px 10px rgb(0 0 0 / 0.45), 0 14px 28px rgb(0 0 0 / 0.4);
    --spieler-dran: rgb(214 173 85 / 0.14);
    --rinne: #1a120c;
    --rinne-rand: rgb(255 255 255 / 0.08);

    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template:
    "spieler leiste" auto
    "tisch tisch" minmax(0, 1fr)
    / minmax(0, 1fr) auto;
  background: radial-gradient(110% 80% at 50% 35%, var(--grund-licht), var(--grund) 75%) var(--grund);
  color: var(--tinte);
  font: 400 1.0625rem/1.4 "Alegreya Sans", system-ui, sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.titel {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.spieler-paar {
  grid-area: spieler;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.6rem;
  min-width: 0;
  padding: max(0.5rem, env(safe-area-inset-top)) 0 0.25rem max(0.75rem, env(safe-area-inset-left));
}

.spieler {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.3rem 0.85rem 0.4rem;
  border: 1.5px solid transparent;
  border-radius: 14px;
  transition: background-color 200ms, border-color 200ms;
}

.spieler.dran,
.spieler.sieger {
  border-color: var(--messing-hell);
  background: var(--spieler-dran);
}

.spieler.denkt {
  animation: denken 0.9s ease-in-out infinite alternate;
}

@keyframes denken {
  to {
    border-color: transparent;
  }
}

.spieler p {
  margin: 0;
}

.spieler-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5rem;
  white-space: nowrap;
  line-height: 1.2;
}

.name {
  font-weight: 700;
}

.gruppe {
  color: var(--tinte-leise);
  font-size: 0.9375rem;
}

.spieler.sieger .name::after {
  content: " ★";
  color: var(--messing);
}

.reihe {
  display: flex;
  gap: 3px;
  min-height: 15px;
}

.mini-kugel {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.5), transparent 45%), var(--farbe);
  box-shadow: inset 0 -2px 3px rgb(0 0 0 / 0.3), 0 0 0 1px rgb(0 0 0 / 0.15);
}

.mini-kugel.streifen {
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.5), transparent 45%),
    linear-gradient(#f4f1e6 0 24%, var(--farbe) 24% 76%, #f4f1e6 76%);
}

.mini-kugel.weg {
  opacity: 0.22;
  filter: grayscale(0.6);
}

.mini-kugel.leer {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--knopf-rand);
}

.mini-kugel.ziel {
  box-shadow: 0 0 0 2px var(--messing-hell), inset 0 -2px 3px rgb(0 0 0 / 0.3);
}

.leiste {
  grid-area: leiste;
  display: flex;
  align-items: center;
  padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.25rem 0.5rem;
}

.menue-knopf {
  width: 48px;
  height: 48px;
}

.menue-strich,
.menue-strich::before,
.menue-strich::after {
  display: block;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: currentcolor;
}

.menue-strich {
  position: relative;
}

.menue-strich::before,
.menue-strich::after {
  content: "";
  position: absolute;
  left: 0;
}

.menue-strich::before {
  top: -6.5px;
}

.menue-strich::after {
  top: 6.5px;
}

.knopf {
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1.5px solid var(--knopf-rand);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

@media (hover: hover) {
  .knopf:hover:not(:disabled) {
    background: var(--knopf-hover);
  }
}

.knopf:disabled {
  opacity: 0.45;
  cursor: default;
}

.knopf:focus-visible,
.knopf-rund:focus-visible,
.kraft:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
}

.knopf-voll {
  border-color: var(--knopf-voll);
  background: var(--knopf-voll);
  color: var(--knopf-voll-text);
}

@media (hover: hover) {
  .knopf-voll:hover:not(:disabled) {
    background: color-mix(in srgb, var(--knopf-voll) 85%, #000);
  }
}

.tisch {
  grid-area: tisch;
  position: relative;
  display: grid;
  grid-template:
    "feld steuerung" minmax(0, 1fr)
    / minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 0.25rem max(0.75rem, env(safe-area-inset-right)) 0.25rem max(0.75rem, env(safe-area-inset-left));
}

.feld {
  grid-area: feld;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.feld canvas {
  position: absolute;
  inset: 0;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tisch.hat-meldung .feld {
  opacity: 0.55;
  filter: saturate(0.6);
  pointer-events: none;
}

.steuerung {
  grid-area: steuerung;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.5rem 0 0.5rem 0.6rem;
}

.knopf-rund {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--dicke);
  height: var(--dicke);
  padding: 0;
  border: 1.5px solid var(--knopf-rand);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.knopf-rund:disabled {
  opacity: 0.45;
  cursor: default;
}

.knopf-rund[aria-expanded="true"] {
  border-color: var(--messing-hell);
  background: var(--spieler-dran);
}

@media (hover: hover) {
  .knopf-rund:hover:not(:disabled) {
    background: var(--knopf-hover);
  }
}

.mini-spielball {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #f1ede0 45%, #c9c3b2);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
}

.effet-punkt {
  position: absolute;
  left: calc(50% + var(--sx, 0) * 32%);
  top: calc(50% - var(--sy, 0) * 32%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8261d;
  translate: -50% -50%;
}

.kraft {
  --zug: 0;
  position: relative;
  flex: 0 1 380px;
  width: var(--dicke);
  min-height: 160px;
  border-radius: calc(var(--dicke) / 2);
  background: linear-gradient(90deg, rgb(255 255 255 / 0.06), transparent 40%, rgb(0 0 0 / 0.25)), var(--rinne);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.55), 0 0 0 1px var(--rinne-rand);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.kraft[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}

.kraft.zieht {
  cursor: grabbing;
}

.kraft-fuell {
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--dicke) + var(--zug) * (100% - var(--dicke)));
  background: linear-gradient(180deg, #2f8f7a, #d6ad55 55%, #d0442f);
  opacity: 0;
}

.kraft.zieht .kraft-fuell {
  opacity: 0.9;
}

.kraft-griff {
  position: absolute;
  left: 4px;
  top: 4px;
  width: calc(var(--dicke) - 8px);
  height: calc(var(--dicke) - 8px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3dba0, #d6ad55 50%, #8a6418);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.5);
  translate: 0 calc(var(--zug) * (var(--laenge, 0px) - var(--dicke)));
}

.kraft-text {
  position: absolute;
  inset: auto 0 0.8rem;
  color: #efe2c4;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.kraft-text::before {
  content: "";
  display: block;
  width: 0.5em;
  height: 0.5em;
  margin: 0 auto 0.35rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  opacity: 0.7;
}

.kraft.zieht .kraft-text {
  visibility: hidden;
}

.kraft-griff {
  display: grid;
  place-items: center;
  color: #3a2508;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.effet-feld {
  grid-area: feld;
  z-index: 2;
  place-self: start end;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin: 0.5rem;
  padding: 1rem 1rem 0.7rem;
  border-radius: 18px;
  background: var(--karte-papier);
  color: var(--karte-text);
  box-shadow: 0 0 0 1px var(--papier-rand), var(--schatten-hoch);
}

.effet-feld[data-ecke="oben-links"] {
  place-self: start start;
}

.effet-feld[data-ecke="oben-rechts"] {
  place-self: start end;
}

.effet-feld[data-ecke="unten-links"] {
  place-self: end start;
}

.effet-feld[data-ecke="unten-rechts"] {
  place-self: end end;
}

.effet-ball {
  position: relative;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff, #f1ede0 50%, #cfc8b6);
  box-shadow: inset 0 -6px 14px rgb(0 0 0 / 0.18), 0 0 0 2px var(--messing-hell);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.effet-kreuz {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(rgb(28 38 39 / 0.18), rgb(28 38 39 / 0.18)) center / 1px 100% no-repeat,
    linear-gradient(rgb(28 38 39 / 0.18), rgb(28 38 39 / 0.18)) center / 100% 1px no-repeat;
  pointer-events: none;
}

.effet-marke {
  position: absolute;
  left: calc(50% + var(--sx, 0) * 50%);
  top: calc(50% - var(--sy, 0) * 50%);
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #c8261d;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.45);
  translate: -50% -50%;
  pointer-events: none;
}

.effet-text {
  width: 11.5rem;
  min-height: 2.5em;
  margin: 0;
  color: var(--karte-text-leise);
  font-size: 0.875rem;
  line-height: 1.25;
  text-align: center;
}

.effet-text span {
  color: var(--karte-text);
  font-weight: 700;
}

.hinweise {
  grid-area: feld;
  z-index: 1;
  place-self: start center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: min(26rem, calc(100% - 1rem));
  margin-top: 0.5rem;
  pointer-events: none;
}

.tipp,
.urteil {
  margin: 0;
  padding: 0.45rem 1rem;
  border-radius: 14px;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.tipp {
  background: rgb(10 30 30 / 0.72);
  color: #f3e7c6;
  box-shadow: 0 0 0 1px rgb(214 173 85 / 0.5);
}

.urteil {
  grid-area: tisch;
  z-index: 2;
  place-self: start center;
  max-width: min(26rem, calc(100% - 2rem));
  margin-top: 0.75rem;
  background: var(--karte-papier);
  color: var(--karte-text);
  box-shadow: 0 0 0 1px var(--papier-rand), var(--schatten-hoch);
  font-weight: 700;
  pointer-events: none;
  transition: opacity 400ms;
}

.urteil.weg {
  opacity: 0;
}

.meldung {
  grid-area: feld;
  z-index: 3;
  place-self: center;
  width: min(22rem, calc(100% - 2rem));
  padding: 1.5rem 1.75rem 1.6rem;
  border-radius: 18px;
  background: var(--karte-papier);
  color: var(--karte-text);
  box-shadow: 0 0 0 1px var(--papier-rand), var(--schatten-hoch);
  text-align: center;
}

.meldung h2 {
  margin: 0 0 0.3rem;
  font-size: 1.75rem;
  line-height: 1.15;
}

.meldung p {
  margin: 0 0 1.25rem;
  color: var(--karte-text-leise);
}

.meldung .knopf {
  --fokus: #1c3a72;
}

.meldung .knopf-voll {
  border-color: var(--petrol-tief);
  background: var(--petrol-tief);
  color: #f6f1e4;
}

.meldung-aktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* Spielwahl */

.meldung .knopf,
.wahl .knopf {
  --knopf-rand: rgb(28 38 39 / 0.32);
  --knopf-hover: rgb(28 38 39 / 0.06);
}

.wahl .knopf-voll {
  border-color: var(--petrol-tief);
  background: var(--petrol-tief);
  color: #f6f1e4;
}

.wahl {
  --fokus: #1c3a72;

  width: min(27rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 1.4rem 1.6rem 1.5rem;
  border: 0;
  border-radius: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--karte-papier);
  color: var(--karte-text);
  box-shadow: 0 0 0 1px var(--papier-rand), var(--schatten-hoch);
}

.wahl::backdrop {
  background: rgb(8 24 24 / 0.5);
}

.wahl h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.15;
}

.wahl-gruppe {
  min-width: 0;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}

.wahl-gruppe legend {
  margin-bottom: 0.4rem;
  padding: 0;
  color: var(--karte-text-leise);
  font-size: 0.9375rem;
}

.wahl-gruppe:disabled {
  opacity: 0.45;
}

.pillen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pille {
  position: relative;
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1.5px solid rgb(28 38 39 / 0.28);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.pillen-gross .pille {
  min-height: 52px;
  font-size: 1.125rem;
}

.pille input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.wahl-gruppe:disabled .pille,
.wahl-gruppe:disabled .pille input {
  cursor: default;
}

@media (hover: hover) {
  .wahl-gruppe:not(:disabled) .pille:not(:has(:checked)):hover {
    background: rgb(28 38 39 / 0.06);
  }
}

.pille:has(:checked) {
  border-color: var(--petrol-tief);
  background: var(--petrol-tief);
  color: #f6f1e4;
}

.pille:has(:focus-visible) {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
}

.wahl-frage {
  margin: -0.3rem 0 1.1rem;
  padding: 0.8rem 0.9rem 0.9rem;
  border-radius: 14px;
  background: rgb(214 173 85 / 0.2);
  box-shadow: inset 0 0 0 1px rgb(138 100 24 / 0.45);
}

.wahl-frage p {
  margin: 0 0 0.6rem;
  font-weight: 700;
}

.wahl-frage-aktionen {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.schalter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  margin-bottom: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.schalter input {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: rgb(28 38 39 / 0.22);
  appearance: none;
  cursor: pointer;
  transition: background-color 150ms;
}

.schalter input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(8 24 24 / 0.35);
  transition: translate 150ms;
}

.schalter input:checked {
  background: var(--petrol-tief);
}

.schalter input:checked::before {
  translate: 20px 0;
}

.schalter input:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
}

.statistik {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.4rem 1rem;
  margin: 0 0 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgb(28 38 39 / 0.15);
}

.statistik h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--karte-text-leise);
  font-size: 0.9375rem;
  font-weight: 400;
}

.statistik table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.statistik th,
.statistik td {
  padding: 0.1rem 0.7rem 0.1rem 0;
  text-align: right;
}

.statistik thead th {
  color: var(--karte-text-leise);
  font-size: 0.8125rem;
  font-weight: 400;
}

.statistik th:first-child {
  text-align: left;
}

.statistik td {
  font-weight: 700;
}

.knopf-klein {
  min-height: 40px;
  padding: 0 0.9rem;
  font-size: 0.875rem;
}

.tasten {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.3rem;
  margin: 0 0 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgb(28 38 39 / 0.15);
  color: var(--karte-text-leise);
  font-size: 0.875rem;
  line-height: 1.3;
}

.tasten dt {
  white-space: nowrap;
}

.tasten dd {
  margin: 0;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.3em;
  border: 1px solid rgb(28 38 39 / 0.25);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--karte-text);
  font: inherit;
  font-weight: 700;
  text-align: center;
}

.wahl-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.wahl-kopf h2 {
  margin: 0;
}

.wahl-kopf-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wahl-aktionen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.credits {
  color: var(--karte-text-leise);
  font-size: 0.875rem;
}

@media (pointer: coarse) {
  .tasten {
    display: none;
  }
}

.ansage {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .spieler.denkt {
    animation: none;
    border-style: dashed;
  }

  .spieler,
  .urteil,
  .schalter input,
  .schalter input::before {
    transition: none;
  }
}

@media (orientation: portrait) and (max-width: 820px), (orientation: landscape) and (max-height: 520px) {
  :root {
    --dicke: 44px;
  }

  .mini-spielball {
    width: 28px;
    height: 28px;
  }

  .gruppe-tisch {
    display: none;
  }

  .spieler-name {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .gruppe {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (orientation: portrait) and (max-width: 820px) {
  body {
    grid-template:
      "spieler leiste" auto
      "tisch tisch" minmax(0, 1fr)
      / minmax(0, 1fr) auto;
  }

  .leiste {
    padding: max(0.4rem, env(safe-area-inset-top)) max(0.4rem, env(safe-area-inset-right)) 0 0.4rem;
  }

  .spieler-paar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    padding: max(0.4rem, env(safe-area-inset-top)) 0 0 max(0.4rem, env(safe-area-inset-left));
  }

  .spieler {
    padding: 0.3rem 0.6rem 0.4rem;
  }

  .spieler-name {
    gap: 0.35rem;
    font-size: 1rem;
  }

  .gruppe {
    font-size: 0.875rem;
  }

  .reihe {
    gap: 2px;
  }

  .mini-kugel {
    width: 14px;
    height: 14px;
  }

  .tisch {
    grid-template:
      "feld" minmax(0, 1fr)
      "steuerung" auto
      / minmax(0, 1fr);
    padding: 0.2rem max(0.25rem, env(safe-area-inset-right)) 0 max(0.25rem, env(safe-area-inset-left));
  }

  .steuerung {
    flex-direction: row;
    gap: 0.6rem;
    padding: 0.4rem 0.3rem max(0.4rem, env(safe-area-inset-bottom));
  }

  .kraft {
    flex: 1 1 auto;
    width: auto;
    min-height: 0;
    height: var(--dicke);
    max-width: 30rem;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.06), transparent 40%, rgb(0 0 0 / 0.25)), var(--rinne);
  }

  .kraft-fuell {
    inset: 0 auto 0 0;
    width: calc(var(--dicke) + var(--zug) * (100% - var(--dicke)));
    height: auto;
    background: linear-gradient(90deg, #2f8f7a, #d6ad55 55%, #d0442f);
  }

  .kraft-griff {
    translate: calc(var(--zug) * (var(--laenge, 0px) - var(--dicke))) 0;
  }

  .kraft-text {
    inset: 50% 0.9rem auto auto;
    translate: 0 -50%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .kraft-text::before {
    order: 1;
    margin: 0;
    rotate: -45deg;
  }

  .effet-feld {
    place-self: end start;
  }

  .effet-feld[data-ecke] {
    margin: 0.4rem;
  }

  .hinweise {
    margin-top: 0.3rem;
  }

  .urteil {
    grid-area: spieler;
    place-self: stretch;
    display: grid;
    place-items: center;
    max-width: none;
    margin: max(0.4rem, env(safe-area-inset-top)) 0 0 max(0.4rem, env(safe-area-inset-left));
    line-height: 1.2;
  }

}

@media (orientation: landscape) and (max-height: 520px) {
  body {
    grid-template:
      "leiste tisch" auto
      "spieler tisch" minmax(0, 1fr)
      / 6.25rem minmax(0, 1fr);
  }

  .spieler-paar {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.3rem;
    padding: 0.3rem 0.3rem 0 max(0.3rem, env(safe-area-inset-left));
  }

  .spieler {
    padding: 0.2rem 0.5rem 0.3rem;
  }

  .spieler-name {
    font-size: 0.9375rem;
  }

  .gruppe {
    font-size: 0.8125rem;
  }

  .reihe {
    flex-wrap: wrap;
    gap: 2px;
    max-width: 63px;
  }

  .mini-kugel {
    width: 13px;
    height: 13px;
  }

  .leiste {
    padding: max(0.4rem, env(safe-area-inset-top)) 0 0 max(0.4rem, env(safe-area-inset-left));
  }

  .tisch {
    padding: max(0.25rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom)) 0;
  }

  .steuerung {
    gap: 0.6rem;
    padding: 0.25rem 0 0.25rem 0.4rem;
  }

  .kraft {
    flex-basis: 260px;
    min-height: 120px;
  }

  .effet-feld {
    padding: 0.6rem 0.6rem 0.4rem;
  }

  .effet-ball {
    width: 120px;
    height: 120px;
  }

  .hinweise {
    margin-top: 0.3rem;
  }
}
