/* ── Mühle — Oberfläche ────────────────────────────────────────────────────
   Charakter: edles Brettspiel im Lampenlicht — Elfenbein, Messing, dunkles Glas. Titel/Anzeigen in Playfair Display
   (Serifen, Kursive), Bedienung in Lato. Schriften aus dem zentralen Archiv https://fonts.hirsing.eu/ (absolut; vorher /vhc/global-media/fonts, Umzug 27.10.2026).
   Startbildschirm-Klassen sb-* (Norm wie Artillerie), Tafeln .tafel, Anzeige #hud, Schilder an den Bänken .schild.
   Handy: @media (max-height: 520px) = quer, (max-width: 640px) = hoch. */
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 700; font-display: swap;
  src: url('https://fonts.hirsing.eu/playfair-dispplay-v40-latin/playfair-display-v40-latin-700italic.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 900; font-display: swap;
  src: url('https://fonts.hirsing.eu/playfair-dispplay-v40-latin/playfair-display-v40-latin-900italic.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('https://fonts.hirsing.eu/playfair-dispplay-v40-latin/playfair-display-v40-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('https://fonts.hirsing.eu/lato-v25-latin/lato-v25-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('https://fonts.hirsing.eu/lato-v25-latin/lato-v25-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('https://fonts.hirsing.eu/lato-v25-latin/lato-v25-latin-900.woff2') format('woff2'); }

:root {
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --glas: rgba(16, 11, 8, 0.74); --glas-dicht: rgba(14, 10, 7, 0.9);
  --linie: rgba(222, 182, 112, 0.28); --linie-hell: rgba(240, 210, 150, 0.55);
  --elfenbein: #f4ecdf; --leise: #b8a78f; --gold: #d9ad62; --gold-hell: #f3d7a0; --gold-dunkel: #8b5e2b;
  --messing: linear-gradient(180deg, #fbe6b6 0%, #e2b56b 38%, #b07a39 70%, #8a5a26 100%);
  --rand: max(14px, env(safe-area-inset-left)); --oben: max(12px, env(safe-area-inset-top));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050506; color: var(--elfenbein); font-family: var(--sans); }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
#buehne { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.versteckt { display: none !important; }
.ebene { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.leise { color: var(--leise); font-size: 14px; line-height: 1.5; }

/* Steinsymbol (Marmor in klein, per CSS) */
.stein-ikon { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; vertical-align: -3px;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6); }
.stein-ikon.weiss { background: radial-gradient(circle at 35% 30%, #fffdf8 0%, #ece4d6 45%, #b9ab95 100%); }
.stein-ikon.schwarz { background: radial-gradient(circle at 35% 30%, #6a6a70 0%, #1c1c20 45%, #050506 100%); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.25), 0 0 0 1px rgba(240, 210, 150, 0.35), 0 1px 3px rgba(0, 0, 0, 0.6); }

/* ── Startbildschirm ─────────────────────────────────────────────────────── */
/* padding-top: Startkarte bleibt unter der GameZone-Pille, wenn sie bei niedriger Fensterhöhe die volle Höhe braucht (Prüfung 30.10.) */
.sb { justify-content: flex-start; padding-top: 60px; padding-left: clamp(18px, 6vw, 96px);
  background: radial-gradient(ellipse 70% 120% at 0% 50%, rgba(5, 4, 3, 0.86) 0%, rgba(5, 4, 3, 0.55) 45%, rgba(5, 4, 3, 0) 75%); }
/* Hintergrundbild Burgsaal (Micha 30.10.: Startbild war leer; Krea 2, ~/neo/werkzeug/gamezone/gpu/hg-bilder.py). Die Kamera schaut
   steil auf den Filztisch, ein Szenenhintergrund bliebe unsichtbar — deshalb liegt das Bild hinter dem Startmenü und läuft zum
   Brett hin aus (Maske). Nur im Menü; im Spiel bleibt der Tisch allein. */
.sb::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 4, 3, 0.72), rgba(5, 4, 3, 0.3)), url('../img/hg-quer.webp') left center / cover no-repeat;   /* Abdunklung: Text bleibt lesbar */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 38%, transparent 72%); mask-image: linear-gradient(90deg, #000 0%, #000 38%, transparent 72%); opacity: 0.85; }
.sb-karte { width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: 6px 4px; scrollbar-width: none; touch-action: pan-y; }
.sb-vortitel { font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); margin: 0 0 4px 4px; }
.sb-titel { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: clamp(64px, 8.4vw, 124px); line-height: 0.95; letter-spacing: -0.01em;
  background: linear-gradient(176deg, #fff8ea 0%, #f5dca8 40%, #c99348 75%, #94652c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(230, 160, 70, 0.28)); padding-right: 0.08em; }
.sb-zier { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px 4px; width: 210px; }
.sb-zier i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.sb-zier b { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); }
.sb-unterzeile { margin: 0 0 24px 4px; font-family: var(--serif); font-style: italic; font-weight: 700; color: var(--gold-hell); font-size: clamp(15px, 1.5vw, 19px); line-height: 1.4; max-width: 30em; }
.sb-gruppe { margin: 0 0 13px; }
.sb-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; color: var(--leise); margin: 0 0 6px 4px; }
/* Micha 26.10.: Einstellungsknöpfe „zu fett und globig“ → schlanker: dünne Leiste, gewählte Option als feiner Messingrahmen
   statt voller Messingfüllung, Start-Knopf niedriger. Vorherige Fassung:
.sb-wahl { display: flex; gap: 4px; background: var(--glas); padding: 4px; border-radius: 999px; border: 1px solid var(--linie); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sb-wahl button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--leise); font-weight: 700; font-size: 15px; transition: background .2s, color .2s, box-shadow .2s; }
.sb-wahl button.an { background: var(--messing); color: #2a1a08; box-shadow: 0 2px 12px rgba(220, 160, 80, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sb-start { … padding: 17px; … font-size: 24px; … box-shadow: 0 10px 34px rgba(210, 150, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(90, 55, 20, 0.5); }
*/
.sb-wahl { display: flex; gap: 2px; background: rgba(255, 240, 210, 0.03); padding: 3px; border-radius: 999px; border: 1px solid var(--linie); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sb-wahl button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 5px 10px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--leise); font-weight: 500; font-size: 14px; letter-spacing: 0.02em; transition: background .2s, color .2s, border-color .2s; }
.sb-wahl button:hover { color: var(--elfenbein); }
.sb-wahl button.an { background: rgba(220, 165, 90, 0.12); border-color: rgba(230, 180, 100, 0.55); color: var(--gold-hell); }
/* Namensfelder zu zweit — Form wie .sb-wahl */
.sb-namen { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--linie); background: rgba(255, 240, 210, 0.03); }
.sb-namen input { min-width: 0; min-height: 34px; padding: 5px 14px; border: 1px solid transparent; border-radius: 999px; background: rgba(255, 240, 210, 0.05); color: var(--elfenbein); font: inherit; }
.sb-namen input:focus { outline: none; border-color: rgba(230, 180, 100, 0.55); }
.sb-namen input::placeholder { color: var(--leise); }
.sb-start { position: relative; width: 100%; margin: 12px 0 14px; padding: 12px; border: 0; border-radius: 999px; font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 21px; letter-spacing: 0.02em; background: var(--messing); color: #2a1a08; overflow: hidden;
  box-shadow: 0 6px 20px rgba(210, 150, 70, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sb-start::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: glanz 4.5s ease-in-out infinite 1.5s; }
@keyframes glanz { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.sb-start:active { transform: translateY(1px); }
.sb-hilfe { background: var(--glas); border: 1px solid var(--linie); border-radius: 18px; padding: 11px 16px; font-size: 14px; color: var(--leise); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sb-hilfe summary { color: var(--elfenbein); font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.sb-hilfe summary::-webkit-details-marker { display: none; }
.sb-hilfe summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); transition: transform .2s; }
.sb-hilfe[open] summary::before { transform: rotate(45deg); }
.regeln { margin: 10px 0 6px; padding-left: 20px; line-height: 1.5; }
.regeln li { margin: 0 0 6px; } .regeln li::marker { color: var(--gold); font-family: var(--serif); font-style: italic; }
.regeln b { color: var(--gold-hell); }
.sb-sprache { margin: 12px 0 0 4px; background: none; border: 1px solid var(--linie); border-radius: 999px; padding: 7px 16px; color: var(--leise); font-size: 13px; letter-spacing: 0.06em; }

/* ── Tafeln ──────────────────────────────────────────────────────────────── */
.tafel-ebene { background: radial-gradient(ellipse at center, rgba(5, 4, 3, 0.35), rgba(5, 4, 3, 0.75)); }
.tafel { position: relative; width: min(420px, 100%); max-height: 100%; overflow-y: auto; padding: 28px 26px 22px; text-align: center; touch-action: pan-y;
  background: linear-gradient(180deg, rgba(30, 21, 14, 0.94), rgba(12, 8, 6, 0.96)); border: 1px solid var(--linie); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 230, 180, 0.12), inset 0 0 0 6px rgba(0, 0, 0, 0.18), inset 0 0 0 7px rgba(222, 182, 112, 0.14);
  animation: tafelRein .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes tafelRein { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
.tafel h2 { margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 38px; line-height: 1.1;
  background: linear-gradient(176deg, #fff8ea, #f0cf8e 55%, #b98340); -webkit-background-clip: text; background-clip: text; color: transparent; }
.knopf-gross { display: block; width: 100%; margin-top: 18px; padding: 14px; border: 0; border-radius: 999px; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 21px;
  background: var(--messing); color: #2a1a08; box-shadow: 0 8px 26px rgba(210, 150, 70, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.knopf-leise { display: block; width: 100%; margin-top: 10px; padding: 12px; background: rgba(255, 240, 210, 0.05); border: 1px solid var(--linie); border-radius: 999px; color: var(--elfenbein); font-weight: 700; }
.knopf-reihe { display: flex; gap: 10px; } .knopf-reihe .knopf-leise { flex: 1; }
.ende-krone { width: 54px; height: 54px; margin: -6px auto 8px; border-radius: 50%; background: var(--messing);
  -webkit-mask: radial-gradient(circle, #000 0 26px, transparent 27px); box-shadow: 0 0 30px rgba(240, 190, 100, 0.6); position: relative; }
.ende-krone::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 54'%3E%3Cpath d='M15 35 L13 20 L21 27 L27 16 L33 27 L41 20 L39 35 Z' fill='%232a1a08'/%3E%3Crect x='15' y='37' width='24' height='3' rx='1' fill='%232a1a08'/%3E%3C/svg%3E") center / contain no-repeat; }
.tafel-ende.remis .ende-krone { filter: grayscale(1) brightness(1.1); }
.tafel-ende.remis .ende-krone::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 54'%3E%3Crect x='15' y='22' width='24' height='3.4' rx='1.5' fill='%232a1a08'/%3E%3Crect x='15' y='30' width='24' height='3.4' rx='1.5' fill='%232a1a08'/%3E%3C/svg%3E") center / contain no-repeat; }
.ende-grund { margin: 0 0 18px; color: var(--gold-hell); font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 17px; }
.ende-tabelle { display: grid; grid-template-columns: 1fr auto auto; gap: 0; border-top: 1px solid var(--linie); text-align: left; font-size: 15px; }
.ende-tabelle > * { padding: 9px 4px; border-bottom: 1px solid rgba(222, 182, 112, 0.12); }
.ende-tabelle .kopf { color: var(--leise); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; }
.ende-tabelle .wert { text-align: center; min-width: 74px; font-variant-numeric: tabular-nums; font-weight: 700; }
.ende-tabelle .name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ende-tabelle .sieger { color: var(--gold-hell); }

/* Partie-Ende: Tafel seitlich (quer) bzw. unten (hoch), damit die Siegerstellung sichtbar bleibt */
#ende { justify-content: flex-end; padding-right: max(28px, 6vw); background: linear-gradient(90deg, rgba(5, 4, 3, 0) 35%, rgba(5, 4, 3, 0.55) 100%); }

/* ── Spielanzeige ────────────────────────────────────────────────────────── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud button { pointer-events: auto; }
.hud-status { position: absolute; top: var(--oben); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 22px 9px 14px;
  border-radius: 999px; background: var(--glas); border: 1px solid var(--linie); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); transition: border-color .3s, box-shadow .3s; max-width: calc(100vw - 150px); }
.hud-status .stein-ikon { width: 26px; height: 26px; }
.hud-status.mensch { border-color: var(--linie-hell); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(230, 170, 80, 0.18); }
.hud-status.schlagen { border-color: rgba(255, 110, 80, 0.7); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 26px rgba(255, 90, 50, 0.3); }
.hud-zeile { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.hud-hinweis { font-size: 12.5px; color: var(--leise); letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-knoepfe { position: absolute; top: var(--oben); right: var(--rand); display: flex; gap: 10px; }
.rund { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--linie); background: var(--glas); display: grid; place-items: center; padding: 0;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .2s, border-color .2s; }
.rund:hover { border-color: var(--linie-hell); }
.rund svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-hell); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rund:disabled { opacity: 0.32; cursor: default; }
.banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.8); opacity: 0; pointer-events: none; text-align: center; white-space: nowrap; }
.banner span { display: block; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: clamp(54px, 9vw, 120px); line-height: 1;
  background: linear-gradient(176deg, #fffaf0 0%, #f7d99a 45%, #c48a3e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(255, 170, 60, 0.55)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)); padding: 0 0.1em; }
.banner.klein span { font-size: clamp(30px, 4.6vw, 56px); }
.banner.an { animation: bannerAn 2.1s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes bannerAn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); letter-spacing: -0.02em; } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  30% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -58%) scale(1.02); } }
.banner.bleibt { animation: bannerBleibt 1.2s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes bannerBleibt { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* Schilder an den Bänken */
#schilder { position: fixed; inset: 0; pointer-events: none; z-index: 9; }
.schild { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(12, 8, 6, 0.6); border: 1px solid rgba(222, 182, 112, 0.18); white-space: nowrap; transition: border-color .3s, box-shadow .3s, background .3s; }
.schild-name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 17px; color: var(--elfenbein); }
.schild-zug { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0; transition: opacity .3s; }
.schild.dran { border-color: var(--linie-hell); background: rgba(30, 20, 10, 0.75); box-shadow: 0 0 22px rgba(230, 170, 80, 0.25); }
.schild.dran .schild-zug { opacity: 1; }

/* ── Handy quer ──────────────────────────────────────────────────────────── */
@media (max-height: 520px) {
  .sb { padding-left: max(18px, env(safe-area-inset-left)); }
  .sb-karte { width: min(620px, 62vw); display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-content: center; }
  .sb-vortitel, .sb-titel, .sb-zier, .sb-unterzeile { grid-column: 1 / -1; }
  .sb-vortitel { display: none; } .sb-titel { font-size: 52px; } .sb-zier { margin: 2px 0 4px 4px; } .sb-unterzeile { margin-bottom: 8px; font-size: 13.5px; }
  .sb-wahl button { white-space: nowrap; }
  .sb-gruppe { margin-bottom: 8px; } .sb-wahl button { min-height: 36px; padding: 5px 8px; font-size: 13.5px; }
  .sb-start { padding: 11px; margin: 6px 0 8px; font-size: 19px; align-self: end; }
  .sb-hilfe { grid-column: 1 / -1; padding: 8px 14px; } .sb-sprache { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
  .hud-status { padding: 6px 16px 6px 10px; } .hud-zeile { font-size: 18px; } .hud-hinweis { font-size: 11.5px; }
  .hud-status .stein-ikon { width: 22px; height: 22px; }
  .rund { width: 44px; height: 44px; }
  .tafel { padding: 18px 20px 14px; } .tafel h2 { font-size: 30px; } .knopf-gross { margin-top: 12px; padding: 11px; }
  .ende-tabelle > * { padding: 5px 4px; } .ende-grund { margin-bottom: 10px; } .ende-krone { display: none; }
  .tafel-ende { width: min(400px, 50vw); } .ende-tabelle { font-size: 13px; }
  .schild-name { font-size: 15px; } .schild { padding: 4px 12px 4px 6px; }
}
/* ── Handy hoch ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sb { justify-content: center; align-items: flex-end; padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(5, 4, 3, 0) 0%, rgba(5, 4, 3, 0.2) 30%, rgba(5, 4, 3, 0.92) 62%); }
  .sb-karte { width: 100%; }
  .sb-vortitel { display: none; } .sb-titel { font-size: 58px; } .sb-zier { margin: 6px 0 8px 4px; } .sb-unterzeile { margin-bottom: 12px; font-size: 14.5px; }
  .sb-gruppe { margin-bottom: 9px; } .sb-wahl button { min-height: 36px; font-size: 14px; }   /* vorher 40px (Micha 26.10. schlanker) */
  .sb-start { margin: 6px 0 10px; padding: 11px; }   /* vorher 14px */
  .hud-status { left: var(--rand); transform: none; max-width: calc(100vw - 2 * var(--rand) - 104px); padding: 7px 16px 7px 10px; }
  .hud-zeile { font-size: 19px; }
  #ende { justify-content: center; align-items: flex-end; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(5, 4, 3, 0) 40%, rgba(5, 4, 3, 0.6) 100%); }
  .tafel-ende { padding: 18px 18px 14px; } .tafel-ende h2 { font-size: 32px; } .ende-krone { display: none; } .ende-grund { margin-bottom: 10px; }
  .hud-knoepfe { gap: 8px; } .rund { width: 44px; height: 44px; }
}

/* ── Online gegen Freunde (27.10.2026; Ablauf main.js, Netz js/online.js) ── */
.freunde { display: flex; flex-wrap: wrap; gap: 6px; }
.freund { min-height: 38px; padding: 6px 14px; border: 1px solid var(--linie); border-radius: 999px; background: var(--glas); color: var(--elfenbein);
  font-weight: 700; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.freund.da::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: #6fdc8c; vertical-align: 1px; }
.freund.an { border-color: rgba(230, 180, 100, 0.7); background: rgba(220, 165, 90, 0.16); color: var(--gold-hell); }
#online-keine a, #online-gast { color: var(--gold-hell); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#online-gast { display: block; margin: 2px 0 0 4px; }
.fehler { margin: 6px 0 0 4px; min-height: 0; color: #ff9a7a; font-size: 13px; }
.fehler:empty { display: none; }
a.sb-start { display: block; text-align: center; text-decoration: none; }
.sb-start:disabled { opacity: 0.45; cursor: default; }
.ende-stand { margin: 14px 0 2px; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 22px; color: var(--gold-hell); }
#ende-online .leise { margin: 0; min-height: 1.5em; }
/* Chat: unten links, eingeklappt nur die Kopfzeile */
#chat { position: fixed; left: var(--rand, 16px); bottom: 16px; z-index: 12; width: min(320px, calc(100vw - 32px)); border: 1px solid var(--linie);
  border-radius: 18px; background: rgba(20, 14, 9, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
#chat-kopf { width: 100%; padding: 9px 14px; border: 0; background: none; color: var(--elfenbein); font-weight: 700; text-align: left; }
#chat-zahl { margin-left: 6px; color: var(--gold); font-size: 12px; }
#chat .chat-koerper { display: none; padding: 0 12px 10px; }
#chat.offen .chat-koerper { display: block; }
#chat-liste { max-height: 30vh; overflow-y: auto; font-size: 14px; line-height: 1.4; touch-action: pan-y; }
.chat-zeile { margin: 0 0 6px; overflow-wrap: anywhere; } .chat-zeile b { margin-right: 6px; color: var(--gold); }
.chat-zeile.ich b { color: var(--gold-hell); }
#chat-form { display: flex; gap: 6px; margin-top: 6px; }
#chat-eingabe { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 999px; background: rgba(255, 240, 210, 0.05);
  color: var(--elfenbein); font: inherit; user-select: text; -webkit-user-select: text; }
#chat-senden { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--messing); color: #2a1a08; font-weight: 700; }
@media (max-width: 700px) { #chat { bottom: 10px; } }
/* Ton an/aus (27.10.2026, js/ton.js) */
#knopf-ton .strich { display: none; }
#knopf-ton.aus .strich { display: inline; } #knopf-ton.aus .welle { display: none; }
@media (max-width: 760px), (max-aspect-ratio: 4/5) {   /* Hochformat: Bild oben hinter dem Brett-Ausschnitt, läuft nach unten zur Karte aus */
  .sb::before { background-image: linear-gradient(180deg, rgba(5, 4, 3, 0.2), rgba(5, 4, 3, 0.6)), url('../img/hg-hoch.webp'); background-position: center top;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 80%); mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 80%); opacity: 0.6; }
}
