/* Galgenfrist – Prärie zur Mittagszeit, nachts unterm Mond.
   Holzletter (Holtwood One SC) für Wort, Tasten und Überschriften, Zilla Slab für alles andere. */

@font-face { font-family: 'Holtwood'; src: url('../fonts/holtwood/holtwood-one-sc-latin-400-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+201C-201E; }
@font-face { font-family: 'Holtwood'; src: url('../fonts/holtwood/holtwood-one-sc-latin-ext-400-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-024F, U+1E9E; }
@font-face { font-family: 'Zilla'; src: url('../fonts/zilla/zilla-slab-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Zilla'; src: url('../fonts/zilla/zilla-slab-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Zilla'; src: url('../fonts/zilla/zilla-slab-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Zilla'; src: url('../fonts/zilla/zilla-slab-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --sand: #e7c99b;
  --sand-2: #dbb984;
  --paper: #f4e7c8;
  --ink: #2b1b10;
  --ink-soft: #6a5038;
  --wood: #8a5a33;
  --wood-light: #c58f58;
  --wood-dark: #4e301b;
  --rust: #a3311c;
  --brass: #d6a12a;
  --sage: #557f40;
  --ground: #d9ae6f;
  --ground-line: #c4925a;
  --mesa: #c27a4f;
  --cactus: #5d7a45;
  --line: rgba(43, 27, 16, .22);
  --slot: var(--wood-dark);
  --shadow: 0 2px 0 var(--wood-dark);
  --display: 'Holtwood', 'Rockwell', 'Georgia', serif;
  --text: 'Zilla', 'Rockwell', 'Georgia', serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --sand: #211912;
  --sand-2: #2c2118;
  --paper: #33271c;
  --ink: #f1e3c6;
  --ink-soft: #bba383;
  --wood: #7b4f2c;
  --wood-light: #a8784a;
  --wood-dark: #160d07;
  --rust: #e36a45;
  --brass: #e8b84a;
  --sage: #8fbb6c;
  --ground: #3a2a1d;
  --ground-line: #4a3624;
  --mesa: #2a1d1f;
  --cactus: #24301e;
  --line: rgba(241, 227, 198, .2);
  --slot: #9a7650;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 18px/1.45 var(--text);
  min-height: 100dvh;
}
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
a { color: inherit; }

.h2 { font: 400 1.35rem/1.15 var(--display); margin: 0 0 .6rem; letter-spacing: .01em; }

/* ---------- Knöpfe: Holzbretter ---------- */
.btn {
  appearance: none;
  border: 2px solid var(--wood-dark);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  padding: .55rem 1.1rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { background: color-mix(in srgb, var(--paper) 80%, var(--wood-light)); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--wood-dark); }
.btn-main {
  background: var(--wood);
  color: #fbeed3;
  font: 400 1rem/1.2 var(--display);
  letter-spacing: .02em;
  padding: .7rem 1.3rem;
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,.07) 22px 23px);
}
.btn-main:hover { background-color: color-mix(in srgb, var(--wood) 88%, #000); }
.btn-quiet { background: transparent; box-shadow: none; border-color: var(--line); font-weight: 400; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-soft); }
.link:hover { color: var(--ink); }

input:not([type="radio"]):not([type="checkbox"]), textarea {
  width: 100%;
  background: var(--paper);
  border: 2px solid var(--wood-dark);
  border-radius: 6px;
  padding: .55rem .7rem;
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .7; }

/* ---------- Startseite ---------- */
.vista { position: relative; height: min(52vh, 460px); min-height: 280px; overflow: hidden; border-bottom: 3px solid var(--wood-dark); }
.vista svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.masthead { position: absolute; left: 0; right: 0; top: 0; padding: clamp(18px, 4vw, 44px) clamp(16px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }
.logo {
  margin: 0;
  font: 400 clamp(2.2rem, 7vw, 5rem)/.95 var(--display);
  color: var(--ink);
  letter-spacing: .02em;
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--paper) 70%, transparent);
}
:root[data-theme="dark"] .logo { text-shadow: 3px 3px 0 #000; }
.logo .slot { display: inline-block; min-width: .62em; text-align: center; position: relative; }
.logo .slot::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: -.08em; height: .07em; background: var(--ink); opacity: .55; }
.logo .slot.blank { color: transparent; text-shadow: none; }
.logo .slot.drop { animation: drop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes drop { from { transform: translateY(-.35em); opacity: 0; } }
.tagline { margin: .9rem 0 0; max-width: 30ch; font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-style: italic; }

.front {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(24px, 5vw, 72px);
  max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 64px) 48px;
}
.block { margin-bottom: 28px; }
.field { display: block; }
.field-label { display: block; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.inks { border: 0; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.inks legend { margin-bottom: .35rem; }
.ink { position: relative; cursor: pointer; }
.ink input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ink i {
  display: block; width: 34px; height: 28px;
  background: var(--c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .1s;
}
.ink input:checked + i { transform: translateY(-4px); filter: drop-shadow(0 4px 0 var(--ink)); }
.ink input:focus-visible + i { outline: 3px solid var(--brass); outline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.join { display: flex; gap: 8px; }
.code-input { width: 6.5em !important; text-transform: uppercase; font-family: var(--display) !important; letter-spacing: .12em; }

.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.room-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--wood-dark); }
.room-list li { border-bottom: 1px solid var(--line); }
.room-list .empty { padding: .8rem 0; color: var(--ink-soft); font-style: italic; }
.room-btn {
  appearance: none; border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 5.2em 1fr auto; gap: 12px; align-items: center; padding: .7rem .2rem;
}
.room-btn:hover { background: var(--sand-2); }
.room-btn b { font: 400 1rem var(--display); letter-spacing: .08em; }
.room-btn small { color: var(--ink-soft); }
.room-btn .fill { font-weight: 600; }

.howto { border-top: 2px solid var(--wood-dark); padding-top: .7rem; margin-bottom: 24px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto ul { margin: .6rem 0 0; padding-left: 1.1rem; max-width: 62ch; }
.howto li { margin-bottom: .45rem; }
.foot { display: flex; gap: 22px; }

/* ---------- Szene (SVG) ---------- */
.scene { overflow: visible; }
.scene .sky { fill: #a9d4d1; transition: fill 1.6s ease; }
:root[data-theme="dark"] .scene .sky { fill: #25344f; }
.scene .sun { transition: transform 1.6s cubic-bezier(.4, 0, .2, 1); }
.scene .sun-disc { fill: #fbe39a; }
.scene .sun-glow { fill: #fbe39a; opacity: .28; }
.scene .moon-craters { display: none; fill: #d7cba8; }
:root[data-theme="dark"] .scene .sun-disc { fill: #efe5c8; }
:root[data-theme="dark"] .scene .sun-glow { fill: #efe5c8; opacity: .1; }
:root[data-theme="dark"] .scene .moon-craters { display: block; }
.scene .stars { fill: #fff6dc; transition: opacity 1.6s; }
.scene .mesa { fill: var(--mesa); }
.scene .ground { fill: var(--ground); }
.scene .dune { fill: none; stroke: var(--ground-line); stroke-width: 2; stroke-linecap: round; }
.scene .cactus { fill: var(--cactus); }
.scene .shade { fill: #2a0f1c; pointer-events: none; transition: opacity 1.6s; }
.scene .beam { fill: var(--wood); stroke: var(--wood-dark); stroke-width: 2; }
.scene .plank-lines { stroke: var(--wood-dark); stroke-width: 1.5; }
.scene .stroke, .scene .noose, .scene .head { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .scene .stroke, :root[data-theme="dark"] .scene .noose, :root[data-theme="dark"] .scene .head { stroke: #f1e3c6; }
.scene .rope .stroke, .scene .noose { stroke: #b88a45; stroke-width: 3; }
.scene .face .stroke { stroke: var(--rust); stroke-width: 2.4; }
.scene .hat { fill: var(--wood-dark); }
:root[data-theme="dark"] .scene .hat { fill: #6b4a2c; }

.scene .part { opacity: 0; transition: opacity .25s; }
.scene .part.on { opacity: 1; }
.scene .wood { transform: translateY(-14px); transition: opacity .2s, transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.scene .wood.on { transform: none; }
.scene .part .stroke, .scene .part .noose, .scene .part .head { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s ease-out; }
.scene .part.on .stroke, .scene .part.on .noose, .scene .part.on .head { stroke-dashoffset: 0; }
.scene .hat { opacity: 0; transition: opacity .3s .4s; }
.scene .part.on .hat { opacity: 1; }
.scene.instant * { transition: none !important; }

/* ---------- Spiel ---------- */
.play { min-height: 100dvh; display: flex; flex-direction: column; }
.bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px clamp(12px, 3vw, 28px);
  border-bottom: 3px solid var(--wood-dark);
  background: var(--sand-2);
}
.chip {
  appearance: none; border: 2px solid var(--wood-dark); background: var(--paper); border-radius: 6px;
  padding: .3rem .7rem; cursor: pointer; font-weight: 600; font-size: .95rem;
}
.chip:hover { background: var(--sand); }
.chip-code b { font: 400 .95rem var(--display); letter-spacing: .1em; margin-left: .3em; }
.bar-info { margin: 0 0 0 auto; font-weight: 600; }

.table {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0;
  width: 100%; max-width: 1280px; margin: 0 auto;
}
.main { display: flex; flex-direction: column; min-width: 0; padding: 18px clamp(12px, 3vw, 28px) 24px; gap: 14px; }
.side { border-left: 2px solid var(--line); padding: 18px 20px; }

.stage { position: relative; border: 3px solid var(--wood-dark); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 8; max-height: 40vh; width: 100%; background: var(--ground); }
.stage svg { display: block; width: 100%; height: 100%; }
.errors {
  position: absolute; left: 10px; bottom: 8px; margin: 0;
  background: var(--paper); border: 2px solid var(--wood-dark); border-radius: 5px; padding: .1rem .5rem;
  font-weight: 600; font-size: .9rem;
}
.errors:empty { display: none; }
.stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  font: 400 clamp(1.6rem, 5vw, 2.8rem)/1 var(--display); padding: .3em .6em;
  border: 5px double currentColor; border-radius: 6px; background: color-mix(in srgb, var(--paper) 85%, transparent);
  animation: stamp .35s cubic-bezier(.3, 1.6, .5, 1);
  white-space: nowrap;
}
.stamp.saved { color: var(--sage); }
.stamp.hanged { color: var(--rust); }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-8deg) scale(1.8); opacity: 0; } }

.panel { display: flex; flex-direction: column; gap: 12px; }
.lead { margin: 0; max-width: 60ch; }
.setup { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

.cat { margin: 0; color: var(--ink-soft); font-style: italic; text-align: center; min-height: 1.45em; }
.word {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem 1.4rem;
  font: 400 clamp(1.5rem, 5.2vw, 2.6rem)/1 var(--display);
}
.word .w { display: flex; gap: .16em; }
.word .l {
  width: .92em; height: 1.25em; display: grid; place-items: center;
  border-bottom: .12em solid var(--slot);
}
.word .l.sep { border-bottom-color: transparent; width: .5em; }
.word .l.new { animation: drop .35s cubic-bezier(.3, 1.6, .5, 1); }
.word .l.late { color: var(--rust); }
.word.small { font-size: clamp(1.1rem, 3.6vw, 1.9rem); gap: .7rem 1rem; }
.wrong { margin: 0; text-align: center; min-height: 1.45em; color: var(--rust); letter-spacing: .14em; font-weight: 600; }
.wrong:empty::before { content: '\00a0'; }

.turn { display: grid; gap: 6px; justify-items: center; }
.status { margin: 0; font-weight: 600; text-align: center; min-height: 1.45em; }
.status.mine { color: var(--sage); }
.fuse { position: relative; height: 4px; width: min(420px, 100%); background: var(--line); border-radius: 2px; }
.fuse i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #b88a45; border-radius: 2px; transform-origin: left; }
.fuse i::after {
  content: ''; position: absolute; right: -5px; top: -4px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle, #fff3b0 0 30%, #f0a030 40% 60%, transparent 70%);
  animation: spark .25s infinite alternate;
}
.fuse.idle { visibility: hidden; }
.fuse.low i { background: var(--rust); }
@keyframes spark { to { transform: scale(1.35); } }

.keys { display: flex; flex-direction: column; gap: 7px; align-items: center; user-select: none; -webkit-user-select: none; }
.keys .krow { display: flex; gap: 6px; justify-content: center; width: 100%; }
.key {
  appearance: none; flex: 0 1 48px; min-width: 0; height: 52px; padding: 0;
  border: 2px solid var(--wood-dark); border-radius: 6px;
  background: var(--wood-light);
  background-image: linear-gradient(180deg, rgba(255,255,255,.18), transparent 40%), repeating-linear-gradient(90deg, transparent 0 9px, rgba(78,48,27,.12) 9px 10px);
  color: var(--wood-dark);
  font: 400 1.15rem/1 var(--display);
  box-shadow: 0 3px 0 var(--wood-dark);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .06s, box-shadow .06s;
}
.key:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--wood-dark); }
.key.hit { background: var(--sage); color: #fbf3df; box-shadow: none; transform: translateY(3px); }
.key.miss { background: #3b2a20; color: #b39c82; box-shadow: none; transform: translateY(3px); text-decoration: line-through var(--rust) 2px; }
:root[data-theme="dark"] .key.miss { background: #0f0a06; }
.keys.locked .key:not(.hit):not(.miss) { opacity: .55; cursor: default; }
.key:disabled { cursor: default; }

.solve { display: flex; gap: 8px; max-width: 480px; width: 100%; margin: 4px auto 0; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.option {
  appearance: none; border: 2px solid var(--wood-dark); border-radius: 6px; background: var(--paper);
  padding: .8rem; cursor: pointer; text-align: left; box-shadow: var(--shadow);
}
.option b { display: block; font: 400 1.05rem/1.2 var(--display); }
.option small { color: var(--ink-soft); }
.option:hover { background: var(--sand-2); }
.own { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.own .field { flex: 1; }

/* Steckbrief */
.poster {
  align-self: center; width: min(360px, 100%); text-align: center;
  background: var(--paper); border: 2px solid var(--wood-dark); padding: 22px 20px 26px;
  box-shadow: 6px 6px 0 var(--wood-dark); transform: rotate(-1.5deg);
  position: relative;
}
.poster::before, .poster::after { content: ''; position: absolute; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--wood-dark); }
.poster::before { left: 10px; } .poster::after { right: 10px; }
.poster p { margin: 0; }
.poster-head { font: 400 2.6rem/1 var(--display); letter-spacing: .06em; }
.poster-sub { font-style: italic; color: var(--ink-soft); margin-top: .2rem !important; }
.poster-name { font: 400 1.8rem/1.1 var(--display); margin: 1rem 0 .6rem !important; padding: .5rem 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow-wrap: anywhere; }
.poster-reward { font-weight: 700; font-size: 1.2rem; }
.ranking { margin: 8px auto 0; padding: 0; list-style: none; width: min(420px, 100%); counter-reset: r; }
.ranking li { display: grid; grid-template-columns: 2em 1.6em 1fr auto; gap: 8px; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); counter-increment: r; }
.ranking li::before { content: counter(r) '.'; font-weight: 700; }
.ranking em { font-style: normal; font-weight: 700; }
.ranking li.me span { font-weight: 700; }
#p-end .row { justify-content: center; }
#p-end .lead { text-align: center; margin: 0 auto; }

/* Seitenleiste */
.side-title { font: 400 1rem var(--display); margin: 0 0 .5rem; }
.side-log { margin-top: 1.4rem; }
.players { list-style: none; margin: 0; padding: 0; }
.players li {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center;
  padding: .45rem .3rem; border-bottom: 1px solid var(--line); position: relative;
}
.players li.turn { background: color-mix(in srgb, var(--brass) 26%, transparent); }
.players li.off { opacity: .5; }
.players .scarf { width: 22px; height: 16px; background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.players .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .nm small { color: var(--ink-soft); margin-left: .3em; font-style: italic; }
.players .pts { font: 400 1rem var(--display); }
.players .gain { color: var(--sage); font-weight: 700; font-size: .85rem; margin-right: .3em; }
.players .badge { display: inline-block; width: .95em; height: .95em; vertical-align: -.1em; margin-left: .25em; background: var(--brass); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

.log { list-style: none; margin: 0; padding: 0; font-size: .95rem; display: flex; flex-direction: column-reverse; }
.log li { padding: .2rem 0; border-bottom: 1px dotted var(--line); }
.log b { font-weight: 600; }
.log .hit { color: var(--sage); }
.log .miss { color: var(--rust); }
.log .k { font-family: var(--display); }

/* Overlay / Einstellungen */
.overlay { position: fixed; inset: 0; background: rgba(30, 16, 8, .55); display: grid; place-items: center; padding: 16px; z-index: 20; overflow-y: auto; }
.card { background: var(--sand); border: 3px solid var(--wood-dark); border-radius: 10px; padding: 22px; width: min(720px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.card-sub { margin: 0 0 14px; color: var(--ink-soft); }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.set { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.set > span, .set legend { font-weight: 600; padding: 0; }
.set small { color: var(--ink-soft); font-weight: 400; }
.set.wide, .set.cats { grid-column: 1 / -1; }
.seg { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.seg legend { width: 100%; margin-bottom: 6px; }
.seg label, .cats label { position: relative; cursor: pointer; }
.seg input, .cats input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span, .cats span { display: block; padding: .3rem .65rem; border: 2px solid var(--wood-dark); border-radius: 6px; background: var(--paper); font-size: .95rem; }
.seg input:checked + span, .cats input:checked + span { background: var(--wood); color: #fbeed3; }
.seg input:focus-visible + span, .cats input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.seg input:disabled + span, .cats input:disabled + span { opacity: .7; cursor: default; }
.cats { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.cats legend { width: 100%; margin-bottom: 6px; }
.cats small { margin-left: .25em; opacity: .75; }
.cats input:checked + span small { color: inherit; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--wood); }
.note { color: var(--ink-soft); font-size: .92rem; margin: 14px 0; }
.members { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.members li { display: flex; align-items: center; gap: 6px; border: 2px solid var(--line); border-radius: 6px; padding: .15rem .5rem; }
.members li.off { opacity: .55; }
.members i { width: 16px; height: 12px; background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.members small { color: var(--ink-soft); }
.members button { appearance: none; border: 0; background: none; cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--rust); padding: 0 0 0 4px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.card-actions #btn-stop { margin-right: auto; }

.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 40; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--paper); border: 2px solid var(--wood-dark); border-radius: 6px; padding: .55rem .9rem; box-shadow: var(--shadow); font-weight: 600; animation: drop .25s ease-out; }
.toast.error { border-color: var(--rust); color: var(--rust); }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
  .table { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { border-left: 0; border-top: 2px solid var(--line); order: -1; padding: 8px 12px 0; }
  .side-title, .log, .side-log { display: none; }
  .players { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
  .players li { border: 2px solid var(--line); border-radius: 6px; grid-template-columns: 16px auto auto; padding: .2rem .5rem; white-space: nowrap; flex: 0 0 auto; }
  .players li.turn { border-color: var(--brass); }
  .players .scarf { width: 16px; height: 12px; }
  .players .nm small { font-size: 0; margin: 0; }
  .players .nm small .hk { font-size: .8rem; margin-left: .3em; }
  .main { padding-top: 10px; gap: 10px; }
  .stage { aspect-ratio: auto; height: 27vh; min-height: 150px; max-height: none; }
}
@media (max-width: 700px) {
  body { font-size: 17px; }
  .front { grid-template-columns: 1fr; padding-top: 24px; }
  .vista { height: 40vh; min-height: 250px; }
  .bar { gap: 6px; padding: 8px 10px; }
  .chip { font-size: .88rem; padding: .25rem .55rem; }
  .bar-info { width: 100%; margin: 2px 0 0; font-size: .95rem; }
  .keys { gap: 6px; }
  .keys .krow { gap: 4px; }
  .key { height: 48px; font-size: 1rem; border-radius: 5px; }
  .set-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .own { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Spielerpass (Anmeldung für alle Spiele) ---------- */
.account { display: flex; align-items: center; gap: .75rem; margin-bottom: 18px; padding: 10px 14px; background: var(--paper); border: 2px solid var(--wood-dark); border-radius: 4px; box-shadow: var(--shadow); }
.account img { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--wood-dark); background: var(--sand); }
.account small { display: block; margin-top: .1rem; color: var(--ink-soft); font-size: .9rem; }
.account b { font-weight: 700; }

/* Minigame-Maniac: Rückweg zur Party */
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
