/* Quatschkopf – Oberfläche. Das Zimmer und Rudi liegen auf dem Canvas, hier liegen nur HUD und Dialoge darüber. */
/* Latin + Latin-Ext getrennt (Google-Fonts-Schnitt): Latin-Ext bringt ş, İ, ğ für „Konuş İdris" */
@font-face { font-family: 'Baloo 2'; src: url('fonts/Baloo2.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; src: url('fonts/Baloo2-ext.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito-ext.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --kohle: #2B2521;
  --kohle-2: #4A4440;
  --creme: #F6F0DC;
  --weiss: #FFFDF7;
  --akzent: #FF9F45;
  --akzent-dunkel: #C4571F;
  --sonne: #FFE066;
  --gruen: #6CB84B;
  --rot: #E4572E;
  --blau: #4FD3EC;
  --wand: #FFD9A0;
  --radius: 22px;
  --rand: clamp(10px, 2.4vw, 20px);
  --luft: clamp(8px, 2.2vh, 22px);
  --schatten: 0 6px 0 rgba(43, 37, 33, .28);
  --schrift-display: 'Baloo 2', 'Trebuchet MS', sans-serif;
  --schrift-text: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* Pflicht: display:grid/flex an einer Klasse haengt sonst [hidden] aus (UA-Regel verliert gegen jede Klassenregel) */
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--schrift-text);
  font-weight: 700;
  color: var(--kohle);
  background: var(--wand);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea { -webkit-user-select: text !important; user-select: text !important; }
/* Zwei Ebenen: #welt = WebGL (Zimmer + Rudi), #buehne = 2D darüber (Partikel, Spiele, Eingaben) */
#welt { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#buehne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; background: transparent; }

#ui {
  position: fixed;
  pointer-events: none;
  top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); bottom: env(safe-area-inset-bottom, 0px); left: env(safe-area-inset-left, 0px);
}
.schirm { pointer-events: auto; }
.schirm--voll { position: absolute; inset: 0; display: flex; flex-direction: column; padding: var(--rand); }
.schirm--dialog {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: var(--rand);
  background: rgba(43, 37, 33, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.mono { font-family: var(--schrift-display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Knöpfe ---------- */
.knopf {
  font-family: var(--schrift-display);
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vh + .4rem, 1.4rem);
  line-height: 1.1;
  color: var(--kohle);
  background: var(--sonne);
  border: 3px solid var(--kohle);
  border-radius: 999px;
  padding: .45em 1.1em;
  min-height: 48px; min-width: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  cursor: pointer;
  box-shadow: var(--schatten);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  touch-action: manipulation;
}
.knopf:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(43, 37, 33, .28); }
.knopf:focus-visible { outline: 4px solid var(--weiss); outline-offset: 2px; }
.knopf[disabled] { opacity: .5; }
.knopf--gross { font-size: clamp(1.2rem, 3vh + .4rem, 1.7rem); padding: .5em 1.4em; flex-direction: column; gap: .1em; }
.knopf--gross small { font-family: var(--schrift-text); font-weight: 800; font-size: .55em; opacity: .75; }
.knopf--leise { background: var(--creme); }
.knopf--rund { width: 56px; height: 56px; padding: 0; border-radius: 50%; background: var(--creme); }
.knopf--rund svg { width: 28px; height: 28px; fill: currentColor; }
.knopf--sprache { background: var(--akzent); color: var(--weiss); }
.chip {
  font-family: var(--schrift-display); font-weight: 800; font-size: .95rem;
  background: var(--creme); color: var(--kohle);
  border: 2.5px solid var(--kohle); border-radius: 999px;
  padding: .35em .9em; min-height: 44px; min-width: 44px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
}
.chip.aktiv { background: var(--akzent); color: var(--weiss); }
.chip:focus-visible { outline: 4px solid var(--weiss); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; padding: var(--rand); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud__oben { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--luft); }
/* Die obere Zeile ist so breit wie der Schirm: nur ihre Knöpfe fangen Finger, dazwischen bleibt die Bühne antippbar
   (quer liegt dort das Zimmerfenster) */
.hud .hud__oben { pointer-events: none; }
.hud .hud__oben > * { pointer-events: auto; }
.hud__rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud__zeile { display: flex; align-items: center; gap: 8px; }
.knopf--klein { width: 44px; height: 44px; }
.knopf--klein svg { width: 22px; height: 22px; }
.bed { display: flex; gap: clamp(3px, 1.4vw, 6px); flex-wrap: nowrap; }
.bed__ring { flex: 0 0 auto; }
.bed__ring { position: relative; width: clamp(38px, 8.5vw, 52px); height: clamp(38px, 8.5vw, 52px); }
/* Ringe sind Knöpfe (antippen = passende Hilfe); unsichtbarer Rand vergrößert die Tippfläche auf ≥ 40 px */
button.bed__ring { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; color: inherit; }
button.bed__ring::after { content: ''; position: absolute; inset: -5px -2px; }
button.bed__ring:focus-visible { outline: 3px solid var(--weiss); outline-offset: 2px; border-radius: 50%; }
.bed__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bed__bahn { fill: rgba(43, 37, 33, .22); stroke: rgba(255, 253, 247, .5); stroke-width: 7; }
.bed__wert { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.bed__ico { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(14px, 3.4vw, 19px); }
.bed__ring--wenig .bed__ico { animation: wackel 1.6s ease-in-out infinite; }
@keyframes wackel { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.muenzen, .stufe {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--creme); border: 3px solid var(--kohle); border-radius: 999px;
  padding: 4px 12px; box-shadow: var(--schatten);
  font-family: var(--schrift-display); font-weight: 800; font-size: 1.05rem;
}
.stufe span { font-family: var(--schrift-text); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.ico-muenze { width: 20px; height: 20px; fill: var(--sonne); stroke: var(--kohle); stroke-width: 2; }
.ico-muenze__innen { fill: none; }

.hud__name {
  position: absolute; left: 50%; top: calc(var(--rand) + clamp(42px, 9.5vw, 58px)); transform: translateX(-50%);
  margin: 0; font-family: var(--schrift-display); font-weight: 800; font-size: 1.05rem; line-height: 1;
  padding: 5px 14px 6px; border-radius: 999px;
  background: var(--creme); border: 2px solid var(--kohle); box-shadow: 0 3px 0 rgba(43, 37, 33, .25);
  color: var(--kohle); white-space: nowrap;
  pointer-events: none;
}
.hud__mitte { position: absolute; left: 50%; bottom: calc(var(--rand) + 84px); transform: translateX(-50%); }

/* Signatur: Mikrofon-Knopf mit Pegelring */
.mikro {
  position: relative; width: clamp(88px, 22vw, 116px); height: clamp(88px, 22vw, 116px);
  border-radius: 50%; border: 4px solid var(--kohle);
  background: var(--akzent); color: var(--weiss);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 7px 0 rgba(43, 37, 33, .32);
  touch-action: manipulation;
}
.mikro:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(43, 37, 33, .32); }
.mikro:focus-visible { outline: 4px solid var(--weiss); outline-offset: 3px; }
.mikro__ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); }
.mikro__ring-bahn { fill: none; stroke: rgba(255, 253, 247, .35); stroke-width: 6; }
.mikro__ring-pegel { fill: none; stroke: var(--sonne); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 277; stroke-dashoffset: 277; }
.mikro__ico { width: 38%; height: 38%; fill: currentColor; margin-bottom: 14%; }
.mikro__text {
  position: absolute; bottom: 12%; font-family: var(--schrift-display); font-weight: 800;
  font-size: clamp(.8rem, 2.4vw, 1rem); letter-spacing: .02em;
}
.mikro--hoert { background: var(--rot); animation: pochen 1s ease-in-out infinite; }
.mikro--plappert { background: var(--gruen); }
@keyframes pochen { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.leiste {
  position: absolute; left: 50%; bottom: var(--rand); transform: translateX(-50%);
  display: flex; gap: clamp(6px, 2vw, 12px); align-items: center;
  background: rgba(246, 240, 220, .8); border: 3px solid var(--kohle); border-radius: 999px;
  padding: 7px clamp(8px, 2.5vw, 14px);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: var(--schatten);
  max-width: calc(100vw - 2 * var(--rand));
}
.leiste .knopf--rund { width: clamp(44px, 11vw, 54px); height: clamp(44px, 11vw, 54px); box-shadow: 0 4px 0 rgba(43, 37, 33, .24); }
.leiste .knopf--rund svg { width: 56%; height: 56%; }
/* Garten: eigene Leiste statt der Zimmer-Leiste (draussen.js schaltet #hud.hud--garten) */
#garten-leiste { display: none; }
.hud--garten #leiste { display: none; }
.hud--garten #garten-leiste { display: flex; }
.leiste--garten { background: rgba(214, 240, 196, .86); }
#btn-g-haus { background: var(--akzent); }

.hud__hinweis {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.7);
  font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1.1rem, 4.5vw, 1.8rem);
  color: var(--weiss); text-shadow: 0 3px 0 var(--kohle);
  background: rgba(43, 37, 33, .55); border-radius: 999px; padding: .25em 1em;
  opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none; white-space: nowrap;
}
.hud__hinweis.an { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hud__hinweis--schlecht { color: #FFD7C9; }
.hud__popups { position: fixed; inset: 0; pointer-events: none; }
.popup {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1rem, 3.4vw, 1.4rem);
  color: var(--weiss); text-shadow: 0 3px 0 var(--kohle);
  animation: hoch .95s ease-out forwards;
}
.popup--muenze { color: var(--sonne); }
.popup--schlecht { color: #FFB3A0; }
@keyframes hoch { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

.banner {
  position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%) rotate(-3deg) scale(.6);
  font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1.6rem, 7vw, 3rem);
  color: var(--sonne); text-shadow: 0 5px 0 var(--kohle);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s cubic-bezier(.2, 1.6, .5, 1);
  white-space: nowrap;
}
.banner.an { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
.toast {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%) translateY(10px);
  background: var(--creme); border: 3px solid var(--kohle); border-radius: 999px;
  padding: .4em 1.1em; font-weight: 800; box-shadow: var(--schatten);
  opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none; max-width: 86vw; text-align: center;
}
.toast.an { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Mini-Spiel-HUD ---------- */
.spiel-stand, .spiel-zeit {
  background: var(--creme); border: 3px solid var(--kohle); border-radius: 18px;
  padding: 4px 14px; box-shadow: var(--schatten);
  font-family: var(--schrift-display); font-weight: 800; display: flex; align-items: baseline; gap: 8px;
}
.spiel-stand b { font-size: 1.6rem; }
.spiel-stand span { font-family: var(--schrift-text); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.spiel-zeit { font-size: 1.4rem; }
.spiel-zeit--knapp { color: var(--rot); animation: pochen .6s ease-in-out infinite; }
.spiel-ansage {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%);
  margin: 0; font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1rem, 3.6vw, 1.5rem);
  color: var(--kohle); text-align: center; white-space: normal; width: max-content;
  padding: 6px 16px 7px; border-radius: 22px; max-width: calc(100vw - 2 * var(--rand));
  background: var(--creme); border: 3px solid var(--kohle); box-shadow: var(--schatten);
  pointer-events: none;            /* nur Text: Finger gehen durch aufs Spiel (Verstecken: Baum lag darunter) */
}
.spiel-ansage:empty { display: none; }

/* ---------- Dialoge ---------- */
.dialog {
  width: min(100%, 440px);
  max-height: calc(100dvh - 2 * var(--rand) - var(--sicher-hoehe));
  overflow-y: auto;
  background: var(--creme);
  border: 3px solid var(--kohle);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: clamp(14px, 3vh, 24px);
  display: flex; flex-direction: column; align-items: center; gap: var(--luft);
  text-align: center;
}
.dialog h2 { margin: 0; font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1.5rem, 5vh, 2.2rem); }
.dialog__text { margin: 0; font-size: .95rem; line-height: 1.45; }
.dialog__hinweis { margin: 0; font-size: .85rem; opacity: .75; }
.ergebnis__kopf { margin: 0; font-size: .9rem; color: var(--kohle-2); }
.ergebnis__text { margin: 0; font-size: 1rem; }
.ergebnis__werte { display: flex; gap: var(--luft); margin: 0; justify-content: center; }
.ergebnis__werte div { display: flex; flex-direction: column; align-items: center; }
.ergebnis__werte dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.ergebnis__werte dd { margin: 0; font-family: var(--schrift-display); font-weight: 800; font-size: 1.6rem; }

.anleitung { width: min(100%, 560px); text-align: left; }
.anleitung__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.anleitung__liste li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.anleitung__liste svg { width: 42px; height: 42px; fill: var(--kohle); }
.anleitung__liste div { font-size: .92rem; line-height: 1.45; }
.anleitung__liste b { font-family: var(--schrift-display); font-weight: 800; }

/* ---------- Tafel (Shop, Einstellungen, Lobby) ---------- */
.tafel { padding: 0; background: rgba(43, 37, 33, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tafel__kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--luft); padding: var(--rand) var(--rand) calc(var(--luft) * .6); }
.tafel__kopf h2 { margin: 0; font-family: var(--schrift-display); font-weight: 800; font-size: clamp(1.4rem, 4.5vh, 2rem); color: var(--weiss); text-shadow: 0 3px 0 var(--kohle); }
.tafel__platz { width: 56px; }
.tafel__inhalt { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--rand) var(--rand); }
.reiter { display: flex; justify-content: center; gap: 8px; padding: 0 var(--rand) var(--luft); flex-wrap: wrap; }
.reiter__knopf {
  font-family: var(--schrift-display); font-weight: 800; font-size: 1rem;
  background: var(--creme); color: var(--kohle); border: 3px solid var(--kohle);
  border-radius: 999px; padding: .3em 1em; min-height: 44px; cursor: pointer;
}
.reiter__knopf.aktiv { background: var(--akzent); color: var(--weiss); }

.shopraster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.8vw, 14px); max-width: 620px; margin: 0 auto; }
.ware {
  background: var(--creme); border: 3px solid var(--kohle); border-radius: 16px;
  padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; box-shadow: var(--schatten); font-family: var(--schrift-text); font-weight: 800;
  min-height: 44px;
}
.ware img { width: 100%; aspect-ratio: 16 / 11; object-fit: contain; }
.ware__farbe { width: 100%; aspect-ratio: 16 / 11; border-radius: 10px; border: 2px solid var(--kohle); }
.ware__name { font-size: .8rem; text-align: center; }
.ware__preis { display: inline-flex; align-items: center; gap: 4px; font-family: var(--schrift-display); font-weight: 800; font-size: .9rem; }
.ware__preis svg { width: 16px; height: 16px; fill: var(--sonne); stroke: var(--kohle); stroke-width: 2; }
.ware--aktiv { outline: 4px solid var(--akzent); outline-offset: -4px; }
.ware--gesperrt { opacity: .62; }

.vorrat { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; }
.vorrat__titel { grid-column: 1 / -1; margin: 4px 0 -2px; font-family: var(--schrift-display); font-size: 1rem; text-align: left; }
.vorrat__teil span { font-size: .75rem; font-weight: 800; }
.vorrat__teil { background: var(--weiss); border: 3px solid var(--kohle); border-radius: 16px; padding: 4px 3px 5px; min-width: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--schatten); min-height: 44px; }
.vorrat__teil img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.vorrat__teil b { font-family: var(--schrift-display); font-size: clamp(.66rem, 2.7vw, .85rem); line-height: 1.1; text-align: center; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.vorrat__teil[disabled] { opacity: .45; }
/* Spielauswahl als Raster (6 Spiele: hochkant 2 × 3, quer 3 × 2 – immer voll) */
.spielwahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.spielwahl button { flex-direction: column; justify-content: center; gap: 2px; width: 100%; min-height: 76px; text-align: center; line-height: 1.1;
  hyphens: auto; overflow-wrap: break-word; white-space: normal; background: var(--spielfarbe, var(--sonne));
  padding: .45em .5em; font-size: clamp(1rem, 2.2vh + .35rem, 1.35rem); }
.spielwahl small { font-family: var(--schrift-text); font-weight: 800; font-size: .75rem; opacity: .7; }

.einst { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--luft); align-items: center; color: var(--weiss); text-align: center; }
.einst__feld { display: flex; flex-direction: column; gap: 6px; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); width: min(100%, 300px); }
.einst__feld input, .lobby__name input, .lobby__beitreten input {
  font-family: var(--schrift-display); font-weight: 800; font-size: 1.15rem; color: var(--kohle);
  background: var(--creme); border: 3px solid var(--kohle); border-radius: 999px;
  padding: .35em .9em; min-height: 46px; text-align: center; box-shadow: var(--schatten);
}
.einst__label, .lobby__label { margin: 0; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); }
.rechtliches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
/* Tap-Ziele: bei box-sizing: border-box muss die Klaeche selbst 40 px hoch sein, Padding allein reicht nicht */
.rechtliches a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; }
.textlink { color: var(--weiss); font-weight: 800; text-shadow: 0 2px 0 var(--kohle); }
.textlink:focus-visible { outline: 4px solid var(--weiss); outline-offset: 2px; border-radius: 8px; }
.credit { margin: 0; font-size: .75rem; opacity: .6; color: var(--weiss); text-shadow: 0 2px 0 var(--kohle); }

/* ---------- Lobby ---------- */
.lobby-schirm .tafel__inhalt { overscroll-behavior: contain; }
.lobby { max-width: 520px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: var(--luft); align-items: center; color: var(--weiss); text-align: center; padding-bottom: var(--luft); }
.lobby__wahl, .lobby__raum { display: flex; flex-direction: column; gap: var(--luft); align-items: center; width: 100%; }
.lobby__name { display: flex; flex-direction: column; gap: 6px; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); width: min(100%, 300px); }
.lobby__beitreten { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; }
.lobby__beitreten label { width: 100%; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); }
.lobby__beitreten input { width: 130px; letter-spacing: .25em; text-transform: uppercase; }
.lobby__oder { font-family: var(--schrift-display); letter-spacing: .1em; text-shadow: 0 2px 0 var(--kohle); }
.lobby__tipp { margin: 0; font-size: .9rem; font-weight: 700; text-shadow: 0 2px 0 var(--kohle); max-width: 440px; }
.lobby__code { margin: 0; font-family: var(--schrift-display); font-size: clamp(2.6rem, 11vw, 4.4rem); letter-spacing: .25em; color: var(--sonne); text-shadow: 0 4px 0 var(--kohle); background: rgba(43, 37, 33, .55); border: 3px solid var(--kohle); border-radius: 18px; padding: .1em .4em .1em .65em; }
.lobby__status { margin: 0; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); min-height: 1.4em; }
.lobby__status--fehler { color: #FFB3B3; }
.lobby__spieler { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.lobby__spieler li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--creme); color: var(--kohle); border: 3px solid var(--kohle); border-radius: 14px; padding: 4px 14px 4px 8px; font-weight: 800; text-align: left; min-height: 44px; }
.lobby__spieler li b { font-family: var(--schrift-display); font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby__spieler li i { font-style: normal; color: #2FA84A; font-size: .85rem; }
.lobby__spieler li .lobby__tier img { display: block; width: 40px; height: 32px; object-fit: contain; }
.lobby__spieler li.lobby__ich { outline: 3px solid var(--akzent); outline-offset: -3px; }
.lobby__spieler li.lobby__frei { opacity: .55; background: transparent; color: var(--weiss); border-style: dashed; }
.lobby__info { margin: 0; font-weight: 800; text-shadow: 0 2px 0 var(--kohle); }

.einricht__text {
  position: absolute; left: 50%; top: calc(var(--rand) + 4px); transform: translateX(-50%);
  margin: 0; padding: 8px 16px; border-radius: 999px; max-width: calc(100vw - 2 * var(--rand));
  background: var(--creme); border: 3px solid var(--kohle); box-shadow: var(--schatten);
  font-family: var(--schrift-display); font-weight: 800; text-align: center;
}
.einricht__fertig { position: absolute; left: 50%; bottom: var(--rand); transform: translateX(-50%); }

/* ---------- Schmale Handys: oben wird es sonst zweizeilig ---------- */
@media (max-width: 380px) {
  .bed__ring { width: 32px; height: 32px; }
  .bed__ico { font-size: 15px; }
  .muenzen { font-size: .95rem; padding: 4px 10px; }
  .stufe { font-size: .78rem; padding: 3px 9px; }
}
@media (max-width: 340px) {
  .bed__ring { width: 29px; height: 29px; }
  .bed__ico { font-size: 13px; }
}

/* ---------- Querformat: Leiste an die rechte Seite ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  .leiste { left: auto; right: var(--rand); bottom: 50%; transform: translateY(50%); flex-direction: column; max-width: none; max-height: calc(100dvh - 2 * var(--rand) - var(--sicher-hoehe)); gap: 6px; }
  .leiste .knopf--rund { width: 44px; height: 44px; }
  .spielwahl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spielwahl button { min-height: 64px; }
  /* Münzen/Stufe links neben der senkrechten Leiste, sonst liegen sie darunter */
  .hud__oben { padding-right: 96px; }
  .hud__mitte { left: auto; right: calc(var(--rand) + clamp(78px, 13vw, 104px)); bottom: var(--rand); transform: none; }
  /* Name neben die Bedarfs-Ringe, sonst steht er dem Tier im Gesicht */
  .hud__name { left: var(--rand); top: calc(var(--rand) + clamp(42px, 9.5vw, 58px)); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .knopf, .hud__hinweis, .banner, .toast, .bed__wert { transition: none; }
  .popup { animation-duration: .01s; }
  .mikro--hoert, .spiel-zeit--knapp, .bed__ring--wenig .bed__ico { animation: none; }
}

/* Namens-Dialog */
.namensdialog { gap: 14px; }
.namensdialog .chips { justify-content: center; }
.namensdialog input { text-align: center; font-size: 1.25rem; }

/* Deine Tiere (Einstellungen) – zwei Karten nebeneinander, gesperrte mit Fortschrittsbalken */
.tierwahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }   /* 8 Tiere = 4 × 2 (Raster voll) */
.tierkarte { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px; min-width: 0;
  background: var(--creme); color: var(--kohle); border: 3px solid var(--kohle); border-radius: 16px; box-shadow: 0 4px 0 rgba(43, 37, 33, .25);
  font: inherit; cursor: pointer; min-height: 44px; }
.tierkarte img { width: 100%; max-width: 150px; aspect-ratio: 160 / 110; object-fit: contain; }
.tierkarte b { font-family: var(--schrift-display); font-size: 1rem; line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.tierkarte__status { font-size: .72rem; font-weight: 800; opacity: .75; line-height: 1.15; text-align: center; hyphens: auto; overflow-wrap: break-word; }
.tierkarte--aktiv { outline: 4px solid var(--akzent); outline-offset: -4px; }
.tierkarte--gesperrt { cursor: default; }
.tierkarte--gesperrt img { filter: grayscale(1) brightness(.55); }
.tierkarte__schloss { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-size: 1.8rem; }
.tierkarte__balken { width: 80%; height: 8px; border-radius: 99px; background: rgba(43, 37, 33, .15); overflow: hidden; }
.tierkarte__balken i { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.tierkarte:focus-visible { outline: 3px solid var(--kohle); outline-offset: 2px; }

/* Stimm-Schild unter dem Mikrofon: antippen wechselt die Stimme reihum */
.stimmschild { display: block; margin: 8px auto 0; min-height: 40px; min-width: 96px; padding: 6px 14px;
  font: 800 .9rem var(--schrift-display); color: var(--kohle); background: var(--creme);
  border: 3px solid var(--kohle); border-radius: 999px; box-shadow: 0 3px 0 rgba(43, 37, 33, .25); cursor: pointer; }
.stimmschild::after { content: ' ▾'; }
.stimmschild:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
@media (orientation: landscape) and (max-height: 560px) { .stimmschild { margin-top: 4px; } }

/* Eigene Wörter */
.woerter__text { margin: 0; text-align: center; font-weight: 700; }
.woerter { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.wort { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px;
  background: var(--creme); color: var(--kohle); border: 3px solid var(--kohle); border-radius: 14px; padding: 4px 6px 4px 12px; }
.wort b { font-family: var(--schrift-display); font-size: 1.05rem; grid-column: 1; }
.wort__art { grid-column: 1; grid-row: 2; font-size: .75rem; opacity: .7; margin-top: -4px; }
.wort .wort__knopf { grid-row: 1 / span 2; width: 44px; height: 44px; }
.wort .wort__knopf svg { width: 20px; height: 20px; fill: currentColor; }
.wort--aufnehmen { color: #D94F4F; }
.wort--aufnehmen.nimmt { background: #D94F4F; color: var(--weiss); animation: puls 1s ease-in-out infinite; }
.wort--eigen { outline: 3px solid var(--akzent); outline-offset: -3px; }
@keyframes puls { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .wort--aufnehmen.nimmt { animation: none; } }

/* iPhone als Homescreen-App (Statusleiste „black-translucent", viewport-fit=cover): Der Sicherheitsabstand ist die
   LAGE von #ui, kein Padding – die Bildschirme darin sind absolut (inset: 0) und ignorieren Padding; sonst lag das
   Menü unter Uhrzeit und WLAN. Abgedunkelte Ebenen reichen per Rand-Schatten trotzdem bis unter die Statusleiste. */
/* Höhe, die Statusleiste + Home-Balken wegnehmen (Maße in dvh zählen sonst die ganze Bildschirmhöhe) */
:root { --sicher-hoehe: calc(env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)); }
:root { --sicher-rand: max(env(safe-area-inset-top, 0px), env(safe-area-inset-right, 0px), env(safe-area-inset-bottom, 0px), env(safe-area-inset-left, 0px)); }
.schirm--dialog { box-shadow: 0 0 0 var(--sicher-rand) rgba(43, 37, 33, .45); }
.tafel { box-shadow: 0 0 0 var(--sicher-rand) rgba(43, 37, 33, .55); }
