@font-face { font-family: "Playfair Display"; src: url(../assets/fonts/playfair.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Limelight"; src: url(../assets/fonts/limelight.woff2) format("woff2"); font-display: swap; }
:root {
  --raum: #15110e; --holz: #3a2416; --holzhell: #5a3a22; --messing: #c9a45c; --messingdunkel: #8d7038;
  --elfenbein: #efe6d2; --tuch: #1f6b4a; --rot: #b3312a; --grau: #9c9484;
  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --x-platz: 0px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--raum); color: var(--elfenbein); font-family: var(--text);
  overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; display: flex; justify-content: center; background: var(--raum); }
.schirm { width: 100%; max-width: 560px; height: 100%; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* Start */
#start { overflow-y: auto; }
.spalte { margin: auto 0; padding: 28px 22px; display: flex; flex-direction: column; gap: 22px; }
.marke { display: flex; flex-direction: column; gap: 10px; }
.marke .linie { height: 2px; background: var(--messing); }
.marke h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 54px; letter-spacing: 0.16em; line-height: 1;
  color: var(--elfenbein); }
.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.karte { text-align: left; background: var(--holz); border: 2px solid var(--holz); border-radius: 4px; padding: 14px 12px 16px;
  display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.karte.an { border-color: var(--messing); background: #452b1a; }
.karte strong { font-family: var(--serif); font-size: 24px; letter-spacing: 0.03em; }
.karte span { font-size: 13.5px; line-height: 1.35; color: #d9cfb8; }
.karte .reihe { display: flex; flex-wrap: wrap; gap: 4px; min-height: 34px; align-content: flex-start; }
.karte .reihe i { width: 13px; height: 13px; border-radius: 50%; display: block; }
.block .titel { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--messing); margin-bottom: 8px; }
.stufen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stufen button { min-height: 46px; border: 2px solid var(--holzhell); border-radius: 4px; font-size: 14px; padding: 4px 2px; }
.stufen button.an { border-color: var(--messing); background: var(--messing); color: #1a130b; font-weight: 600; }
.haupt { min-height: 56px; width: 100%; background: var(--messing); color: #1a130b; border-radius: 4px; font-family: var(--serif);
  font-size: 22px; font-weight: 700; letter-spacing: 0.06em; }
.haupt:active { background: var(--messingdunkel); }
.neben { min-height: 48px; width: 100%; border: 2px solid var(--holzhell); border-radius: 4px; font-size: 16px; }
.sprachen { display: flex; gap: 6px; }
.sprachen button { min-width: 46px; min-height: 44px; font-size: 13px; letter-spacing: 0.08em; color: var(--grau); border-bottom: 2px solid transparent; }
.sprachen button.an { color: var(--elfenbein); border-bottom-color: var(--messing); }

/* Tisch */
#kopf { display: flex; align-items: stretch; gap: 8px; padding: 8px 10px 6px; padding-right: calc(10px + var(--x-platz)); }
#pause { width: 44px; min-height: 44px; border: 2px solid var(--holzhell); border-radius: 4px; display: flex; gap: 5px; align-items: center;
  justify-content: center; flex: none; }
#pause i { width: 4px; height: 16px; background: var(--elfenbein); display: block; }
.zaehltafel { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto 1fr; background: var(--holz); border: 2px solid var(--messingdunkel);
  border-radius: 4px; }
.seite { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px;
  padding: 5px 8px; min-width: 0; }
.seite .lampe { width: 8px; height: 8px; border-radius: 50%; background: #5b4a35; grid-row: 1; }
.seite.dran .lampe { background: #ffd66b; box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.25); }
.seite .name { font-size: 12.5px; color: #d9cfb8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seite.dran .name { color: var(--elfenbein); font-weight: 600; }
.seite .zahl { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1; color: var(--elfenbein); font-variant-numeric: tabular-nums; }
.seite .rest { grid-column: 1 / -1; display: flex; gap: 3px; min-height: 10px; margin-top: 3px; }
.seite .rest i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.seite.rechts { grid-template-columns: auto 1fr auto; }
.mitte { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 10px; min-width: 86px;
  border-left: 2px solid var(--messingdunkel); border-right: 2px solid var(--messingdunkel); background: #2b1a10; }
.mitte .kugel { width: 20px; height: 20px; border-radius: 50%; display: block; border: 2px solid rgba(255, 255, 255, 0.18); }
.mitte .wort { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--messing); text-align: center; line-height: 1.15; max-width: 96px; }
#feld { flex: 1; min-height: 0; position: relative; touch-action: none; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#meldung { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: 86%; background: var(--elfenbein); color: #1a130b;
  border-left: 5px solid var(--messing); border-radius: 3px; padding: 9px 12px; font-size: 14.5px; line-height: 1.3; pointer-events: none; }
#meldung.foul { border-left-color: var(--rot); }
#fuss { padding: 2px 12px 10px; }
#hinweis { margin: 0 0 6px; min-height: 34px; font-size: 12.5px; line-height: 1.35; color: var(--grau); }
#zug { height: 64px; touch-action: none; cursor: grab; }
.spur { position: relative; height: 100%; background: var(--holz); border: 2px solid var(--messingdunkel); border-radius: 4px; overflow: hidden; }
.fuellung { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #6d2a1f; }
.queue { position: absolute; top: 50%; left: 14px; width: 82%; height: 12px; margin-top: -6px; border-radius: 2px 6px 6px 2px;
  background: linear-gradient(90deg, #e9e2cf 0, #e9e2cf 3%, #2f7fb5 3%, #2f7fb5 5%, #d9b46a 5%, #c99745 58%, #24140c 58%, #24140c 100%); }
#zug.aus { opacity: 0.4; }

/* Tafel für Pause und Ende */
#blatt { position: fixed; inset: 0; background: rgba(12, 9, 7, 0.78); display: flex; align-items: center; justify-content: center; padding: 22px; }
#blatt .tafel { width: 100%; max-width: 360px; background: var(--holz); border: 2px solid var(--messing); border-radius: 4px; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px; }
#blatt h2 { margin: 0; font-family: var(--serif); font-size: 32px; letter-spacing: 0.04em; }
#blatt p { margin: 0 0 8px; font-size: 16px; line-height: 1.4; color: #d9cfb8; }

@media (max-height: 700px) { #hinweis { display: none; } #zug { height: 56px; } .marke h1 { font-size: 44px; } }

/* ---------------------------------------------------------------- Salon: Teppich, Glühbirnen, Lack und Messing */
#app { background: #1c0709 url(../assets/tisch/teppich.webp) repeat; background-size: 96px 96px; }
#start { background: rgba(10, 4, 5, 0.62); max-width: none; align-items: center; }
#start .spalte { width: 100%; max-width: 520px; }
.birnen { height: 12px; background: radial-gradient(circle at 50% 50%, #fff3c4 0 2px, #f2b93b 2.4px 3.6px, rgba(242, 185, 59, 0.28) 4px 5.6px, transparent 6px) 0 0 / 16px 12px repeat-x;
  animation: lauf 1.2s steps(2) infinite; }
@keyframes lauf { to { background-position: 16px 0; } }
@media (prefers-reduced-motion: reduce) { .birnen, .zaehltafel::before { animation: none; } }
.schild { background: #120a07; border: 2px solid var(--messing); outline: 2px solid #120a07; outline-offset: -7px; border-radius: 4px; padding: 10px 14px 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column; gap: 8px; }
.schild h1 { margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--serif); font-weight: 700;
  font-size: 50px; letter-spacing: 0.14em; line-height: 1; color: #f6e7b8; text-shadow: 0 0 14px rgba(255, 190, 80, 0.55), 0 2px 0 #6d4a12; }
.schild h1 .acht { width: 58px; height: 58px; flex: none; display: block; background: url(../assets/tisch/kugeln.webp) -406px -58px / 464px 174px no-repeat;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.7)); }
.schild .unter { margin: 0 0 4px; text-align: center; font-size: 12.5px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--messing); }
.karte { background: #1d0f0a; border: 2px solid #4a2c18; box-shadow: inset 0 0 0 4px #1d0f0a, inset 0 0 0 5px rgba(201, 164, 92, 0.35); }
.karte.an { background: #2a130c; border-color: var(--messing); box-shadow: inset 0 0 0 4px #2a130c, inset 0 0 0 5px var(--messing), 0 0 22px rgba(255, 190, 80, 0.18); }
.karte .reihe { gap: 2px; min-height: 46px; }
.karte .reihe i { width: 22px; height: 22px; border-radius: 0; background: url(../assets/tisch/kugeln.webp) 0 0 / 176px 66px no-repeat; }
.block .titel { display: flex; align-items: center; gap: 10px; }
.block .titel::after { content: ""; flex: 1; height: 1px; background: var(--messingdunkel); }
.stufen button { background: #1d0f0a; border-color: #4a2c18; }
.haupt { box-shadow: inset 0 0 0 3px var(--messing), inset 0 0 0 4px #5e4416, 0 6px 0 #5e4416, 0 12px 18px rgba(0, 0, 0, 0.5); text-transform: uppercase; letter-spacing: 0.14em; }
.haupt:active { transform: translateY(4px); box-shadow: inset 0 0 0 3px var(--messingdunkel), inset 0 0 0 4px #5e4416, 0 2px 0 #5e4416; }
#los { margin-bottom: 6px; }

#tisch { max-width: 620px; }
#kopf { padding-top: 10px; }
#pause { background: #120a07; border-color: var(--messingdunkel); }
.zaehltafel { position: relative; background: #120a07; border: 2px solid var(--messing); padding-top: 11px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55); }
.zaehltafel::before { content: ""; position: absolute; left: 4px; right: 4px; top: 1px; height: 10px;
  background: radial-gradient(circle at 50% 50%, #fff3c4 0 1.6px, #f2b93b 2px 3px, rgba(242, 185, 59, 0.25) 3.4px 4.6px, transparent 5px) 0 0 / 14px 10px repeat-x;
  animation: lauf2 1.4s steps(2) infinite; }
@keyframes lauf2 { to { background-position: 14px 0; } }
.seite { padding: 4px 9px 6px; transition: background-color 0.2s; }
.seite.dran { background: #2c1409; }
.seite .lampe { width: auto; height: auto; background: none !important; box-shadow: none !important; font-size: 17px; line-height: 1; color: #5b4a35; }
#s0 .lampe::before { content: "\2660"; } #s1 .lampe::before { content: "\2666"; }
#s0.dran .lampe { color: #f6d27a; text-shadow: 0 0 9px rgba(255, 200, 90, 0.9); }
#s1.dran .lampe { color: #e2493c; text-shadow: 0 0 9px rgba(240, 80, 60, 0.9); }
.seite .zahl { font-size: 28px; color: #f6e7b8; }
.seite.dran .zahl { text-shadow: 0 0 10px rgba(255, 190, 80, 0.45); }
.mitte { background: #1d0f0a; border-color: var(--messingdunkel); }
.mitte .kugel { width: 22px; height: 22px; box-shadow: inset -3px -4px 5px rgba(0, 0, 0, 0.45), inset 3px 3px 4px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(0, 0, 0, 0.6); border: 0; }
#feld { margin-top: 2px; }
#hinweis { color: #cdbf9f; text-shadow: 0 1px 2px #000; }
.spur { background: #120a07; border-color: var(--messing); box-shadow: inset 0 0 0 3px #120a07, inset 0 0 0 4px rgba(201, 164, 92, 0.35), 0 8px 18px rgba(0, 0, 0, 0.5); }
.fuellung { background: #7c1d16; }
#meldung { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6); }
#blatt .tafel { background: #120a07; box-shadow: inset 0 0 0 5px #120a07, inset 0 0 0 6px rgba(201, 164, 92, 0.45), 0 20px 40px rgba(0, 0, 0, 0.7); padding: 26px 22px; }
#blatt h2 { color: #f6e7b8; text-shadow: 0 0 14px rgba(255, 190, 80, 0.45); }
@media (max-height: 700px) { .schild h1 { font-size: 40px; } .schild h1 .acht { width: 46px; height: 46px; background-size: 368px 138px; background-position: -322px -46px; } }

/* Kopfleiste zweizeilig: oben Zeichen und Name, darunter Punkte oder die restlichen Kugeln */
.birnen, .zaehltafel::before { background-repeat: round no-repeat; animation: glimmen 1.5s ease-in-out infinite alternate; }
@keyframes glimmen { from { opacity: 0.72; } to { opacity: 1; } }
.seite, .seite.rechts { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 26px; column-gap: 5px; row-gap: 1px; padding: 3px 9px 5px; align-items: center; }
.seite .lampe { font-size: 14px; }
.seite .name { font-size: 12px; }
.seite .zahl { grid-column: 1 / -1; font-size: 25px; line-height: 26px; }
.seite .rest { grid-column: 1 / -1; margin: 0; gap: 1px; align-items: center; min-height: 0; flex-wrap: nowrap; overflow: hidden; }
.seite .rest i { width: 15px; height: 15px; border-radius: 0; flex: none; background: url(../assets/tisch/kugeln.webp) 0 0 / 120px 45px no-repeat; }
.seite.rechts { text-align: right; grid-template-columns: 1fr auto; }
.seite.rechts .lampe { grid-column: 2; grid-row: 1; } .seite.rechts .name { grid-column: 1; grid-row: 1; }
.seite.rechts .rest { justify-content: flex-end; }
.mitte { min-width: 78px; padding: 3px 6px; }
.mitte .wort { font-size: 9.5px; max-width: 72px; }
#pause { align-self: stretch; }
#fuss { padding: 0 12px 8px; }
#hinweis { height: 32px; min-height: 0; margin: 0 0 4px; font-size: 12px; line-height: 16px; overflow: hidden; display: flex; align-items: center; }
#zug { height: 54px; }
.karte .reihe i { width: 20px; height: 20px; background-size: 160px 60px; }

/* Klangschalter */
.klang { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.klang button { min-height: 44px; border: 2px solid #4a2c18; border-radius: 4px; background: #1d0f0a; font-size: 13px; color: var(--grau); padding: 2px 4px; }
.klang button.an { border-color: var(--messing); color: var(--elfenbein); }
.klang button.an::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ffd66b; margin-right: 7px; vertical-align: 1px; }

/* ---------------------------------------------------------------- Gerenderte Teile aus Blender (b3d/hud.py) */
.zaehltafel { border-style: solid; border-color: transparent; border-width: 20px 20px 8px 20px; background: none; padding-top: 0;
  border-image: url(../assets/tisch/rahmen-oben.webp) 60 60 24 60 fill / 20px 20px 8px 20px / 0 round; }
.zaehltafel::before { display: none; }
.seite, .seite.rechts { padding: 0 6px 2px 0; } .seite.rechts { padding: 0 0 2px 6px; }
.seite.dran { background: none; }
.mitte { background: none; border-left: 1px solid var(--messingdunkel); border-right: 1px solid var(--messingdunkel); margin: 0 0 4px; }
.seite .lampe { width: 20px; height: 20px; font-size: 0; background: url(../assets/tisch/jetons.webp) 0 0 / 40px 20px no-repeat !important; filter: brightness(0.5) saturate(0.6); }
#s1 .lampe { background-position: -20px 0 !important; }
#s0 .lampe::before, #s1 .lampe::before { content: none; }
.seite.dran .lampe { filter: brightness(1.15) drop-shadow(0 0 5px rgba(255, 200, 90, 0.95)); }
.schild { border-style: solid; border-color: transparent; border-width: 26px; background: none; outline: 0; padding: 4px 2px 6px;
  border-image: url(../assets/tisch/rahmen-beide.webp) 60 fill / 26px / 0 round; }
.schild .birnen { display: none; }
.karte, #blatt .tafel, .spur, #pause, .stufen button, .klang button { border-style: solid; border-color: transparent; border-width: 10px; background: none;
  border-image: url(../assets/tisch/rahmen.webp) 30 fill / 10px / 0 stretch; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); }
.karte { padding: 8px 6px 10px; filter: brightness(0.72); } .karte.an { filter: none; box-shadow: 0 0 22px rgba(255, 190, 80, 0.28), 0 8px 18px rgba(0, 0, 0, 0.5); background: none; }
#blatt .tafel { border-width: 14px; border-image-width: 14px; padding: 16px 12px; }
.stufen button, .klang button { border-width: 8px; border-image-width: 8px; min-height: 48px; padding: 0; color: var(--grau); }
.haupt, .stufen button.an { border-style: solid; border-color: transparent; border-width: 14px; background: none; color: #1a130b;
  border-image: url(../assets/tisch/knopf.webp) 36 fill / 14px / 0 stretch; box-shadow: 0 8px 14px rgba(0, 0, 0, 0.55); filter: brightness(1.25); }
.stufen button.an { border-width: 10px; border-image-width: 10px; }
.haupt:active { transform: translateY(2px); filter: brightness(1.05); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55); }
.klang button.an { color: var(--elfenbein); }
.spur { overflow: hidden; }
.fuellung { background: rgba(150, 30, 20, 0.55); }
.queue { top: 50%; left: 10px; width: 86%; height: 22px; margin-top: -11px; border-radius: 0; transform: scaleX(-1);
  background: url(../assets/tisch/queue.webp) right top / auto 44px no-repeat; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.6)); }
#pause { border-width: 9px; border-image-width: 9px; }

/* Höhe sparen, damit die Kugel am Handy mindestens 16 Punkte misst (Z8) */
#kopf { padding-top: 6px; padding-bottom: 4px; }
.zaehltafel { border-width: 17px 17px 7px 17px; border-image-width: 17px 17px 7px 17px; }
.seite, .seite.rechts { grid-template-rows: auto 24px; }
.seite .zahl { font-size: 24px; line-height: 24px; }
#hinweis { height: 28px; line-height: 14px; margin-bottom: 3px; }
#feld { margin-top: 0; }

.klang { grid-template-columns: repeat(3, 1fr); }

/* ================================================================ Menü als Szene (Runde 3, 28.11.2026) */
#start { position: relative; background: #0a0403 url(../assets/tisch/held.webp) center top / cover no-repeat; overflow: hidden; }
#start::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(8, 3, 3, 0.10) 0, rgba(8, 3, 3, 0.30) 40%, rgba(8, 3, 3, 0.72) 100%); pointer-events: none; }
#start .spalte { position: relative; margin: 0; height: 100%; max-width: 520px; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); gap: 14px; justify-content: flex-end; }
.ecke { position: absolute; left: 12px; top: calc(10px + env(safe-area-inset-top)); display: flex; gap: 8px; z-index: 3; }
.rundk, #pause { width: 46px; height: 46px; min-height: 46px; flex: none; border: 0; border-image: none; border-radius: 50%; box-shadow: none; padding: 0; display: flex; align-items: center; justify-content: center;
  background: url(../assets/tisch/rund.webp) center / 100% 100% no-repeat; color: #f1d58c; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.6)); }
.rundk svg { width: 22px; height: 22px; fill: currentColor; }
.rundk:active, #pause:active { transform: translateY(2px); filter: brightness(0.85); }
#pause { align-self: center; gap: 4px; } #pause i { width: 4px; height: 14px; background: #f1d58c; border-radius: 1px; }
#startKlang { position: absolute; left: 12px; top: calc(64px + env(safe-area-inset-top)); width: min(330px, calc(100% - 24px)); z-index: 3; }
.schild { border: 0; border-image: none; background: none; box-shadow: none; padding: 0; margin: auto 0; align-items: center; }
.schild h1 { font-size: 58px; letter-spacing: 0.12em; text-shadow: 0 0 18px rgba(255, 190, 80, 0.75), 0 0 44px rgba(255, 150, 40, 0.45), 0 3px 0 #5e3d0c, 0 8px 14px rgba(0, 0, 0, 0.8); }
.schild h1 .acht { width: 64px; height: 64px; background-size: 512px 192px; background-position: -448px -64px; }
.schild .unter { color: #f1d58c; text-shadow: 0 2px 4px #000; }
.wahl { gap: 12px; }
.karte, .karte.an { position: relative; min-height: 0; height: 172px; padding: 0; overflow: hidden; display: block; background: #0d0806; border-style: solid; border-color: transparent; border-width: 10px;
  border-image: url(../assets/tisch/goldrahmen.webp) 30 / 10px / 0 stretch; box-shadow: 0 12px 20px rgba(0, 0, 0, 0.6); text-align: left; }
.karte { filter: brightness(0.62) saturate(0.75); transition: filter 0.15s, transform 0.15s; }
.karte.an { filter: none; transform: translateY(-4px); box-shadow: 0 0 0 2px rgba(255, 214, 120, 0.9), 0 0 26px rgba(255, 190, 80, 0.55), 0 14px 22px rgba(0, 0, 0, 0.6); }
.karte .bild { position: absolute; inset: 0; background: center / cover no-repeat; }
.karte .bild.sinuca { background-image: url(../assets/tisch/kachel-sinuca.webp); } .karte .bild.pool { background-image: url(../assets/tisch/kachel-pool.webp); }
.karte .fuss { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(rgba(6, 3, 2, 0) 0, rgba(6, 3, 2, 0.86) 46%, rgba(6, 3, 2, 0.94) 100%); }
.karte .fuss strong { font-size: 23px; color: #f6e7b8; text-shadow: 0 2px 3px #000; }
.karte .fuss span { font-size: 12px; line-height: 1.3; color: #e2d6bc; }
.stufen { gap: 8px; }
.stufen button, .stufen button.an, .klang button, .neben { border-style: solid; border-color: transparent; border-width: 12px; background: none; box-shadow: none; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.55));
  border-image: url(../assets/tisch/knopf-dunkel.webp) 40 fill / 12px / 0 stretch; color: #d8ccb2; min-height: 0; }
.stufen button { height: 78px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 12px; }
.stufen button.an, .klang button.an { border-image-source: url(../assets/tisch/knopf-rot.webp); color: #fff3d0; font-weight: 600; }
.stufen .st { width: 44px; height: 40px; display: block; background: url(../assets/tisch/stapel.webp) 0 center / 176px 44px no-repeat; }
.stufen .s1 { background-position: -44px center; } .stufen .s2 { background-position: -88px center; } .stufen .s3 { background-position: -132px center; }
.stufen button:active, .klang button:active, .neben:active { transform: translateY(2px); }
.haupt, .haupt:active { border-style: solid; border-color: transparent; border-width: 18px; min-height: 68px; background: none; box-shadow: none; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.6));
  border-image: url(../assets/tisch/knopf-gruen.webp) 40 fill / 18px / 0 stretch; color: #fff3d0; font-size: 25px; letter-spacing: 0.16em; text-shadow: 0 2px 0 #04240f, 0 0 12px rgba(0, 0, 0, 0.5); }
.haupt:active { transform: translateY(3px); filter: brightness(0.88) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); }
.neben { min-height: 50px; padding: 0; font-size: 16px; }
.klang button { height: 50px; min-height: 0; padding: 0; font-size: 13px; }
.klang button.an::before { content: none; }
#los { margin: 2px 0 0; }
@media (max-height: 700px) { .karte, .karte.an { height: 132px; } .stufen button { height: 66px; } .schild h1 { font-size: 44px; } .schild h1 .acht { width: 48px; height: 48px; background-size: 384px 144px; background-position: -336px -48px; } .haupt { min-height: 58px; } }

/* Tisch: Raumlicht über die ganze Breite, Leisten in der Mitte, Zeichenfläche bis zum Rand (das Queue wird nicht mehr abgeschnitten) */
#tisch { max-width: none; position: relative; align-items: center; }
#tisch::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(255, 205, 140, 0.10) 0, rgba(0, 0, 0, 0.30) 60%, rgba(0, 0, 0, 0.74) 100%); }
#kopf, #fuss, #feld { position: relative; width: 100%; }
#kopf, #fuss { max-width: 620px; }
.queue { width: 58%; }
.karte .bild { background-color: #04110a; background-size: 114% auto; background-position: center 6px; }
.karte .bild.pool { background-size: 150% auto; background-position: center -22px; }

/* Runde 4: Zeichenfläche hinter den Leisten über den ganzen Bildschirm; Kugelreihe in der Kopfleiste größer */
#tisch > #c { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
#feld { pointer-events: none; z-index: 1; } #kopf, #fuss { z-index: 2; }
#tisch::before { z-index: 1; }
#kopf { padding-right: calc(10px + var(--x-platz)); }
.seite .rest { gap: 0; overflow: visible; }
.seite .rest i { flex: 0 1 21px; min-width: 9px; width: auto; height: 21px; overflow: visible; background: none; position: relative; }
.seite .rest i::after { content: ""; position: absolute; left: 0; top: 0; width: 21px; height: 21px; background: url(../assets/tisch/kugeln.webp) 0 0 / 168px 63px no-repeat; background-position: inherit;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.seite.rechts .rest i::after { left: auto; right: 0; }
.seite, .seite.rechts { grid-template-rows: auto 24px; }
.mitte { min-width: 62px; padding: 3px 4px; } .mitte .wort { font-size: 9px; max-width: 60px; }
#tisch::before { background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255, 205, 140, 0.08) 0, rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.66) 100%); }

/* Eigene Schriften (beide SIL Open Font License, Lizenztexte in assets/fonts/quelle): Limelight für den Schriftzug, Playfair Display für Titel und Zahlen */
.schild h1 { font-family: "Limelight", var(--serif); font-weight: 400; letter-spacing: 0.06em; font-size: 64px; }
@media (max-height: 700px) { .schild h1 { font-size: 48px; } }

/* ================================================================ Online-Lobby, Anleitung, Drehhinweis */
.stufen { grid-template-columns: repeat(6, 1fr); }
.stufen button { grid-column: span 2; }
.stufen button:nth-child(4), .stufen button:nth-child(5) { grid-column: span 3; flex-direction: row; gap: 8px; height: 58px; font-size: 13.5px; }
.stufen .s4 { background: none; position: relative; }
.stufen .s4::before, .stufen .s4::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; bottom: 8px; border: 2px solid #f1d58c; border-radius: 50%; }
.stufen .s4::after { left: 15px; right: 15px; }
#lobby { position: absolute; inset: 0; z-index: 5; background: rgba(8, 4, 3, 0.86); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
#lobby .tafel { width: 100%; max-width: 370px; display: flex; flex-direction: column; gap: 10px; border-style: solid; border-color: transparent; border-width: 14px; padding: 12px 10px;
  border-image: url(../assets/tisch/rahmen.webp) 30 fill / 14px / 0 stretch; }
#lobby h2 { margin: 0; font-family: var(--serif); font-size: 28px; color: #f6e7b8; }
#lobby p { margin: 0; font-size: 14px; line-height: 1.4; color: #d9cfb8; }
#lobby p.klein { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--messing); }
#lobbyWahl, #lobbyRaum { display: flex; flex-direction: column; gap: 10px; }
#code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#code i { height: 52px; display: flex; align-items: center; justify-content: center; font: 700 30px var(--serif); font-style: normal; color: #f6e7b8; background: #0b0605; border: 2px solid var(--messingdunkel); border-radius: 4px; }
#code i.jetzt { border-color: #f1d58c; }
#tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#tasten button { height: 50px; border-style: solid; border-color: transparent; border-width: 12px; padding: 0; font: 700 20px var(--serif); color: #f6e7b8; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.5));
  border-image: url(../assets/tisch/knopf-dunkel.webp) 40 fill / 12px / 0 stretch; }
#tasten button.ok { border-image-source: url(../assets/tisch/knopf-gruen.webp); font-size: 14px; font-family: var(--text); }
#tasten button:disabled { opacity: 0.45; }
#tasten button:active { transform: translateY(2px); }
#raumCode { font: 700 54px var(--serif); letter-spacing: 0.18em; color: #f6e7b8; text-align: center; text-shadow: 0 0 16px rgba(255, 190, 80, 0.6); line-height: 1.1; }
#plaetze { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.platz { display: flex; align-items: center; gap: 8px; padding: 8px; background: #0b0605; border: 2px solid var(--messingdunkel); border-radius: 4px; font-size: 13.5px; color: #d9cfb8; min-height: 48px; }
.platz i { width: 26px; height: 26px; flex: none; background: url(../assets/tisch/jetons.webp) 0 0 / 52px 26px no-repeat; }
#pl1 i { background-position: -26px 0; }
.platz.leer { opacity: 0.5; } .platz b { font-weight: 600; }
#lobbyArt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#lobbyArt button { height: 48px; border-style: solid; border-color: transparent; border-width: 12px; padding: 0; font: 700 16px var(--serif); color: #d8ccb2;
  border-image: url(../assets/tisch/knopf-dunkel.webp) 40 fill / 12px / 0 stretch; }
#lobbyArt button.an { border-image-source: url(../assets/tisch/knopf-rot.webp); color: #fff3d0; }
#lobbyArt button:disabled { opacity: 0.75; }
#lobbyFehler { color: #ffb199 !important; }
#lobby .haupt { min-height: 58px; font-size: 20px; } #lobby .haupt:disabled { filter: grayscale(0.8) brightness(0.6); }

#fuss { position: relative; }
#lehre { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 26px); z-index: 4; background: #f3ead4; color: #1a130b; border-left: 6px solid var(--messing); border-radius: 4px;
  padding: 11px 12px 10px; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.65); }
#lehre p { margin: 0 0 9px; font-size: 15px; line-height: 1.38; }
#lehre div { display: flex; gap: 8px; justify-content: flex-end; }
#lehre .neben, #lehre .haupt { width: auto; min-height: 0; height: 42px; padding: 0 8px; font-size: 14px; letter-spacing: 0.04em; text-transform: none; border-width: 12px; border-image-width: 12px; }
#zug.puls .spur { animation: puls 1.1s ease-in-out infinite; }
@keyframes puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 120, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 214, 120, 0.85), 0 0 22px rgba(255, 190, 80, 0.7); } }
.mitte.puls { animation: puls 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #zug.puls .spur, .mitte.puls { animation: none; outline: 3px solid #ffd678; } }

#dreh { display: none; position: fixed; inset: 0; z-index: 20; background: #0d0605; align-items: center; justify-content: center; padding: 24px; text-align: center; }
#dreh p { font: 700 22px var(--serif); color: #f6e7b8; margin: 0; }
@media (orientation: landscape) and (max-height: 480px) and (pointer: coarse) { #dreh { display: flex; } }

/* Ziffern in Tabellenform (die Schrift hat sonst Mediävalziffern, eine 0 sähe aus wie ein o) */
.zahl, #code i, #tasten button, #raumCode, .karte strong, #blatt p, h1, h2 { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
/* Anleitung flach halten, damit sie die Weiße im Halbkreis nicht verdeckt: Text links, Knopf rechts */
#lehre { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; bottom: calc(100% - 30px); }
#lehre p { margin: 0; font-size: 13.5px; line-height: 1.32; flex: 1; }
#lehre div { flex: none; }
#lehre .neben, #lehre .haupt { height: 40px; font-size: 13px; }

/* Breite Bildschirme (Laptop, Tablet quer): eigene Querfassung der Szene, die Bedienspalte steht rechts, der Tisch bleibt sichtbar */
@media (min-aspect-ratio: 5/4) and (min-width: 820px) {
  #start { background-image: url(../assets/tisch/held-quer.webp); background-position: 30% bottom; background-size: cover; align-items: flex-end; }
  #start::before { background: linear-gradient(90deg, rgba(8, 3, 3, 0) 0, rgba(8, 3, 3, 0.05) 45%, rgba(8, 3, 3, 0.62) 78%, rgba(8, 3, 3, 0.8) 100%); }
  #start .spalte { max-width: 440px; margin: 0 max(24px, 4vw) 0 0; justify-content: center; padding-top: 24px; padding-bottom: 24px; }
  .schild { margin: 0 0 10px; }
  .schild h1 { font-size: 56px; }
}

/* Queue über den Leisten, Anleitung als Tafel im Stil der Oberfläche in der unteren Tischhälfte */
#tisch > #c2 { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
#lehre { position: absolute; left: 50%; right: auto; bottom: auto; top: 63%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 36px)); z-index: 6;
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; background: none; color: #f3ead4; border-radius: 0; border-left: 0; pointer-events: none;
  border-style: solid; border-color: transparent; border-width: 14px; padding: 8px 8px 6px; border-image: url(../assets/tisch/rahmen.webp) 30 fill / 14px / 0 stretch; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6); }
#lehre p { font-family: var(--serif); font-size: 16.5px; line-height: 1.36; color: #f6e7b8; text-align: center; flex: none; }
#lehre div { display: flex; justify-content: center; pointer-events: auto; }
#lehre .neben, #lehre .haupt { height: 44px; min-width: 150px; font-size: 14px; }
#lehre .haupt { font-size: 15px; letter-spacing: 0.08em; }

/* Wer am Zug ist: die Seite leuchtet, bekommt eine goldene Kante und einen Pfeil, die andere tritt zurück */
.seite { position: relative; opacity: 0.42; transition: opacity 0.25s; }
.seite.dran { opacity: 1; background: linear-gradient(180deg, rgba(255, 196, 92, 0.30), rgba(255, 196, 92, 0.10)) !important; box-shadow: inset 0 0 0 2px #f1d58c, 0 0 14px rgba(255, 190, 80, 0.55); border-radius: 3px; }
.seite, .seite.rechts { padding: 2px 6px 3px; }
.seite.dran .name { color: #fff3d0; font-weight: 700; }
.seite.dran .lampe { filter: brightness(1.25) drop-shadow(0 0 6px rgba(255, 210, 110, 1)); transform: scale(1.12); }
.seite.dran::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -7px; border: 7px solid transparent; border-top-color: #f1d58c; border-bottom: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.7)); }
.mitte { margin: 0 4px 4px; }
/* Anleitung kleiner und flach: Text links, Knopf rechts, knapp unter der Tischmitte, die Weiße bleibt frei */
#lehre { top: 58%; flex-direction: row; align-items: center; gap: 8px; border-width: 12px; border-image-width: 12px; padding: 4px 4px 4px 8px; width: min(370px, calc(100% - 28px)); }
#lehre p { font-size: 14.5px; line-height: 1.32; text-align: left; flex: 1; }
#lehre .neben, #lehre .haupt { height: 40px; min-width: 0; padding: 0 4px; font-size: 12.5px; }
#lehre .haupt { font-size: 13px; }

/* Schmale Handys (360 Punkte): Namen nicht abschneiden */
@media (max-width: 380px) {
  .mitte { min-width: 50px; padding: 3px 2px; margin: 0 2px 4px; } .mitte .wort { font-size: 8px; max-width: 48px; letter-spacing: 0.02em; }
  .seite .name { font-size: 10.5px; } .seite, .seite.rechts { padding: 2px 4px 3px; column-gap: 3px; }
  .seite .lampe { width: 15px; height: 15px; background-size: 30px 15px !important; } #s1 .lampe { background-position: -15px 0 !important; }
  .zaehltafel { border-width: 15px 13px 6px 13px; border-image-width: 15px 15px 6px 15px; }
}

/* Sprachwahl: Kugeln klappen nach rechts auf, die gewählte Sprache steht schon im Knopf und fehlt in der Reihe (Taso, 28.11.2026) */
#sprachen { display: flex; gap: 8px; }
#sprachen[hidden], #sprachen button.an { display: none; }
#sprachen button { animation: kugelauf 0.2s ease-out backwards; }
#sprachen button:nth-child(2) { animation-delay: 0.03s; } #sprachen button:nth-child(3) { animation-delay: 0.06s; }
#sprachen button:nth-child(4) { animation-delay: 0.09s; } #sprachen button:nth-child(5) { animation-delay: 0.12s; }
@keyframes kugelauf { from { opacity: 0; transform: translateX(-22px) scale(0.6); } }
@media (prefers-reduced-motion: reduce) { #sprachen button { animation: none; } }
@media (max-width: 400px) { .ecke, #sprachen { gap: 5px; } #sprachen button { width: 40px; height: 40px; min-height: 40px; font-size: 12px; align-self: center; } }

/* Bedienblock etwas höher (hohe Bildschirme), am Laptop in der Mitte statt rechts (Taso, 28.11.2026) */
@media (min-height: 760px) { #start .spalte { padding-bottom: calc(7vh + env(safe-area-inset-bottom)); } }
@media (min-aspect-ratio: 5/4) and (min-width: 820px) {
  #start { align-items: center; background-position: center bottom; }
  #start::before { background: radial-gradient(ellipse 46% 80% at 50% 55%, rgba(8, 3, 3, 0.74) 0, rgba(8, 3, 3, 0.5) 55%, rgba(8, 3, 3, 0.08) 100%); }
  #start .spalte { margin: 0 auto; padding-bottom: 24px; }
}

/* Queue in der Zugleiste: ganz sichtbar statt hinten abgeschnitten, beim Aufziehen wandert das Griffende bis ans Ende der Leiste (Taso, 28.11.2026) */
.queue { width: 72%; height: auto; aspect-ratio: 1100 / 48; top: 50%; margin-top: 0; translate: 0 -50%; background-position: left top; background-size: 100% 200%; }
