/* junky7: dunkler Tisch, Karten mit eigener Farbe je Zahl, Akzent #7c6fff */
/* Schriften selbst gehostet (OFL, aus @fontsource, Lizenzen in fonts/): kein Abruf bei Google */
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/big-shoulders-display-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/big-shoulders-display-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/big-shoulders-display-latin-ext-900-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/big-shoulders-display-latin-900-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/familjen-grotesk-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/familjen-grotesk-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/familjen-grotesk-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/familjen-grotesk-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/familjen-grotesk-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/familjen-grotesk-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #0a0a0f;
  --flaeche: #13121b;
  --flaeche-2: #1b1a26;
  --linie: rgba(255, 255, 255, .09);
  --text: #fff;
  --leise: #9c99bd;
  --akzent: #7c6fff;
  --akzent-hell: #a79eff;
  --rot: #ff5470;
  --gold: #ffc94d;
  --eis: #82dcff;
  --gruen: #57e6a4;
  --chat-h: 48px;
  --zahl: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --schrift: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;

  /* Zahlenfarben: gleiche Helligkeit, eigener Farbton je Wert; die 7 trägt den Akzent */
  --c0: #e9e7f7;
  --c1: oklch(.80 .15 25);
  --c2: oklch(.81 .15 55);
  --c3: oklch(.85 .15 88);
  --c4: oklch(.86 .17 115);
  --c5: oklch(.82 .17 145);
  --c6: oklch(.83 .13 172);
  --c7: oklch(.72 .19 285);
  --c8: oklch(.82 .12 200);
  --c9: oklch(.78 .13 230);
  --c10: oklch(.72 .16 258);
  --c11: oklch(.75 .2 322);
  --c12: oklch(.74 .2 355);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--schrift);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-size: 22px; letter-spacing: -.01em; }
h3 { font-size: 15px; color: var(--leise); font-weight: 600; margin-bottom: 8px; }
p { margin: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
.leise { color: var(--leise); font-weight: 500; }
.klein { font-size: 13px; }
.mitte { text-align: center; }
:focus-visible { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 20px);
}
body.im-raum #app { padding-bottom: calc(env(safe-area-inset-bottom) + var(--chat-h) + 12px); }
.laden { text-align: center; padding-top: 40dvh; color: var(--leise); }

/* ---------- Knöpfe ---------- */

.knopf, .knopf-leise {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform .12s ease, background-color .2s, opacity .2s;
}
.knopf { background: var(--akzent); color: #fff; }
.knopf:hover:not(:disabled) { background: #8b80ff; }
.knopf-leise { background: var(--flaeche-2); color: var(--text); }
.knopf-leise:hover:not(:disabled) { background: #242233; }
.knopf:active:not(:disabled), .knopf-leise:active:not(:disabled) { transform: scale(.96); }
.knopf:disabled, .knopf-leise:disabled { opacity: .42; cursor: default; }
.knopf.gross, .knopf-leise.gross {
  width: 100%;
  min-height: 60px;
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .01em;
  border-radius: 18px;
}
.knopf-leise.klein { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.knopf-leise.breit { width: 100%; margin-top: 12px; }
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Wortmarke ---------- */

.marke {
  font-family: var(--schrift);
  font-weight: 700;
  letter-spacing: -.045em;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.marke-sieben {
  display: inline-grid;
  place-items: center;
  font-family: var(--zahl);
  font-weight: 900;
  letter-spacing: 0;
  background: var(--akzent);
  color: #fff;
  width: .78em;
  height: 1.1em;
  border-radius: .14em;
  margin-left: .08em;
  transform: rotate(9deg) translateY(-.04em);
  box-shadow: 0 .08em .3em rgba(124, 111, 255, .45);
}
.marke.gross { font-size: 72px; }

/* ---------- Start ---------- */

.start { display: flex; flex-direction: column; align-items: stretch; }
.start h1 { text-align: center; margin-top: 4px; }
.unterzeile { text-align: center; color: var(--leise); font-weight: 500; max-width: 30ch; margin: 10px auto 26px; }

.faecher { position: relative; height: 178px; margin-top: 8px; cursor: pointer; }
.faecher .f-karte {
  position: absolute;
  left: 50%;
  top: 22px;
  --b: 70px;
  transform: translateX(-50%) translateY(var(--y)) rotate(calc(var(--i) * 11deg));
  transform-origin: 50% 160%;
  animation: austeilen 620ms cubic-bezier(.2, .9, .25, 1) var(--d) both;
}
.f-karte:nth-child(4) { z-index: 2; }
@keyframes austeilen {
  from { transform: translateX(-50%) translateY(90px) rotate(0deg); opacity: 0; }
}

.form { display: grid; gap: 10px; }
.form label { font-size: 14px; color: var(--leise); font-weight: 500; }
.form input {
  background: var(--flaeche);
  border: 1.5px solid var(--linie);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 19px;
  font-weight: 700;
  outline: none;
  transition: border-color .2s;
}
.form input:focus { border-color: var(--akzent); }
.form .knopf.gross { margin-top: 4px; }

.block { margin-top: 32px; }
.block h2 { margin-bottom: 10px; }
.raum-liste { display: grid; gap: 8px; }
.raum-zeile {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 14px;
  padding: 12px 14px;
}
.raum-zeile b { font-family: var(--zahl); font-weight: 900; font-size: 24px; letter-spacing: .06em; }
.raum-zeile span { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raum-zeile:hover { border-color: rgba(124, 111, 255, .5); }
.leer { color: var(--leise); font-weight: 500; font-size: 15px; padding: 4px 0; }

/* ---------- Beitritt und Lobby ---------- */

.beitritt, .lobby { display: flex; flex-direction: column; }
.zurueck { align-self: flex-start; margin-bottom: 30px; }
.code {
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 92px;
  line-height: .9;
  letter-spacing: .07em;
}
.b-info { margin: 12px 0 14px; max-width: 34ch; }
.namen-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 7px 14px; font-weight: 700; }
.chip:hover { border-color: var(--akzent); }

.kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.code-block { display: grid; gap: 10px; justify-items: start; padding-bottom: 26px; border-bottom: 1px solid var(--linie); }
.lobby h2 { margin: 22px 0 12px; display: flex; justify-content: space-between; align-items: baseline; }
.lobby h2 .leise { font-size: 15px; }
.spieler-liste { display: grid; gap: 6px; }
.spieler {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  background: var(--flaeche);
  border-radius: 14px;
  padding: 8px 10px;
  animation: hinein 380ms cubic-bezier(.2, .9, .25, 1);
}
@keyframes hinein { from { opacity: 0; transform: translateY(8px); } }
.initiale {
  display: grid;
  place-items: center;
  width: 36px;
  height: 46px;
  border-radius: 8px;
  background: #211e3d;
  color: var(--akzent-hell);
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 24px;
}
.s-name { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.s-rolle { font-size: 13px; }
.einstellung {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--linie);
}
.stepper { display: flex; align-items: center; gap: 4px; background: var(--flaeche); border-radius: 14px; padding: 4px; }
.stepper-k { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--flaeche-2); font-size: 22px; font-weight: 700; }
.stepper-k:disabled { opacity: .4; }
.stepper input {
  width: 52px;
  text-align: center;
  background: transparent;
  border: 0;
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 30px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.partien-text { font-family: var(--zahl); font-weight: 900; font-size: 30px; }
.l-start { margin-top: 18px; display: grid; gap: 10px; text-align: center; }

.warte { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--leise); font-weight: 600; min-height: 60px; }
.puls { width: 9px; height: 9px; border-radius: 50%; background: var(--akzent); animation: puls 1.4s ease-in-out infinite; flex: none; }
@keyframes puls { 50% { opacity: .25; transform: scale(.7); } }

/* ---------- Karten ---------- */

.karte {
  --b: 64px;
  --f: var(--c0);
  width: var(--b);
  height: calc(var(--b) * 1.42);
  flex: none;
  perspective: 700px;
  position: relative;
}
.karte-innen { position: absolute; inset: 0; transform-style: preserve-3d; }
.karte-vorne, .karte-hinten {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--b) * .14);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.karte-vorne {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklab, var(--f) 9%, transparent) 0 2px, transparent 2px 9px),
    linear-gradient(165deg, #201e2e, #111019);
  border: 1.5px solid color-mix(in oklab, var(--f) 55%, transparent);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .7), inset 0 calc(var(--b) * -.07) 0 var(--f);
  color: var(--f);
}
.karte-hinten {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .14) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, rgba(124, 111, 255, .55) 0 3px, transparent 3px 8px),
    #1b1638;
  border: 1.5px solid rgba(124, 111, 255, .7);
}
.wert {
  font-family: var(--zahl);
  font-weight: 900;
  font-size: calc(var(--b) * .8);
  line-height: 1;
  letter-spacing: -.02em;
  margin-top: calc(var(--b) * -.06);
}
.ecke {
  position: absolute;
  top: calc(var(--b) * .06);
  left: calc(var(--b) * .1);
  font-family: var(--zahl);
  font-weight: 900;
  font-size: calc(var(--b) * .2);
  line-height: 1;
}
.unter {
  position: absolute;
  bottom: calc(var(--b) * .12);
  left: 0;
  right: 0;
  text-align: center;
  font-size: calc(var(--b) * .14);
  font-weight: 700;
  line-height: 1.05;
  padding: 0 4px;
}
.z0 { --f: var(--c0); } .z1 { --f: var(--c1); } .z2 { --f: var(--c2); } .z3 { --f: var(--c3); }
.z4 { --f: var(--c4); } .z5 { --f: var(--c5); } .z6 { --f: var(--c6); } .z7 { --f: var(--c7); }
.z8 { --f: var(--c8); } .z9 { --f: var(--c9); } .z10 { --f: var(--c10); } .z11 { --f: var(--c11); } .z12 { --f: var(--c12); }

/* Bonus und ×2: voll gefüllt, Aktionen: gefüllt mit abgeschrägten Ecken */
.bonus .karte-vorne, .mal .karte-vorne, .aktion .karte-vorne { border: 0; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .7); }
.bonus .karte-vorne { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 9px), var(--gold); color: #261a00; }
.mal .karte-vorne { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 9px), #f3f1ff; color: #17142e; }
.bonus .wert, .mal .wert { font-size: calc(var(--b) * .56); }
.aktion .karte-vorne {
  border-radius: 0;
  clip-path: polygon(16% 0, 84% 0, 100% 11%, 100% 89%, 84% 100%, 16% 100%, 0 89%, 0 11%);
  color: #fff;
}
.aktion .wert { font-size: calc(var(--b) * .34); letter-spacing: .01em; margin-top: calc(var(--b) * -.12); }
.aktion .unter { opacity: .8; }
.a-joker .karte-vorne { background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .25), transparent 60%), var(--akzent); }
.a-stopp .karte-vorne { background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .35), transparent 60%), var(--eis); color: #062634; }
.a-dreier .karte-vorne { background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .25), transparent 60%), #ff6b9a; color: #2b0614; }

.karte.mini { --b: 23px; }
.karte.mini .karte-vorne { border-width: 1px; box-shadow: inset 0 -2px 0 var(--f); }
.karte.mini .wert { font-size: 17px; margin-top: -1px; }
.karte.mini.bonus .wert, .karte.mini.mal .wert { font-size: 11px; font-family: var(--schrift); font-weight: 700; letter-spacing: -.04em; }
.karte.mini.aktion .wert { font-size: 16px; margin-top: 0; }

.karte.bust { --f: var(--rot); }
.karte.bust .karte-vorne { background: linear-gradient(165deg, #2a1119, #150a0f); }
.karte.bust::after {
  content: '';
  position: absolute;
  left: -6%;
  right: -6%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: var(--rot);
  border-radius: 2px;
  transform: rotate(-56deg);
  box-shadow: 0 0 10px var(--rot);
}
.karte.mini.bust::after { height: 2px; }

.karte.neu .karte-innen { animation: aufdecken 560ms cubic-bezier(.2, .9, .25, 1) var(--verz, 0ms) both; }
.karte.bust { transform: translateY(5px) rotate(-7deg); }
.karte.neu.bust { animation: kippen 420ms cubic-bezier(.3, 1.4, .5, 1) calc(var(--verz, 0ms) + 520ms) both; }
.karte.neu.bust::after { animation: einblenden 200ms ease calc(var(--verz, 0ms) + 500ms) both; }
@keyframes aufdecken {
  from { transform: translateY(-22px) rotateY(180deg) scale(.86); }
  60% { transform: translateY(2px) rotateY(-8deg) scale(1.03); }
  to { transform: none; }
}
@keyframes kippen { from { transform: none; } }
@keyframes einblenden { from { opacity: 0; transform: rotate(-56deg) scaleX(0); } }

/* ---------- Tisch ---------- */

.tisch {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100dvh - var(--chat-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 26px);
}
.leiste { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.marke-k { padding: 8px 10px; background: transparent; }
.marke-k .marke { font-size: 17px; }
.leiste-info { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: center; font-size: 13px; color: var(--leise); font-weight: 500; }
.leiste-info b { color: var(--text); font-weight: 700; }
.tabelle-k { padding: 9px 14px; font-size: 14px; }

.gegner { display: grid; gap: 6px; align-content: start; flex: 1; }
.g {
  display: grid;
  grid-template-columns: minmax(64px, 30%) 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 13px;
  background: var(--flaeche);
  border: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, opacity .25s;
}
.g-name { display: grid; min-width: 0; line-height: 1.1; }
.g-name b { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-karten { display: flex; min-width: 0; height: 33px; align-items: center; }
.g-karten .karte:not(:first-child) { margin-left: min(3px, calc((100% - var(--n) * 23px) / (var(--n) - 1))); }
.g-punkte { display: grid; justify-items: end; line-height: 1; min-width: 38px; }
.g-punkte b { font-family: var(--zahl); font-weight: 900; font-size: 24px; }
.g-punkte small { font-size: 12px; color: var(--leise); font-weight: 500; margin-top: 2px; }
.g.raus .g-name b, .g.raus .g-karten { opacity: .55; }
.dran {
  border-color: var(--akzent) !important;
  box-shadow: 0 0 0 1px var(--akzent), 0 0 26px -6px var(--akzent);
  animation: leuchten 1.8s ease-in-out infinite;
}
@keyframes leuchten { 50% { box-shadow: 0 0 0 1px var(--akzent), 0 0 34px -2px rgba(124, 111, 255, .75); } }

.status { font-style: normal; font-size: 11px; font-weight: 700; justify-self: start; border-radius: 6px; line-height: 1; }
.status.st-gestoppt, .status.st-bust, .status.st-sieben { padding: 3px 6px; margin-top: 3px; }
.st-gestoppt { background: rgba(130, 220, 255, .16); color: var(--eis); }
.st-bust { background: rgba(255, 84, 112, .18); color: var(--rot); }
.st-sieben { background: rgba(255, 201, 77, .2); color: var(--gold); }

.meine {
  background: linear-gradient(180deg, var(--flaeche-2), var(--flaeche));
  border: 1px solid var(--linie);
  border-radius: 22px;
  padding: 12px 14px 12px;
  display: grid;
  gap: 10px;
  transition: border-color .25s, box-shadow .25s;
}
.meine-kopf { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.ich-name { font-size: 20px; font-weight: 700; }
.meine .status { font-size: 13px; padding: 4px 8px; margin: 0; }
.meine-punkte { display: grid; justify-items: end; line-height: .9; }
.meine-punkte b { font-family: var(--zahl); font-weight: 900; font-size: 46px; }
.meine-punkte small { font-size: 12px; color: var(--leise); font-weight: 500; }
.hand { display: flex; justify-content: center; min-height: 91px; align-items: center; }
.hand .karte:not(:first-child) { margin-left: min(7px, calc((100% - var(--n) * var(--b)) / (var(--n) - 1))); }
.hand.mods { min-height: 0; }
.hand.mods .karte { --b: 44px; }
.meine.raus .hand { opacity: .7; }
.meine[data-status='sieben'] { border-color: var(--gold); box-shadow: 0 0 30px -8px var(--gold); }

.sieben { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.pips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pips i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); transition: background-color .3s; }
.pips i.voll { background: var(--f); box-shadow: 0 0 8px -1px var(--f); }

.knoepfe { display: grid; gap: 8px; min-height: 92px; align-content: end; }
.hinweis { text-align: center; font-size: 15px; font-weight: 600; }
.hinweis.du { color: var(--akzent-hell); }
.ziehen { background: var(--akzent); }
.knopf.stopp { background: var(--eis); color: #062634; }
.knopf.stopp:hover:not(:disabled) { background: #9de4ff; }

/* ---------- Tabelle (Panel) ---------- */

.panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: #100f17;
  border-left: 1px solid var(--linie);
  padding: calc(env(safe-area-inset-top) + 16px) 18px calc(env(safe-area-inset-bottom) + 20px);
  overflow-y: auto;
  z-index: 40;
  transform: translateX(105%);
  transition: transform .32s cubic-bezier(.2, .9, .25, 1);
}
body.im-spiel .panel { display: block; }
.panel.offen { transform: none; box-shadow: -30px 0 60px rgba(0, 0, 0, .6); }
.panel-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-zu { padding: 8px 14px; }
.stand { margin-bottom: 22px; }
.stand-liste, .ergebnis { display: grid; gap: 4px; }
.stand-liste li, .ergebnis li {
  display: grid;
  grid-template-columns: 26px 1fr auto 52px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--flaeche);
  position: relative;
}
.stand-liste li.ich, .ergebnis li.ich { background: #1f1c38; }
.platz { font-family: var(--zahl); font-weight: 900; font-size: 20px; color: var(--leise); }
.stand-liste li.erster .platz, .ergebnis li.erster .platz { color: var(--gold); }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wert { font-family: var(--zahl); font-weight: 900; font-size: 21px; text-align: right; }
.plus, .pp { font-size: 13px; color: var(--akzent-hell); font-weight: 700; text-align: right; }
.mischungen { border-top: 1px solid var(--linie); padding-top: 16px; }
.mischungen p { margin-bottom: 10px; }
.mischung { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.mischung > span:first-child { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mischung code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--leise); }
.mischung .knopf-leise { justify-self: start; }
.pruef { font-size: 13px; }
.pruef.gut { color: var(--gruen); }
.pruef.schlecht { color: var(--rot); }

/* ---------- Chat ---------- */

.chat {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #111018;
  border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
body.im-raum .chat { display: block; }
/* Chat bleibt auch unter offenen Ergebnisblättern erreichbar */
body:has(#sheet:not([hidden])) .chat { z-index: 55; }
.chat-leiste {
  width: 100%;
  height: var(--chat-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
  max-width: 560px;
  margin: 0 auto;
}
.zaehler {
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--akzent);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  padding: 0 6px;
  animation: hinein 300ms cubic-bezier(.2, .9, .25, 1);
}
.zaehler[hidden] { display: none; }
.chat-letzte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--leise); font-weight: 500; font-size: 14px; }
.chat-koerper { display: none; flex-direction: column; height: min(55dvh, 460px); max-width: 560px; margin: 0 auto; padding: 0 12px 12px; }
body.chat-offen .chat-koerper { display: flex; }
body.chat-offen .chat { box-shadow: 0 -30px 60px rgba(0, 0, 0, .6); }
.chat-liste { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 10px; }
.chat-liste li { max-width: 82%; background: var(--flaeche-2); border-radius: 14px 14px 14px 4px; padding: 7px 11px; display: grid; gap: 1px; align-self: flex-start; }
.chat-liste li.mein { align-self: flex-end; background: #2a2552; border-radius: 14px 14px 4px 14px; }
.chat-liste b { font-size: 12px; color: var(--akzent-hell); }
.chat-liste span { font-weight: 500; overflow-wrap: anywhere; }
.chat-liste time { font-size: 11px; color: var(--leise); font-weight: 500; justify-self: end; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-form input { background: var(--flaeche); border: 1.5px solid var(--linie); border-radius: 12px; padding: 11px 14px; outline: none; font-weight: 600; min-width: 0; }
.chat-form input:focus { border-color: var(--akzent); }

/* ---------- Sheet ---------- */

.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-grund { position: absolute; inset: 0; background: rgba(6, 6, 12, .66); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.sheet-inhalt {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  background: #15141f;
  border: 1px solid var(--linie);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 22px 18px calc(env(safe-area-inset-bottom) + var(--chat-h) + 20px);
  display: grid;
  gap: 12px;
  transform: translateY(102%);
  transition: transform .34s cubic-bezier(.2, .9, .25, 1);
}
.sheet.an .sheet-grund { opacity: 1; }
.sheet.an .sheet-inhalt { transform: none; }
.sheet-kopf { display: flex; justify-content: space-between; align-items: center; }
.sheet-karte { display: flex; justify-content: center; margin-top: -4px; }
.sheet-karte .karte { --b: 78px; }
.sheet.an .sheet-karte .karte-innen { animation: aufdecken 600ms cubic-bezier(.2, .9, .25, 1) 120ms both; }
.ziel-liste { display: grid; gap: 8px; margin-top: 4px; }
.ziel {
  display: grid;
  text-align: left;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--linie);
  background: var(--flaeche-2);
  transition: border-color .2s, transform .12s;
}
.ziel b { font-size: 19px; }
.ziel .leise { font-size: 13px; }
.ziel:hover:not(:disabled) { border-color: var(--akzent); }
.ziel:active:not(:disabled) { transform: scale(.98); }
.ziel:disabled { opacity: .45; }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 10px 0 6px; }
.saeule { display: grid; gap: 8px; text-align: center; animation: steigen 700ms cubic-bezier(.2, .9, .25, 1) both; }
.saeule.eins { animation-delay: 300ms; }
.saeule.drei { animation-delay: 150ms; }
.s-namen { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.block-p { border-radius: 14px 14px 4px 4px; display: grid; place-content: center; gap: 2px; background: var(--flaeche-2); }
.block-p b { font-family: var(--zahl); font-weight: 900; font-size: 40px; line-height: 1; }
.block-p small { color: var(--leise); font-size: 12px; }
.eins .block-p { height: 128px; background: linear-gradient(180deg, var(--akzent), #4b3fd1); }
.eins .block-p small { color: rgba(255, 255, 255, .8); }
.zwei .block-p { height: 92px; }
.drei .block-p { height: 68px; }
.saeule.leer { visibility: hidden; }
@keyframes steigen { from { opacity: 0; transform: translateY(30px); } }

.beste-kopf, .beste li { display: grid; grid-template-columns: 26px 1fr 52px 64px; gap: 8px; align-items: center; }
.beste-kopf { padding: 0 10px; }
.beste-kopf span:nth-child(n+3) { text-align: right; }
.beste { display: grid; gap: 4px; }
.beste li { padding: 9px 10px; border-radius: 10px; background: var(--flaeche); }
.beste .name { display: grid; }
.beste .name small { font-size: 12px; font-weight: 500; white-space: normal; }

/* ---------- Einblendung und Toast ---------- */

.einblendung { position: fixed; inset: 0; pointer-events: none; z-index: 60; display: grid; place-items: center; }
.blende-rahmen { grid-area: 1 / 1; position: absolute; inset: 0; display: grid; place-items: center; --c: var(--akzent); }
.vignette { position: absolute; inset: 0; box-shadow: inset 0 0 160px -10px var(--c); animation: vignette 950ms ease both; }
@keyframes vignette { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
.blende {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding: 22px 30px;
  animation: knall 950ms cubic-bezier(.2, .9, .25, 1) both;
}
.blende b {
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 88px;
  line-height: .9;
  color: var(--c);
  text-shadow: 0 0 40px color-mix(in oklab, var(--c) 60%, transparent), 0 4px 0 #000;
}
.blende span { font-size: 18px; font-weight: 700; background: rgba(10, 10, 15, .82); padding: 6px 14px; border-radius: 10px; }
.blende-bust { --c: var(--rot); }
.blende-sieben { --c: var(--gold); }
.blende-eingefroren { --c: var(--eis); }
.blende-dreier { --c: #ff6b9a; }
.blende-gerettet { --c: var(--gruen); }
@keyframes knall {
  0% { opacity: 0; transform: scale(.55) rotate(-4deg); }
  22% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  34% { transform: scale(1) rotate(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.04); }
}

.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 50%;
  z-index: 70;
  max-width: min(92vw, 440px);
  background: #1f1d2e;
  border: 1px solid rgba(124, 111, 255, .55);
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  transform: translate(-50%, calc(-100% - 30px));
  transition: transform .3s cubic-bezier(.2, .9, .25, 1);
}
.toast.an { transform: translate(-50%, 0); }

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 560px) {
  .karte { --b: 76px; }
  .hand { min-height: 108px; }
  .hand.mods .karte { --b: 50px; }
}

@media (min-width: 1000px) {
  body.im-spiel #app { max-width: 640px; margin-left: max(24px, calc((100vw - 360px - 640px) / 2)); }
  body.im-spiel .panel { transform: none; box-shadow: none; }
  body.im-spiel .panel-zu, body.im-spiel .tabelle-k { display: none; }
  body.im-spiel .chat { right: 360px; }
  .karte { --b: 84px; }
  .hand { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .blende, .vignette { animation: still 950ms linear both !important; }
  @keyframes still { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
}

/* ---------- Tischmitte (Stapel) und volle Tische ---------- */

.mitte { flex: 1; min-height: 0; display: grid; place-content: center; justify-items: center; gap: 8px; overflow: hidden; }
.stapel { position: relative; width: 58px; height: 82px; }
.stapel i {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .14) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, rgba(124, 111, 255, .5) 0 3px, transparent 3px 8px),
    #1b1638;
  border: 1.5px solid rgba(124, 111, 255, .7);
}
.stapel i:nth-child(1) { transform: translate(-6px, 6px) rotate(-6deg); opacity: .5; }
.stapel i:nth-child(2) { transform: translate(-3px, 3px) rotate(-3deg); opacity: .75; }
.stapel b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--zahl);
  font-weight: 900;
  font-size: 30px;
  text-shadow: 0 2px 0 #000, 0 0 14px #000;
}
.gegner { flex: none; }
.leiste-info #t-stapel { display: none; }
.tisch.voll .mitte { display: none; }
.tisch.voll .leiste-info #t-stapel { display: inline; }
.tisch.voll .gegner { flex: 1; }
.tisch.voll .g { min-height: 40px; padding: 4px 12px; }
.tisch.voll .karte:not(.mini) { --b: 56px; }
.tisch.voll .hand { min-height: 80px; }
.tisch.voll .hand.mods { min-height: 0; }
.tisch.voll .hand.mods .karte { --b: 38px; }
.sheet .paar .gross { font-size: 22px; }
