/* Spieleabend – „Modern Poker Lounge“.
   Dunkelgrüner Filz, warmes Holz, sparsames Gold. Leuchten gibt es nur für „du bist dran“ und den Gewinner. */
/* Schrift liegt lokal – keine Verbindung zu Google (DSGVO) */
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

/* ---------- Design-Tokens ---------- */
:root {
  --bg: #101815;
  --panel: #1A2521;
  --panel-2: #24332D;
  --line: #FFFFFF1C;
  --glass: #18231FEC;
  --glass-soft: #FFFFFF05;
  --glass-blur: 12px;
  --glass-edge: #FFFFFF24;
  --accent: #32765B;
  --accent-hover: #3D896A;
  --accent-soft: #4CA67D24;
  --heading: Georgia, 'Times New Roman', serif;
  --felt: #174B3C;
  --felt-light: #235D49;
  --rail: #513322;
  --rail-dark: #2E1C12;
  --gold: #C99A45;
  --gold-text: #E0BC74;
  --gold-line: rgba(201, 154, 69, .25);
  --text: #F2F0E9;
  --text-2: #B3BDB5;
  --danger: #B8433F;
  --danger-text: #F0948F;
  --ok: #7FD39A;
  --info: #9DB7E8;
  --paper: #F7F3E8;
  --ink: #1A1A1A;
  --suit-red: #B3261E;
  --suit-blue: #1F57C3;
  --suit-green: #1C7A43;

  --r-s: 8px; --r-m: 12px; --r-l: 20px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --fs-badge: 12px; --fs-label: 13px; --fs-text: 15px; --fs-value: 18px; --fs-pot: 28px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 4px 10px rgba(0,0,0,.25);
  --shadow-2: 0 2px 4px rgba(0,0,0,.35), 0 12px 28px rgba(0,0,0,.4);

  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --seat-w: 172px;
  --av: 44px;
  --card-w: 54px;
  color-scheme: dark;
}
/* Theme „Nacht“: blauer Filz, dunkles Holz */
:root[data-theme='night'] { --felt: #1D2B45; --felt-light: #2A3C5E; --rail: #2B2621; --rail-dark: #17130F; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: var(--fs-text); line-height: 1.4; color: var(--text);
  background:
    radial-gradient(ellipse at 88% 8%, #8B683126, transparent 42%),
    radial-gradient(ellipse at 8% 55%, #2B614439, transparent 54%),
    radial-gradient(ellipse at 60% 100%, #6B49321F, transparent 55%),
    var(--bg);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
[hidden] { display: none !important; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 9px 17px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-weight: 600; box-shadow: inset 0 1px 0 #FFFFFF06;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover:not(:disabled) { background: #22463B; border-color: #3A6052; }
.btn:active:not(:disabled) { background: #183229; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Bestehender Klassenvertrag, neue gemeinsame Primärfarbe. */
.btn-brass { background: var(--accent); border-color: #75B39442; color: #FFF; }
.btn-brass:hover:not(:disabled) { background: var(--accent-hover); border-color: #8ED3AF70; }
.btn-brass:active:not(:disabled) { background: #285E49; }
/* Gefahr */
.btn-red, .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-red:hover:not(:disabled), .btn-danger:hover:not(:disabled) { background: #C9504B; border-color: #C9504B; }
.btn-red:active:not(:disabled), .btn-danger:active:not(:disabled) { background: #A23A36; }
/* Umriss-Variante für Fold */
.btn-outline-red { background: transparent; border: 1.5px solid var(--danger); color: var(--danger-text); box-shadow: none; }
.btn-outline-red:hover:not(:disabled) { background: rgba(184,67,63,.14); border-color: #D0605B; }
.btn-ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--panel-2); }
.btn-big { min-height: 52px; padding: 12px 18px; font-size: 17px; width: 100%; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: var(--fs-label); border-radius: var(--r-s); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-s);
  background: none; border: 0; color: var(--text-2);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }
.btn kbd { font: inherit; font-size: 11px; opacity: .6; margin-left: 4px; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; line-height: 1.3; }

/* Eingaben */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: var(--fs-label); color: var(--text-2); font-weight: 600; padding: 0; }
.field input, .field select, .input {
  width: 100%; min-height: 44px; background: #0F1A17; border: 1px solid #2A3E37;
  border-radius: var(--r-m); padding: 10px 12px; outline: none; color: var(--text);
}
.field select, select.input {
  appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,69,.18); }
.hint { margin: 6px 0 0; font-size: var(--fs-label); color: var(--text-2); }
.error { color: var(--danger-text); min-height: 1.2em; margin: 0; font-size: 14px; }

/* Schalter statt Checkbox (bleibt eine echte Checkbox mit Label) */
.toggle { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 10px 0; min-height: 44px; cursor: pointer; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle span small { display: block; color: var(--text-2); font-size: var(--fs-label); }
.toggle input[type='checkbox'] {
  appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; margin: 0;
  background: #2A3A35; border: 1px solid #3A4D46; position: relative; cursor: pointer; transition: background .15s;
}
.toggle input[type='checkbox']::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #C8CEC9; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .15s;
}
.toggle input[type='checkbox']:checked { background: var(--gold); border-color: var(--gold); }
.toggle input[type='checkbox']:checked::after { transform: translateX(18px); background: #fff; }

/* ---------- Lobby und Login ---------- */
.lobby { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-5) var(--s-4); gap: var(--s-4); }
.lobby-felt {
  width: min(460px, 100%); padding: 44px 32px 32px; border-radius: 28px;
  background: var(--panel); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 #FFFFFF0C, 0 24px 80px #0005;
}
.lobby-felt .wordmark { font: 400 clamp(38px, 10vw, 52px)/1.1 var(--heading); letter-spacing: -.04em; }
@supports (backdrop-filter: blur(1px)) {
  .lobby-felt { background: var(--glass); backdrop-filter: blur(var(--glass-blur)); }
}
@media (prefers-reduced-transparency: reduce) { .lobby-felt { background: var(--panel); backdrop-filter: none; } }
.wordmark { margin: 0; font-size: clamp(44px, 10vw, 60px); line-height: .95; font-weight: 800; letter-spacing: -.035em; color: var(--text); }
.lobby-sub { margin: 10px 0 22px; color: #D3E1DA; max-width: 36ch; }
.lobby-form { display: grid; gap: 14px; }
.lobby-felt .field > span, .lobby-felt .field legend { color: #D3E1DA; }
.lobby-felt .field input { background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.14); }
.lobby-felt .hint { color: #B9CDC4; }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-opt { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: rgba(0,0,0,.25); font-size: 20px; padding: 0; }
.avatar-opt[aria-pressed='true'] { border-color: var(--gold); background: rgba(201,154,69,.18); }

.bot-controls { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; }
.bot-controls .hint { margin: 0; }
.bot-controls .btn { min-height: 44px; }
.bot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.program-controls, .program-stand, .program-options, .program-presets { display: grid; gap: 12px; }
.program-controls { padding: 12px; border: 1px solid var(--gold-line); border-radius: var(--r-m); }
.program-controls p { margin: 0; }
.program-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; width: min(100%, 940px); border: 1px solid var(--gold); border-radius: var(--r-m); background: var(--panel); }
.program-banner > div { flex: 1; min-width: min(200px, 100%); }
.program-banner small { display: block; color: var(--gold-text); }
.kg-main.has-program { align-content: start; gap: 14px; }
.program-dlg { width: min(720px, calc(100vw - 24px)); padding: 20px; max-height: 90dvh; }
.program-dlg form, .program-editor, .program-teams { display: grid; gap: 14px; }
.program-dlg h2, .program-dlg p { margin: 0; }
.program-dlg input, .program-dlg select { max-width: 100%; min-width: 0; }
.program-entry { min-width: 0; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; }
.program-entry summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.program-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.program-controls .btn, .program-banner .btn, .program-dlg .btn { min-height: 44px; }
.program-stand { max-width: 100%; overflow-x: auto; }
.program-winners { padding: 14px; border: 2px solid var(--gold); border-radius: var(--r-m); font-size: 20px; }
.program-results { margin: 0; padding-left: 22px; font-size: 14px; }

/* ---------- Spiel-Layout ---------- */
.game { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }

/* Obere Leiste */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3);
  padding: 8px var(--s-4); background: linear-gradient(180deg, #13201C, #101B18);
  border-bottom: 1px solid var(--gold-line); position: relative; z-index: 30;
}
.top-left, .top-right { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.top-right { justify-content: flex-end; }
.code-chip {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--text-2);
}
.code-chip:hover { border-color: var(--gold); color: var(--text); }
.code-chip b { letter-spacing: .16em; font-weight: 800; color: var(--text); }
.code-label { font-size: var(--fs-label); }
/* Darf schrumpfen: lange Zeilen (z. B. nächstes Blind-Level) enden mit „…“ statt Code oder Menü zu überdecken */
.meta { text-align: center; line-height: 1.15; white-space: nowrap; min-width: 0; overflow: hidden; }
.meta > div { overflow: hidden; text-overflow: ellipsis; }
.meta .blinds { font-size: var(--fs-value); font-weight: 700; color: var(--text); }
.meta .blinds small { font-size: var(--fs-label); color: var(--text-2); font-weight: 500; margin-right: 6px; }
.meta .meta-sub { font-size: 12px; color: var(--text-2); }
.meta .meta-sub b { color: var(--gold-text); font-weight: 600; }
.topnav { display: flex; gap: 2px; }
.nav-btn {
  position: relative; background: none; border: 0; min-height: 40px; padding: 8px 12px; border-radius: var(--r-s);
  color: var(--text-2); font-weight: 600; transition: color .15s, background .15s;
}
.nav-btn:hover { color: var(--text); background: var(--panel); }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; }
.nav-btn .ico { opacity: .75; }
/* Aktiv: heller Text, Fläche, goldene Linie und goldenes Symbol – nicht nur über Farbe */
.nav-btn[aria-current='true'] { color: var(--text); background: var(--panel); }
.nav-btn[aria-current='true'] .ico { opacity: 1; color: var(--gold-text); }
.nav-btn[aria-current='true']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); }
.freeze-btn { white-space: nowrap; }

/* ---------- Seitenleiste (Verlauf, Stand, Ich, Host) ---------- */
.panel {
  position: fixed; top: var(--topbar, 57px); right: 0; bottom: 0; width: min(390px, 100%); z-index: 40;
  background: var(--panel); border-left: 1px solid var(--line); border-top: 1px solid var(--gold-line);
  display: grid; grid-template-rows: auto auto 1fr; box-shadow: -20px 0 40px rgba(0,0,0,.45);
}
.grip { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--s-4); border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: var(--fs-value); }
.panel-body { overflow-y: auto; padding: var(--s-4) var(--s-4) var(--s-5); display: grid; gap: var(--s-4); align-content: start; }
.panel h3 { margin: 4px 0 0; font-size: var(--fs-label); color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-m); background: #0F1A17; border: 1px solid var(--line); }
.seg button { min-height: 38px; border: 0; border-radius: var(--r-s); background: none; color: var(--text-2); font-weight: 600; }
.seg button[aria-selected='true'] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-m); background: rgba(201,154,69,.1); border: 1px solid rgba(201,154,69,.35); color: var(--gold-text); font-size: 14px; }
.big-actions { display: grid; gap: var(--s-2); }
.big-actions .btn { min-height: 52px; font-size: 16px; justify-content: flex-start; padding: 10px 16px; }
.group { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel-2); }
.group summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform .15s; }
.group[open] summary::after { transform: rotate(-135deg); }
.group-body { padding: 0 14px 14px; display: grid; gap: var(--s-3); border-top: 1px solid var(--line); padding-top: 12px; }
.host-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Verlauf */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.reacts .btn { min-height: 36px; box-shadow: none; background: var(--panel-2); border-color: var(--line); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.log li { color: #CBD3CF; }
.log li.hand { margin-top: 10px; color: var(--text-2); font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .05em; }
.log li.win { color: var(--ok); font-weight: 600; }
.log li.street { color: var(--text); }
.log li.warn { color: var(--gold-text); }
.mc { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; margin: 0 1px; border-radius: 4px; background: var(--paper); color: var(--ink); font-weight: 800; font-size: 13px; line-height: 1; vertical-align: 1px; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.mc.red { color: var(--suit-red); }
.four .mc.d { color: var(--suit-blue); }
.four .mc.c { color: var(--suit-green); }
/* Stand des Abends */
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.standings td.num { text-align: right; white-space: nowrap; }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--text-2); border: 1px solid var(--line); }
.rank.r1 { color: #2A1F08; background: #D9B266; border-color: #D9B266; }
.rank.r2 { color: #1E2224; background: #C3C9CC; border-color: #C3C9CC; }
.rank.r3 { color: #2A170B; background: #B9805A; border-color: #B9805A; }
.pos { color: var(--ok); } .neg { color: var(--danger-text); }
.facts { display: grid; gap: var(--s-2); }
.fact { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; }
.fact small { color: var(--text-2); display: block; font-size: var(--fs-label); }
/* Spielerliste (Host) */
.plist { display: grid; gap: var(--s-2); }
.prow { position: relative; display: flex; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 8px 8px 10px; }
.prow .who { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.prow .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .who small { color: var(--text-2); }
.prow .mini-av { width: 32px; height: 32px; font-size: 18px; }
.menu {
  position: absolute; right: 8px; top: calc(100% - 4px); z-index: 5; min-width: 200px; padding: 6px;
  background: #1E302A; border: 1px solid #2E453D; border-radius: var(--r-m); box-shadow: var(--shadow-2); display: grid; gap: 2px;
}
.menu button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--r-s); background: none; text-align: left; font-weight: 600; }
.menu button:hover, .menu button:focus-visible { background: var(--panel-2); }
.menu button.danger { color: var(--danger-text); }

.mini-av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; vertical-align: middle; font-size: 15px; background: var(--panel-2); flex: none; }

/* ---------- Dialoge ---------- */
.dlg {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid #2E453D; border-radius: var(--r-l);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-2);
}
.dlg::backdrop { background: rgba(4, 9, 8, .66); }
.dlg[open] { animation: dlg-in .2s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } }
.dlg form { padding: var(--s-5); display: grid; gap: var(--s-3); }
.dlg h2 { margin: 0; font-size: 20px; }
.dlg p { margin: 0; color: var(--text-2); }
.dlg-actions { display: flex; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-2); }
.dlg-actions .btn { min-width: 120px; min-height: 44px; }
.dlg-actions .btn:last-child { margin-left: auto; }

/* ---------- Toast und Verbindungs-Banner ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h, 116px) + 16px); transform: translateX(-50%); background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: var(--r-m); font-weight: 600; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; box-shadow: var(--shadow-2); }
.toast.show { opacity: 1; }
.toast.bad { background: #FBE0DC; color: #5B1410; }
.offline { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 6px 14px; border-radius: 999px; z-index: 70; font-weight: 600; }

/* ---------- Bildschirmgrößen ---------- */
@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 900px) {
  .code-label { display: none; }
  .meta .blinds small { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { grid-template-columns: auto 1fr auto; padding: 6px 8px; gap: 6px; }
  .meta { text-align: left; }
  .meta .blinds { font-size: 15px; }
  .meta .meta-sub { font-size: 11px; }
  .nav-btn { padding: 6px 7px; font-size: 13px; }
  .nav-btn[aria-current='true']::after { left: 7px; right: 7px; }
  .code-chip { padding: 6px 10px; }
  .code-chip .ico { display: none; }
  .btn kbd { display: none; }
  .host-grid { grid-template-columns: 1fr; }
  .panel { top: auto; left: 0; width: 100%; max-height: 82dvh; border-left: 0; border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: 0 -20px 40px rgba(0,0,0,.5); animation: drawer .25s ease-out; }
  .grip { display: block; width: 100%; height: 44px; border: 0; background: none; padding: 0; position: relative; } /* Griff klein, Fläche groß genug */
  .grip::before { content: ''; position: absolute; left: 50%; top: 14px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #3A4D46; }
}
@keyframes drawer { from { transform: translateY(40px); opacity: 0; } }
/* Touch: alle Ziele mindestens 44 × 44 px */
@media (pointer: coarse) {
  .btn, .btn-sm, .presets .btn, .reacts .btn, .nav-btn, .code-chip, .seg button { min-height: 44px; }
  .nav-btn, .btn-sm, .freeze-btn { min-width: 44px; justify-content: center; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  input[type=number], select, .input { min-height: 44px; }
}
/* ---------- Verlauf: Filter, Suche, Hände zum Aufklappen ---------- */
.log-tools { display: grid; gap: 8px; margin: var(--s-3) 0; }
.log-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { min-height: 32px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: var(--fs-label); font-weight: 600; cursor: pointer; }
.chip-btn[aria-pressed='true'] { background: var(--panel-2); color: var(--text); border-color: var(--gold); }
.chip-btn[aria-pressed='true']::before { content: '✓'; margin-right: 4px; color: var(--gold-text); }
#log-search { min-height: 38px; }
details.lg { border-top: 1px solid var(--line); padding: 6px 0; }
details.lg > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; padding: 4px 0; }
details.lg > summary::-webkit-details-marker { display: none; }
details.lg > summary::before { content: '▸'; color: var(--text-2); width: 10px; flex: none; }
details.lg[open] > summary::before { content: '▾'; }
details.lg > summary b { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .05em; color: var(--text); white-space: nowrap; }
details.lg > summary small { color: var(--text-2); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-n { margin-left: auto; font-size: 11px; color: var(--text-2); background: var(--panel-2); border-radius: 999px; padding: 1px 7px; }
details.lg .log { margin: 4px 0 4px 18px; }
@media (max-width: 640px) { .nav-btn .ico { display: none; } }
/* Handy: Regeln über „?“ → „Alle Regeln“, damit der Spielname oben Platz hat */
@media (max-width: 640px) { .kg .nav-btn[data-kit-panel="rules"] { display: none; } }

/* ---------- Rundenspiele (games/kit.js): Rahmen, Spielerleiste, Karten, Würfel ---------- */
/* Eine Spalte, die nie breiter als der Bildschirm wird – sonst drückt die Spielerleiste die ganze Seite auf (Handy zoomt heraus) */
.kg { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.kg > * { min-width: 0; }
/* Feste Zeilen – auch wenn die Leiste am großen Tisch ausgeblendet ist, bleibt der Tisch die wachsende Zeile */
.kg > .topbar { grid-row: 1; } .kg > .kg-players { grid-row: 2; } .kg > .kg-main { grid-row: 3; } .kg > .kg-dock { grid-row: 4; }
/* position: relative, damit unsichtbare Vorlesetexte (.sr-only) mit der Leiste scrollen statt die Seite zu verbreitern */
.kg-players { position: relative; display: flex; gap: 8px; padding: 8px var(--s-4); overflow-x: auto; border-bottom: 1px solid var(--line); background: #0F1A17; }
.kp { flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.kp.turn { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(201,154,69,.3); }
.kp.me .kp-txt b { color: var(--gold-text); }
.kp.is-offline, .kp.out { opacity: .55; }
.kp-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 18px; }
.kp-txt { display: grid; line-height: 1.25; }
.kp-txt b { font-size: 14px; white-space: nowrap; }
.kp-txt small { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.kp-txt em { font-style: normal; color: var(--gold-text); font-weight: 700; }
.kp-watch { background: none; border-style: dashed; padding: 5px 14px; }
.kg-call { color: var(--gold-text); }
.kg-main { min-height: 0; overflow: auto; display: grid; place-items: center; padding: var(--s-4);
  background: radial-gradient(120% 90% at 50% 25%, var(--felt-light), var(--felt)); }
.kg-dock { border-top: 1px solid var(--gold-line); background: linear-gradient(180deg, #13201C, #0E1815); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); }
body.kg-myturn .kg-dock { box-shadow: inset 0 3px 0 var(--gold); }
.kg-dock-row, .kg-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: center; }
.kg-dock-in { display: grid; gap: var(--s-3); }
.kg-hand { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 8px; }
.kg-table { display: grid; gap: var(--s-4); justify-items: center; width: min(100%, 940px); }
.kg-lobby { text-align: center; padding: var(--s-5); border-radius: var(--r-l); background: rgba(0,0,0,.28); max-width: 540px; }
.kg-lobby h2 { margin: 0 0 8px; font-size: 26px; }
.kg-lobby .hint { color: #C9D8D1; }
.kg-piles { display: flex; gap: var(--s-5); align-items: flex-end; justify-content: center; }
.kg-pile { display: grid; gap: 6px; justify-items: center; }
.kg-pile small, .kg-table small { color: #D3E1DA; }
.kg-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.kg-chip { padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.32); color: var(--text); font-size: 14px; }
.kg-chip.warn { background: rgba(184,67,63,.45); }
.kg-rules ul, .kg-rules ol { padding-left: 20px; margin: 8px 0; }
.kg-rules li { margin: 4px 0; }
.kg-rules p { margin: 0 0 8px; }

/* ---------- Tisch mit Plätzen (große Bildschirme) ---------- */
/* Links (von unten nach oben), oben, rechts (von oben nach unten) – der Nächste sitzt links von dir. Du selbst unten. */
.kg-main.ring { padding: 12px 16px; place-items: stretch; overflow: hidden; }
.kt { display: grid; width: 100%; height: 100%; min-height: 0; gap: 10px 14px;
  grid-template: "top top top" auto "left center right" minmax(0, 1fr) "bottom bottom bottom" auto / auto minmax(0, 1fr) auto; }
.kt-rail { display: flex; gap: 12px; align-items: center; justify-content: center; min-width: 0; }
.kt-top { grid-area: top; padding: 0 64px; flex-wrap: wrap; }
.kt-left { grid-area: left; flex-direction: column-reverse; }
.kt-right { grid-area: right; flex-direction: column; }
.kt-bottom { grid-area: bottom; }
.kt-center { grid-area: center; position: relative; min-height: 0; min-width: 0; display: grid; }
.kt-content { position: relative; z-index: 1; min-height: 0; min-width: 0; overflow: auto; display: grid; place-items: center; container-type: size; padding: 8px; }
.kt-watch { font-size: 12px; color: var(--text-2); }
/* Zugrichtung: dezenter Kreis mit zwei Pfeilen, spiegelt sich beim Richtungswechsel */
.kt-dir { position: absolute; inset: 3% 2%; pointer-events: none; transition: transform .3s ease; }
.kt-dir i { position: absolute; inset: 0; border: 2px dashed rgba(255,255,255,.13); border-radius: 50%; }
.kt-dir b { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(180deg); font-size: 26px; line-height: 1; color: rgba(255,255,255,.55); font-weight: 400; }
.kt-dir.ccw { transform: scaleX(-1); }
/* Platz am Tisch */
.ks { position: relative; display: grid; gap: 4px; justify-items: center; min-width: 124px; max-width: 170px; padding: 8px 10px;
  border-radius: 14px; background: rgba(8,14,12,.6); border: 1px solid rgba(255,255,255,.12); text-align: center; }
.ks.turn { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(201,154,69,.35); }
.ks.me .kp-txt b { color: var(--gold-text); }
.ks.is-offline, .ks.out { opacity: .55; }
.ks-head { display: flex; gap: 8px; align-items: center; text-align: left; min-width: 0; }
.ks .kp-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; display: block; }
.ks .kp-txt b small { color: var(--text-2); font-weight: 400; }
.ks-info { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 8px; font-size: 12px; color: var(--text-2); }
.ks-info:empty { display: none; }
.kt-bottom .ks { grid-auto-flow: column; max-width: none; align-items: center; gap: 12px; }
/* Sprechblase: letzte Aktion. Die neueste ist kräftig, ältere etwas blasser. */
.ks-bubble { position: absolute; z-index: 4; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); max-width: 200px; overflow: hidden; text-overflow: ellipsis;
  padding: 4px 10px; border-radius: 12px; background: #F3EEE2; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 8px rgba(0,0,0,.4); opacity: .78; }
.ks-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #F3EEE2; }
.ks-bubble.fresh { opacity: 1; animation: bubble-in .22s ease-out; }
.kt-top .ks-bubble { bottom: auto; top: calc(100% + 8px); }
.kt-top .ks-bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #F3EEE2; }
.kt-left .ks-bubble, .kt-right .ks-bubble { bottom: auto; top: 50%; transform: translateY(-50%); }
.kt-left .ks-bubble { left: calc(100% + 10px); }
.kt-right .ks-bubble { left: auto; right: calc(100% + 10px); }
.kt-left .ks-bubble::after { left: auto; right: 100%; top: 50%; margin: -6px 0 0; border-top-color: transparent; border-right-color: #F3EEE2; }
.kt-right .ks-bubble::after { left: 100%; top: 50%; margin: -6px 0 0; border-top-color: transparent; border-left-color: #F3EEE2; }
@keyframes bubble-in { from { opacity: 0; scale: .85; } }
/* Verdeckter Kartenfächer: zeigt, wie viele Karten jemand hat */
.fan { position: relative; display: inline-block; width: 40px; height: 26px; }
.fan i { position: absolute; left: 50%; bottom: 0; width: 15px; height: 21px; margin-left: -7.5px; border-radius: 3px; transform-origin: 50% 100%; transform: rotate(var(--r));
  background: repeating-linear-gradient(45deg, #1F5A44 0 3px, #184836 3px 6px); border: 1.5px solid #E9DFC6; }
/* Leiste (Handy): letzte Aktion klein unter dem Namen */
.kp-act { justify-self: start; margin-top: 2px; padding: 0 6px; border-radius: 8px; background: #F3EEE2; color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; opacity: .7; }
.kp-act.fresh { opacity: 1; }
.kg-players[hidden] { display: none; }

/* Über der Hand: was man gerade tun kann */
.kg-hint-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.kg-hint { margin: 0; text-align: center; font-weight: 600; color: var(--text-2); }
.kg-hint.mine { color: var(--text); }
.kg-hint:empty { display: none; }
@media (pointer: fine) { .kg-sort { min-height: 32px; } }
/* Viele Handkarten auf dem Handy: überlappend in einer Zeile, Antippen vergrößert */
.kg-hand.overlap { flex-wrap: nowrap; justify-content: flex-start; gap: 0; overflow-x: auto; padding: 22px 10px 0; }
.kg-hand.overlap > :first-child { margin-left: auto; }
.kg-hand.overlap > :last-child { margin-right: auto; }
.kg-hand.overlap > * + * { margin-left: var(--ov, 0); }
.kg-hand.overlap > .kc { box-shadow: -3px 0 6px rgba(0,0,0,.35); }
.kg-hand.overlap > .kc.peek { z-index: 2; transform: translateY(-16px) scale(1.25); }
/* Ziehen auf die Ablage */
.drop-ok { outline: 2px dashed rgba(255,255,255,.45); outline-offset: 4px; border-radius: 12px; }
.drag-over { outline: 3px solid var(--gold); }
[draggable='true'] { cursor: grab; }

/* Rundenende: großes Ergebnisfenster über dem Tisch */
.kg-over { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgba(4,9,8,.55); }
.kg-over-card { width: min(100%, 540px); max-height: 100%; overflow: auto; display: grid; gap: 12px; padding: 22px; border-radius: var(--r-l);
  background: var(--panel); border: 1px solid var(--gold); box-shadow: var(--shadow-2); animation: over-in .25s ease-out; }
.kg-over-kicker { color: var(--gold-text); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: 12px; }
.kg-over h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.kg-over tr.won td { font-weight: 700; color: var(--gold-text); }
.kg-over td small { color: var(--text-2); font-weight: 400; }
.kg-won { white-space: nowrap; font-size: 13px; }
@media (max-width: 640px) { .kg-over { padding: 8px; } .kg-over-card { padding: 16px; gap: 10px; } .kg-over h2 { font-size: 18px; } .kg-over td, .kg-over th { padding: 6px 4px; } }
.kg-over-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.kg-over-acts .waiting { margin-left: auto; }
@keyframes over-in { from { opacity: 0; transform: translateY(10px); } }
.standings th { text-align: left; font-size: var(--fs-label); color: var(--text-2); font-weight: 600; padding: 4px; }
.standings th.num { text-align: right; }
/* Karten */
.kc { --w: 56px; width: var(--w); aspect-ratio: 5 / 7; border-radius: 8px; border: 0; padding: 0; position: relative; display: grid; place-items: center; flex: none;
  background: var(--paper); color: var(--ink); font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.kc:disabled { cursor: default; }
.kc.big { --w: 84px; }
.kc.can { box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(0,0,0,.4); transform: translateY(-6px); }
/* Farbsymbol in der Ecke (Schalter „Farbsymbole“ unter „Ich“) */
.kc .cm { display: none; position: absolute; top: 4px; left: 4px; width: max(8px, calc(var(--w) * .2)); height: max(8px, calc(var(--w) * .2)); fill: #fff; stroke: rgba(0,0,0,.45); stroke-width: 2; }
body.marks .kc .cm { display: block; }
.btn .cm, .toggle small .cm { display: inline-block; width: 13px; height: 13px; fill: currentColor; vertical-align: -1px; }
body:not(.marks) .btn .cm { display: none; }
.kc.sel { box-shadow: 0 0 0 3px var(--info), 0 4px 10px rgba(0,0,0,.4); transform: translateY(-8px); }
.kc-back { background: repeating-linear-gradient(45deg, #1F5A44 0 6px, #184836 6px 12px); color: #F2F6F3; font-size: 15px; border: 3px solid #E9DFC6; }
.kc-empty { border: 2px dashed rgba(255,255,255,.28); background: transparent; box-shadow: none; }
.kc-fr .r { position: absolute; top: 5px; left: 6px; font-size: calc(var(--w) * .3); line-height: 1; }
.kc-fr .s { font-size: calc(var(--w) * .5); margin-top: 18%; }
.kc-fr.red { color: var(--suit-red); }
/* Würfel mit Augen */
.die { --d: 34px; width: var(--d); height: var(--d); display: inline-grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: calc(var(--d) * .12);
  border-radius: 22%; background: var(--paper); border: 0; box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), 0 2px 5px rgba(0,0,0,.35); flex: none; }
.die i { width: 72%; height: 72%; margin: auto; border-radius: 50%; }
.die i.on { background: var(--ink); }
.die.big { --d: 58px; }
.die.kept { box-shadow: 0 0 0 4px var(--gold), 0 2px 5px rgba(0,0,0,.35); transform: translateY(-4px); }
.die.hidden { background: #2B3A35; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.die.old { opacity: .45; }
button.die { cursor: pointer; }
.dice { display: flex; gap: 10px; justify-content: center; }
.btn.wish { min-width: 92px; }
@media (max-width: 640px) {
  .kc { --w: 44px; }
  .kc.big { --w: 64px; }
  .die.big { --d: 46px; }
  .kg-main { padding: 60px var(--s-3) var(--s-3); } /* oben Platz für das „?“ */
  .kg-players { padding: 6px 8px; }
  .kg-dock { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .kp-txt small { white-space: normal; }
}

/* Regel-Schalter im Host-Menü der Rundenspiele */
.kg-switches { display: grid; gap: 2px; }
.kg-switches .toggle { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Host-Menü: Spiel wechseln */
.switch-game { display: flex; gap: 8px; }
.switch-game select { flex: 1; min-width: 0; }

/* Bestenliste */
.lb-dlg { width: min(580px, calc(100vw - 24px)); }
.lb-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-scroll { max-height: min(52dvh, 460px); overflow-y: auto; }
.lb-table small { color: var(--text-2); font-weight: 400; }
/* V2-03: Gewertet (Ranked) und unbestätigte Statistik sind sichtbar getrennt */
.lb-wide { grid-column: 1 / -1; }
.lb-badge { margin: 4px 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line, #8886); font-size: 14px; line-height: 1.4; }
.lb-badge-ranked { border-color: #3f8f5f; }
.lb-badge-stats { border-style: dashed; border-color: #b9893a; }
.lb-empty { padding: 14px 0; }
/* Overlay in der Ecke des Spielfelds: nimmt dem Brett keinen Platz weg */
.rank-chip { position: absolute; top: 6px; left: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 64px); padding: 2px 10px; border-radius: 999px; border: 1px solid #8886; background: #000a; color: #fff; font-size: 11px; line-height: 1.4; margin: 0; pointer-events: none; }
.rank-chip.on { border-color: #3f8f5f; }
.rank-chip.off { border-style: dashed; border-color: #b9893a; }
@media (max-width: 520px) { .lb-filters { grid-template-columns: 1fr; } .lb-table th, .lb-table td { padding: 6px 4px; font-size: 14px; } .lb-table small { display: block; font-size: 12px; } .lb-table th { font-size: 13px; letter-spacing: 0; } }

/* ---------- Kurzregeln: „?“ am Tisch ---------- */
.help-btn { position: absolute; top: 12px; right: 12px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--gold); background: rgba(10,16,14,.75); color: var(--gold-text); font-weight: 800; font-size: 20px; cursor: pointer; box-shadow: var(--shadow-1); }
.help-btn:hover { background: var(--panel-2); }
.kg-main { position: relative; }
.help-dlg { width: min(480px, calc(100vw - 24px)); }
.help-body { padding: var(--s-5); display: grid; gap: var(--s-3); }
.help-body h2 { margin: 0; font-size: 20px; }
.help-body h3 { margin: 4px 0 0; font-size: var(--fs-label); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.help-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.help-list.house li::marker { color: var(--gold-text); }

/* ---------- Bewegung aus: prefers-reduced-motion und „Animationen aus“ ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .seb-z text:nth-child(3) { opacity: 1; }
}
.calm *, .calm *::before, .calm *::after { animation: none !important; transition: none !important; }
.calm .seb-z text:nth-child(3) { opacity: 1; }

/* ---------- Ablegespiele: Wunschfarbe, Strafzähler, „Mau“/„UNO“-Knopf ---------- */
.kg-discard { position: relative; }
.kg-penalty { position: absolute; top: -12px; right: -14px; z-index: 2; min-width: 46px; height: 46px; padding: 0 8px; display: grid; place-items: center;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 20px; font-weight: 800; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.45); animation: bubble-in .22s ease-out; }
.kg-wish-badge { width: 84px; aspect-ratio: 5 / 7; display: grid; place-items: center; border-radius: 10px; border: 3px dashed var(--gold); background: rgba(0,0,0,.28); }
.kg-wish small b { color: var(--gold-text); }
.kg-wishes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn-call { min-height: 52px; padding: 8px 22px; font-size: 18px; font-weight: 800; border-width: 2px; border-color: var(--gold); }
.btn-call.armed { background: var(--gold); color: #1B1306; }
.btn-call.catch { border-color: var(--danger); background: rgba(184,67,63,.25); }
@media (max-width: 640px) { .kg-wish-badge { width: 64px; } .kg-penalty { min-width: 40px; height: 40px; font-size: 17px; } }

/* ---------- Erste Schritte (beim ersten Spiel einer Art) ---------- */
.intro-dlg { width: min(460px, calc(100vw - 24px)); }
.intro-step { color: var(--gold-text); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.intro-text { margin: 0; font-size: 17px; line-height: 1.5; }
.intro-dots { display: flex; gap: 6px; }
.intro-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.intro-dots i.on { background: var(--gold); }
.intro-off { padding: 8px 0; border-top: 1px solid var(--line); }

/* Deutsches Blatt (Mau-Mau, Schwimmen): Wert in der Ecke, große Farbe als eigene Zeichnung */
.kc-de .r { position: absolute; top: 5px; left: 6px; font-size: calc(var(--w) * .3); line-height: 1; }
.kc-de .big-suit { width: 66%; height: auto; margin-top: 18%; }
.de-suit.inline { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.btn .de-suit.inline { width: 20px; height: 20px; }

/* Zug-Timer oben: Restzeit, die letzten 10 Sekunden hervorgehoben (mit Text, nicht nur Farbe) */
#kg-clock { font-variant-numeric: tabular-nums; }
#kg-clock.mine { color: var(--gold-text); font-weight: 700; }
#kg-clock.urgent { color: #FF8A80; font-weight: 800; }

/* Ergebnisfenster: Einzelheiten je Spieler (z. B. Blackjack: „Blackjack! +37 · Push“) */
.kg-detail { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }

/* Home-Knopf oben links: Haus-Symbol + „Start“ */
.home-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-weight: 600;
}
.home-btn:hover { border-color: var(--gold); color: var(--text); }
.home-btn .ico { width: 20px; height: 20px; }
@media (max-width: 520px) { .home-btn span { display: none; } .home-btn { padding: 6px; } }
.home-actions { flex-wrap: wrap; }
.home-actions .btn { min-height: 44px; }

/* „Ansehen“: Blatt mit offenen Informationen (Stapel, Züge, Blätter). Handy: von unten, groß: mittig */
.look-dlg { border: 1px solid var(--gold-line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; width: min(720px, calc(100vw - 24px)); max-height: min(86vh, 900px); overflow: hidden; }
.look-dlg[open] { display: flex; flex-direction: column; }
.look-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.look-grip { display: none; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.look-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.look-head h2 { margin: 0; font-size: 18px; }
.look-body { overflow: auto; padding: 8px 16px 20px; }
.look-sec { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.look-sec:last-child { border-bottom: 0; }
.look-sec h3 { margin: 6px 0; font-size: 15px; }
.look-pile h4 { margin: 10px 0 4px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.look-stock { margin: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.look-fan { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.look-card { display: grid; justify-items: center; gap: 2px; }
.look-card .kc, .look-card .die { pointer-events: none; }
.look-card.top { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; padding: 2px; }
.look-card small { font-size: 11px; color: var(--gold); font-weight: 700; }
.look-list, .look-moves { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.look-moves { padding-left: 24px; }
.look-moves li { line-height: 1.35; }
.look-d { color: var(--text-2); }
.look-table { overflow-x: auto; }
.look-big { border-collapse: collapse; width: 100%; font-size: 15px; }
.look-big th, .look-big td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.look-big .num { text-align: right; }
.look-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.look-btn:hover { border-color: var(--gold); color: var(--text); }
.look-btn .ico { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .look-dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 82vh; }
  .look-grip { display: block; }
}
@media (prefers-reduced-motion: no-preference) { .look-dlg[open] { animation: look-in .18s ease-out; } @keyframes look-in { from { transform: translateY(24px); opacity: 0; } } }
/* Handy: oben ist wenig Platz – „Ansehen“ nur als Lupe, beim Raumcode entfällt das Wort davor */
@media (max-width: 640px) {
  #kg-nav-look span { display: none; }
  #kg-nav-look .ico { display: inline-block; opacity: 1; width: 20px; height: 20px; }
  #kg-nav-look { min-width: 44px; justify-content: center; }
  .top-left .code-label { display: none; }
}
@media (max-width: 420px) {
  .topbar { gap: 4px; padding: 6px 6px; }
  .nav-btn { padding: 6px 4px; font-size: 12px; }
  .top-left { gap: 4px; }
  .top-left .code-chip { padding: 6px 8px; }
  .top-left .code-chip b { letter-spacing: .06em; }
  .home-btn { min-width: 40px; min-height: 40px; }
}
/* Personal language setting, shared by login, hub and game preferences. */
.language-choice { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; }
.language-choice select { font: inherit; color: #f7f3e8; background: #1a2521; border: 1px solid #a99a76; border-radius: .5rem; padding: .35rem .5rem; min-height: 36px; }
.hub-top .language-choice > span { display: none; }
@media (max-width: 600px) { .hub-top .language-choice select { max-width: 78px; padding-inline: .15rem; } }

/* V2-16: optional host-only bot controls; no profile or login styling. */
.bot-controls .bot-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bot-controls select{min-height:44px;max-width:100%;padding:7px;border:1px solid var(--brass,#bc985b);border-radius:7px;background:var(--paper,#f2ead9);color:var(--ink,#252820)}.bot-add-level{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}.bot-difficulty-badge{display:inline-block;font:600 10px system-ui;padding:2px 5px;border-radius:5px;border:1px solid currentColor;margin-left:5px;white-space:nowrap;opacity:.9}
