/* Markero: alles spielt an einem Whiteboard. Wand, Brett mit Aluminiumrahmen, Ablage, Haftzettel, Magnete.
   Hochformat zuerst. Oben rechts bleibt Platz für das rote X von anyplay (--x-breite, --x-hoehe, gemessen in basis.js). */
@font-face { font-family: 'Patrick Hand'; src: url('../assets/fonts/PatrickHand.woff2?v=edc66eca') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../assets/fonts/Nunito.woff2?v=edc66eca') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --wand: #cfe3dc; --wand2: #b7d3cb;
  --brett: #fafbf9; --alu: #c4cbd1; --alu-hell: #e9edf0; --alu-dunkel: #8e979f;
  --tinte: #1f2a33; --blau: #2f6fe0; --gruen: #1f9d55; --rot: #e23b3b; --gelb: #ffe27a;
  --grau: #6b7783;
  --x-breite: 0px; --x-hoehe: 0px;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  font: 600 16px/1.3 Nunito, system-ui, sans-serif; color: var(--tinte);
  background: linear-gradient(180deg, var(--wand) 0%, var(--wand2) 100%);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.hand { font-family: 'Patrick Hand', 'Marker Felt', cursive; font-weight: 400; letter-spacing: .01em; }
.klein { font-size: 13px; color: var(--grau); font-weight: 700; }
.gross { font-size: 30px; line-height: 1.05; }
h2 { font: 400 28px/1.1 'Patrick Hand', cursive; margin: 0 0 4px; }
p { margin: 0; }
.ic { display: inline-flex; width: 24px; height: 24px; flex: none; }
.ic svg { width: 100%; height: 100%; fill: currentColor; }
.ic svg .l { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ic svg .l.d { stroke-width: 3; }

/* ------------------------------------------------------------------ Ladebild */
#lade { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.ladebrett { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 36px; background: var(--brett); border: 7px solid var(--alu); border-radius: 16px; box-shadow: 0 10px 24px rgba(40, 70, 70, .25); }
.ladebrett strong { font-size: 44px; color: var(--blau); }
.ladebrett span { font-size: 20px; color: var(--grau); }

/* ------------------------------------------------------------------ Rahmen der App */
#app { height: 100%; height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: var(--st) 0 var(--sb); position: relative; }
#kopf { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 6px calc(8px + var(--x-breite)) 6px 8px; }
.kopfknopf {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(180deg, #5b6772, #414b55); box-shadow: 0 3px 0 #2b333b, 0 4px 8px rgba(0, 0, 0, .18);
}
.kopfknopf:active { transform: translateY(2px); box-shadow: 0 1px 0 #2b333b; }
#kopfmitte { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; }
#kopfmitte .titel { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rundeinfo { font: 400 21px/1 'Patrick Hand', cursive; white-space: nowrap; background: var(--brett); padding: 6px 12px; border-radius: 10px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.uhr { position: relative; width: 40px; height: 40px; flex: none; background: var(--brett); border-radius: 50%; box-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
.uhr svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.uhr circle { fill: none; stroke-width: 5; }
.uhr .ub { stroke: #e3e8ea; }
.uhr .uf { stroke: var(--blau); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .9s linear; }
.uhr .uz { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.uhr.knapp .uf { stroke: var(--rot); }
.uhr.knapp .uz { color: var(--rot); }
.uhr.knapp { animation: puls 1s ease-in-out infinite; }
@keyframes puls { 50% { transform: scale(1.1); } }
#buehne { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#buehne > section { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ Knöpfe: Kunststoffmagnete */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 18px; border-radius: 14px;
  font-weight: 800; font-size: 17px; line-height: 1.15; color: var(--tinte); text-align: center;
  background: linear-gradient(180deg, #ffffff, #e8ecef); box-shadow: 0 3px 0 #aab3ba, 0 5px 10px rgba(0, 0, 0, .14);
  transition: transform .06s;
}
.knopf:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #aab3ba, 0 2px 4px rgba(0, 0, 0, .14); }
.knopf:disabled { opacity: .5; }
.knopf.haupt { color: #fff; background: linear-gradient(180deg, #34b96c, #1f9d55); box-shadow: 0 3px 0 #15703c, 0 5px 10px rgba(0, 0, 0, .18); text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.knopf.haupt:active:not(:disabled) { box-shadow: 0 0 0 #15703c; }
.knopf.rot { color: #fff; background: linear-gradient(180deg, #f05a5a, #d83434); box-shadow: 0 3px 0 #9d2020, 0 5px 10px rgba(0, 0, 0, .18); }
.knopf.gruen.gedrueckt { color: #15703c; background: #d9f3e3; box-shadow: inset 0 2px 0 #a9dcbf; transform: translateY(2px); }
.knopf.flach { background: none; box-shadow: none; color: var(--grau); padding: 8px 10px; }
.knopf.riesig { min-height: 64px; font-size: 26px; padding: 12px 44px; border-radius: 20px; }
.knopf.rund { width: 46px; min-width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.knopf.rund.klein { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
.knopf.klein { min-height: 36px; font-size: 14px; padding: 4px 10px; }
.zeile { display: flex; gap: 10px; align-items: center; justify-content: center; }
.zeile .haupt { flex: 1; }

/* ------------------------------------------------------------------ Haftzettel */
.zettel { background: linear-gradient(175deg, #fff3a8, #ffe27a); border-radius: 3px 3px 10px 3px; box-shadow: 0 3px 6px rgba(60, 50, 0, .22), inset 0 -10px 14px -12px rgba(120, 90, 0, .35); color: #3a3200; }
.zettel .klein { color: #7a6a1c; }

/* ------------------------------------------------------------------ Brettflächen für Start, Menü, Lobby, Podium */
.start, .menue, .code, .lobby, .ende {
  margin: 4px 10px 12px; padding: 16px 14px; gap: 12px; overflow: hidden auto;
  background: linear-gradient(135deg, #ffffff 0%, var(--brett) 45%, #f1f4f3 100%);
  border: 7px solid var(--alu); border-radius: 16px;
  box-shadow: 0 1px 0 var(--alu-hell) inset, 0 0 0 1px var(--alu-dunkel), 0 10px 22px rgba(40, 70, 70, .28);
}
.start { align-items: center; justify-content: center; gap: 20px; text-align: center; }
.logo { width: min(86%, 400px); aspect-ratio: 1024 / 320; background: url('../assets/dinge/logo.webp?v=edc66eca') center / contain no-repeat; }
.unterzeile { font-size: 23px; color: var(--blau); max-width: 300px; line-height: 1.15; }
.sprachen { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.knopf.sprach { min-height: 44px; min-width: 50px; padding: 4px 8px; font-size: 15px; border-radius: 12px; }
.knopf.sprach.gewaehlt { color: #fff; background: linear-gradient(180deg, #4a86ee, #2f6fe0); box-shadow: 0 3px 0 #1d4ea8; }

.menue { justify-content: center; }
.namenskarte { display: flex; align-items: center; gap: 12px; padding: 12px 14px; transform: rotate(-1.2deg); margin: 0 6px 6px; }
.namenskarte .nk { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.namenskarte strong { font-size: 26px; line-height: 1.05; }
.knopf.karte { flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 14px 16px; min-height: 84px; color: #fff; }
.knopf.karte strong { font-size: 22px; font-weight: 900; }
.knopf.karte .klein { color: rgba(255, 255, 255, .92); font-weight: 600; }
.knopf.karte.gruen { background: linear-gradient(180deg, #34b96c, #1f9d55); box-shadow: 0 4px 0 #15703c, 0 6px 12px rgba(0, 0, 0, .18); }
.knopf.karte.blau { background: linear-gradient(180deg, #4a86ee, #2f6fe0); box-shadow: 0 4px 0 #1d4ea8, 0 6px 12px rgba(0, 0, 0, .18); }

.code { justify-content: center; align-items: center; }
.codefelder { display: flex; gap: 8px; }
.cf { width: 46px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 38px; color: var(--blau); border-bottom: 4px solid var(--tinte); border-radius: 2px; }
.cf.dran { border-bottom-color: var(--blau); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { border-bottom-color: transparent; } }
.tasten { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; width: 100%; max-width: 400px; }
.knopf.taste { min-height: 44px; padding: 0; font-size: 18px; border-radius: 10px; }
.code .zeile { width: 100%; max-width: 400px; }

/* ------------------------------------------------------------------ Lobby */
.lobby { gap: 10px; }
.codekarte { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 12px; margin: 0 8px; transform: rotate(-.8deg); flex: none; }
.codegross { display: flex; gap: 6px; font-size: 44px; line-height: 1; color: #1d4ea8; }
.codegross span { min-width: 30px; text-align: center; }
.codekarte .knopf { min-height: 40px; }
.spielerliste { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; flex: none; }
.sp { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 3px 5px; border-radius: 10px; position: relative; }
.sp.ich { background: rgba(47, 111, 224, .1); }
.sp.fort { opacity: .45; }
.sp.leer { opacity: .5; }
.spn { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.spn strong { font-size: 19px; line-height: 1; }
.sp .magnet .abz { position: absolute; right: -7px; bottom: -6px; width: 21px; height: 21px; box-shadow: 0 0 0 2px var(--brett); }
.sp .magnet .abz .ic { width: 14px; height: 14px; }
.sp .knopf.rund.klein { width: 30px; min-width: 30px; height: 30px; min-height: 30px; color: var(--grau); }
.sp .knopf.rund.klein .ic { width: 18px; height: 18px; }
.spn .klein { font-size: 11px; }
.abz { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.abz .ic { width: 16px; height: 16px; }
.abz.bereit { background: var(--gruen); }
.abz.stern { background: #f2a51e; }
.abz.malt { background: var(--blau); }
.optionen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 2px 2px 0; flex: none; }
.knopf.opt { flex-direction: column; gap: 0; padding: 6px 2px 8px; min-height: 58px; box-shadow: 0 3px 6px rgba(60, 50, 0, .22); border-radius: 3px 3px 10px 3px; }
.knopf.opt:nth-child(1) { transform: rotate(-2deg); } .knopf.opt:nth-child(2) { transform: rotate(1.2deg); background: linear-gradient(175deg, #d5f0ff, #b5e0fb); }
.knopf.opt:nth-child(3) { transform: rotate(-1deg); background: linear-gradient(175deg, #ffd9ea, #ffc1dc); } .knopf.opt:nth-child(4) { transform: rotate(2deg); background: linear-gradient(175deg, #dcf7d0, #c3eeb1); }
.knopf.opt:disabled { opacity: 1; }
.knopf.opt strong { font-size: 23px; line-height: 1; color: var(--tinte); }
.knopf.opt .klein { color: rgba(40, 40, 40, .62); font-size: 12px; }
.lobbyfuss { margin-top: auto; display: flex; flex-direction: column; gap: 8px; flex: none; }
.info { text-align: center; }

/* ------------------------------------------------------------------ Magnete (Spielerbilder) */
.magnet { --g: 44px; position: relative; flex: none; width: var(--g); height: var(--g); border-radius: 50%; background: var(--farbe, #9aa3ab); box-shadow: 0 0 0 2.5px var(--farbe, #9aa3ab), 2px 4px 6px rgba(0, 0, 0, .28); display: inline-block; }
.magnet .mbild { position: absolute; inset: -15%; background: url('../assets/figuren/magnete.webp?v=edc66eca') 0 0 / 400% 300% no-repeat; }
.magnet.klein { --g: 28px; } .magnet.gross { --g: 58px; } .magnet.riesig { --g: 110px; box-shadow: 0 0 0 5px var(--farbe), 4px 8px 12px rgba(0, 0, 0, .28); }
.magnet.leer { background: none; box-shadow: none; border: 2px dashed #b9c2c8; }
.magnet.wackel { animation: wackelmagnet 1.6s ease-in-out infinite; }
@keyframes wackelmagnet { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* ------------------------------------------------------------------ Spiel: Wortzeile, Brett, Ablage, Leiste */
.spiel { padding: 0 8px 8px; gap: 6px; }
.wortzeile { flex: none; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 2px; }
.status { font-size: 24px; text-align: center; line-height: 1.1; }
.status.klein { font-size: 14px; }
.meinwort { display: flex; align-items: baseline; gap: 10px; background: var(--gelb); padding: 4px 16px 6px; border-radius: 3px 3px 10px 3px; box-shadow: 0 3px 6px rgba(60, 50, 0, .22); transform: rotate(-1deg); max-width: 100%; }
.meinwort strong { font-size: 30px; line-height: 1; white-space: nowrap; }
.luecken { --n: 8; flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: calc(min(6px, 40px / var(--n))); }
.gruppe { display: flex; gap: calc(min(5px, 36px / var(--n))); }
.trenner { width: calc(min(14px, 160px / var(--n))); text-align: center; font-size: 26px; }
.luecke { width: calc(min(30px, (100vw - 80px) / var(--n) - 3px)); height: 40px; padding: 0; font-size: calc(min(30px, (100vw - 60px) / var(--n) + 4px)); line-height: 34px; color: var(--blau); border-bottom: 4px solid var(--tinte); border-radius: 2px; text-align: center; }
.luecke.hinweis { color: #b07a00; border-bottom-color: #e2a700; background: rgba(255, 216, 74, .35); }
.luecke.richtig { color: var(--gruen); border-bottom-color: var(--gruen); }
.luecken.wackel { animation: wackel .42s; }
@keyframes wackel { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

.brettplatz { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.whiteboard {
  position: relative; flex: none; line-height: 0; border: 6px solid var(--alu); border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, var(--brett) 40%, #f0f3f2 100%);
  box-shadow: 0 1px 0 var(--alu-hell) inset, 0 0 0 1px var(--alu-dunkel), 0 8px 18px rgba(40, 70, 70, .3);
}
.brett { display: block; border-radius: 6px; touch-action: none; }
.brett.malbar { cursor: crosshair; }
.ueber { position: absolute; inset: 0; pointer-events: none; line-height: 1.3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.ueber > * { pointer-events: auto; }
.ueber.wahl { background: rgba(250, 251, 249, .7); padding: 12px; }
.knopf.wort { width: min(84%, 300px); min-height: 62px; padding: 8px 12px; box-shadow: 0 4px 8px rgba(60, 50, 0, .28); border-radius: 3px 3px 12px 3px; }
.knopf.wort strong { font-size: clamp(22px, 7.4vw, 32px); line-height: 1; overflow-wrap: anywhere; }
.knopf.wort.z0 { transform: rotate(-2deg); } .knopf.wort.z1 { transform: rotate(1.4deg); background: linear-gradient(175deg, #d5f0ff, #b5e0fb); } .knopf.wort.z2 { transform: rotate(-1deg); background: linear-gradient(175deg, #ffd9ea, #ffc1dc); }
.knopf.melden { position: absolute; top: 6px; right: 6px; color: var(--grau); opacity: .9; }
.ueber.aufloesung { justify-content: flex-end; padding: 0 10px 14px; }
.loesung { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px 12px; max-width: 100%; transform: rotate(-1deg); animation: rein .25s ease-out; }
.loesung strong { text-align: center; overflow-wrap: anywhere; }
@keyframes rein { from { transform: translateY(20px) rotate(-1deg); opacity: 0; } }
.plusliste { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 6px; }
.plus { display: inline-flex; align-items: center; gap: 5px; }
.plus b { font-size: 21px; color: #15703c; }

/* Ablage unter dem Brett: Aluminiumleiste mit Stiften oder Buchstabenmagneten */
.ablage { flex: none; min-height: 56px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.ablage.werkzeuge, .ablage.kacheln, .ablage.fertig {
  padding: 8px 8px 9px; border-radius: 6px 6px 12px 12px;
  background: linear-gradient(180deg, #eef1f3 0%, #cdd4d9 14%, #b9c1c8 100%); box-shadow: 0 1px 0 #fff inset, 0 3px 0 var(--alu-dunkel), 0 6px 10px rgba(0, 0, 0, .2);
}
.ablage.fertig { background: none; box-shadow: none; }
.gruenschrift { color: var(--gruen); }
.farben { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; width: 100%; }
.farbe { aspect-ratio: 1; min-width: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 45%), var(--f); box-shadow: 0 2px 0 rgba(0, 0, 0, .28), 0 0 0 2px rgba(255, 255, 255, .7) inset; }
.farbe.gewaehlt { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--tinte); transform: scale(.82); }
.geraete { display: flex; gap: 6px; width: 100%; align-items: center; justify-content: center; }
.staerke, .knopf.geraet { flex: 1; max-width: 62px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: linear-gradient(180deg, #fff, #e8ecef); box-shadow: 0 3px 0 #9aa3ab; display: flex; align-items: center; justify-content: center; }
.staerke .punkt { border-radius: 50%; background: var(--f, #1d1f24); }
.staerke.s0 .punkt { width: 7px; height: 7px; } .staerke.s1 .punkt { width: 14px; height: 14px; } .staerke.s2 .punkt { width: 24px; height: 24px; }
.staerke.gewaehlt, .knopf.geraet.gewaehlt { box-shadow: 0 0 0 3px var(--blau) inset, 0 1px 0 #9aa3ab; transform: translateY(2px); background: #eaf1ff; }
.schwammbild { width: 34px; height: 22px; border-radius: 5px; background: linear-gradient(180deg, #3d7fe6 0 52%, #c9cfd4 52% 100%); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.knopf.leeren.scharf { background: linear-gradient(180deg, #f05a5a, #d83434); color: #fff; box-shadow: 0 3px 0 #9d2020; }
.knopf.zurlobby { flex: 2; max-width: none; min-height: 44px; font-size: 15px; padding: 4px 10px; }

.kachelfeld { --spalten: 7; display: grid; grid-template-columns: repeat(var(--spalten), minmax(0, 50px)); gap: 5px; justify-content: center; width: 100%; }
.kachel {
  aspect-ratio: 160 / 176; min-width: 0; font: 900 26px/1 Nunito, sans-serif; color: var(--tinte); padding: 0 6% 12% 0;
  background: url('../assets/dinge/kachel.webp?v=edc66eca') 0 0 / 300% 100% no-repeat;
  display: flex; align-items: center; justify-content: center; transition: transform .08s, opacity .12s;
}
.kachel:active { transform: translateY(3px) scale(.96); }
.kachel.weg { opacity: .16; pointer-events: none; transform: scale(.9); }
.kachelfeld.gesperrt .kachel { opacity: .55; }
.kachelfeld.gesperrt .kachel.weg { opacity: .12; }
.knopf.allezurueck { flex: none; }

/* Leiste mit allen Spielern */
.leute { --zahl: 6; flex: none; display: flex; justify-content: center; gap: calc(min(8px, 60px / var(--zahl))); min-height: 50px; }
.mensch { position: relative; display: flex; flex-direction: column; align-items: center; width: calc(min(52px, (100vw - 24px) / var(--zahl) - 4px)); }
.mensch .magnet { --g: calc(min(34px, (100vw - 24px) / var(--zahl) - 10px)); }
.mensch .mname { display: none; }
.mensch .mpunkte { font-size: 17px; line-height: 1.1; margin-top: 3px; }
.mensch.fort { opacity: .4; }
.mensch.ich .mpunkte { color: var(--blau); text-decoration: underline; }
.mensch .abz { position: absolute; top: -4px; right: calc(50% - 22px); width: 17px; height: 17px; box-shadow: 0 0 0 2px var(--wand); }
.mensch .abz .ic { width: 12px; height: 12px; }
.mensch.malt .magnet { animation: wackelmagnet 1.6s ease-in-out infinite; }

/* ------------------------------------------------------------------ Podium */
.ende { gap: 10px; }
.podium { flex: 1; min-height: 200px; display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 6px; padding: 0 2px; }
.stufe { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.pname { font-size: 19px; line-height: 1; max-width: 100%; overflow-wrap: anywhere; }
.sockel { width: 100%; margin-top: 6px; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; font-size: 40px; line-height: 1; border: 4px solid var(--tinte); border-bottom: 0; border-radius: 10px 12px 0 0 / 12px 9px 0 0; }
.p1 .sockel { height: 120px; color: #c98a00; border-color: #c98a00; background: repeating-linear-gradient(-55deg, rgba(245, 197, 24, .28) 0 3px, transparent 3px 9px); }
.p2 .sockel { height: 84px; color: var(--blau); border-color: var(--blau); background: repeating-linear-gradient(-55deg, rgba(47, 111, 224, .18) 0 3px, transparent 3px 9px); }
.p3 .sockel { height: 58px; color: var(--rot); border-color: var(--rot); background: repeating-linear-gradient(-55deg, rgba(226, 59, 59, .18) 0 3px, transparent 3px 9px); }
.p1 .magnet { --g: 72px; }
.restliste { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.rz { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rz .rn { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz .rp { width: 22px; font-size: 19px; color: var(--grau); }
.rz b { font-size: 19px; }
.endefuss { flex: none; display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------------ Tafeln, Hinweise, Verbindung, Drehhinweis */
.tafelgrund { position: fixed; inset: 0; z-index: 40; background: rgba(30, 50, 55, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tafel { width: min(100%, 380px); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 16px; background: var(--brett); border: 6px solid var(--alu); border-radius: 16px; box-shadow: 0 0 0 1px var(--alu-dunkel), 0 14px 30px rgba(0, 0, 0, .35); animation: rein2 .16s ease-out; }
@keyframes rein2 { from { transform: scale(.94); opacity: 0; } }
.tafel.zettel { border: 0; background: linear-gradient(175deg, #fff3a8, #ffe27a); border-radius: 3px 3px 16px 3px; }
.tafel ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.tafel p { font-size: 17px; text-align: center; }
.tafel p.klein { font-size: 13px; }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 6px 10px; border-radius: 12px; background: #eef1f3; font-weight: 800; }
.sk { flex: none; width: 54px; height: 30px; border-radius: 15px; background: #b3bcc3; position: relative; transition: background .12s; }
.sn { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, .3); transition: transform .12s; }
.schalter.an .sk { background: var(--gruen); }
.schalter.an .sn { transform: translateX(24px); }
#hinweis { position: fixed; left: 50%; bottom: calc(22% + var(--sb)); transform: translate(-50%, 12px); z-index: 50; max-width: 86vw; padding: 8px 16px; border-radius: 12px; background: rgba(31, 42, 51, .94); color: #fff; font-weight: 800; font-size: 15px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
#hinweis.da { opacity: 1; transform: translate(-50%, 0); }
#netzband { position: absolute; left: 50%; top: calc(56px + var(--st)); transform: translateX(-50%); z-index: 30; display: none; padding: 6px 14px; border-radius: 10px; background: var(--gelb); font-size: 19px; box-shadow: 0 3px 6px rgba(0, 0, 0, .25); white-space: nowrap; }
#netzband.da { display: block; }
#dreh { display: none; position: fixed; inset: 0; z-index: 60; background: linear-gradient(180deg, var(--wand), var(--wand2)); flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px calc(16px + var(--x-breite)) 16px 16px; text-align: center; }
#dreh p { font-size: 26px; }
.drehbild { width: 64px; height: 104px; border: 6px solid var(--tinte); border-radius: 14px; animation: drehen 2.2s ease-in-out infinite; }
@keyframes drehen { 0%, 20% { transform: rotate(90deg); } 60%, 100% { transform: rotate(0); } }

/* ------------------------------------------------------------------ kleines Handy: enger */
@media (max-height: 700px) {
  #kopf { height: 48px; padding-top: 4px; padding-bottom: 4px; }
  .wortzeile { min-height: 42px; }
  .kachelfeld { grid-template-columns: repeat(var(--spalten), minmax(0, 44px)); gap: 4px; }
  .kachel { font-size: 23px; }
  .lobby { gap: 7px; padding: 10px 10px; }
  .codegross { font-size: 36px; }
  .sp { min-height: 40px; }
  .magnet { --g: 34px; }
  .start { gap: 14px; }
}

/* ------------------------------------------------------------------ Tablet hochkant: Brett groß, Spieler als Liste daneben */
@media (min-width: 700px) and (orientation: portrait) {
  #app { max-width: none; padding-left: 16px; padding-right: 16px; }
  .start, .menue, .code, .lobby, .ende { width: min(100%, 680px); margin-left: auto; margin-right: auto; padding: 28px 32px; gap: 18px; flex: 0 1 auto !important; margin-top: auto; margin-bottom: auto; }
  #buehne { justify-content: center; }
  .spiel { display: grid !important; grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: 'wort wort' 'brett leute' 'ablage leute'; gap: 10px 14px; padding: 0 0 14px; }
  .wortzeile { grid-area: wort; min-height: 60px; } .brettplatz { grid-area: brett; } .ablage { grid-area: ablage; } .leute { grid-area: leute; }
  .leute { flex-direction: column; justify-content: flex-start; gap: 8px; padding-top: 6px; }
  .mensch { width: auto; flex-direction: row; gap: 10px; padding: 6px 8px; background: var(--brett); border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
  .mensch .magnet { --g: 42px; }
  .mensch .mname { display: block; flex: 1; min-width: 0; color: var(--tinte); line-height: 1.1; overflow-wrap: anywhere; }
  .mensch .mpunkte { font-size: 24px; margin: 0; }
  .mensch .abz { top: -5px; left: 34px; right: auto; width: 20px; height: 20px; }
  .luecke { width: calc(min(44px, 620px / var(--n) - 4px)); height: 54px; font-size: calc(min(40px, 600px / var(--n))); line-height: 46px; }
  .kachelfeld { grid-template-columns: repeat(var(--spalten), minmax(0, 64px)); gap: 7px; }
  .kachel { font-size: 32px; border-radius: 11px; }
  .farben { gap: 8px; max-width: 560px; } .geraete { gap: 10px; } .staerke, .knopf.geraet { height: 52px; max-width: 76px; }
  .status { font-size: 30px; } .meinwort strong { font-size: 40px; }
  .knopf.wort strong { font-size: 36px; } .knopf.wort { min-height: 76px; }
  .tasten { max-width: 520px; gap: 8px; } .knopf.taste { min-height: 54px; font-size: 22px; }
  .podium { min-height: 340px; } .p1 .magnet { --g: 104px; } .podium .magnet.gross { --g: 80px; } .p1 .sockel { height: 170px; } .p2 .sockel { height: 120px; } .p3 .sockel { height: 84px; }
  .pname { font-size: 26px; }
}

/* ------------------------------------------------------------------ Querformat mit Platz (Tablet quer, PC): Spieler links, Brett in der Mitte, Ablage rechts */
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  #app { max-width: none; padding-left: 16px; padding-right: 16px; }
  .start, .menue, .code, .lobby, .ende { width: min(100%, 620px); margin-left: auto; margin-right: auto; flex: 0 1 auto !important; margin-top: auto; margin-bottom: auto; padding: 22px 26px; }
  #buehne { justify-content: center; }
  .lobby { width: min(100%, 900px); display: grid !important; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: 'code liste' 'opt liste' 'fuss fuss'; gap: 16px 28px; align-items: start; }
  .codekarte { grid-area: code; } .spielerliste { grid-area: liste; } .optionen { grid-area: opt; grid-template-columns: 1fr 1fr; gap: 12px; } .lobbyfuss { grid-area: fuss; }
  .ende { width: min(100%, 760px); }
  .spiel { display: grid !important; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) minmax(250px, 330px); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'leute wort ablage' 'leute brett ablage'; gap: 8px 18px; padding: 0 0 14px; }
  .wortzeile { grid-area: wort; min-height: 56px; } .brettplatz { grid-area: brett; } .ablage { grid-area: ablage; align-self: center; } .leute { grid-area: leute; }
  .leute { flex-direction: column; justify-content: center; gap: 7px; }
  .mensch { width: auto; flex-direction: row; gap: 10px; padding: 5px 8px; background: var(--brett); border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
  .mensch .magnet { --g: 38px; }
  .mensch .mname { display: block; flex: 1; min-width: 0; color: var(--tinte); line-height: 1.1; overflow-wrap: anywhere; }
  .mensch .mpunkte { font-size: 23px; margin: 0; }
  .mensch .abz { top: -5px; left: 30px; right: auto; width: 20px; height: 20px; }
  .luecke { width: calc(min(40px, 480px / var(--n) - 4px)); height: 50px; font-size: calc(min(36px, 470px / var(--n))); line-height: 42px; }
  .ablage.kacheln .kachelfeld { --spalten: 4 !important; grid-template-columns: repeat(4, minmax(0, 62px)); gap: 7px; }
  .ablage.kacheln, .ablage.werkzeuge { padding: 14px 12px; border-radius: 12px; }
  .kachel { font-size: 30px; }
  .farben { grid-template-columns: repeat(4, 1fr); gap: 10px; } .farbe { max-width: 62px; justify-self: center; width: 100%; }
  .geraete { flex-wrap: wrap; gap: 8px; margin-top: 6px; } .staerke, .knopf.geraet { flex: 1 0 28%; max-width: none; height: 50px; }
  .knopf.zurlobby { flex: 1 0 100%; }
  .status { font-size: 28px; } .meinwort strong { font-size: 36px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 800px) {
  .ablage.kacheln .kachelfeld { --spalten: 5 !important; grid-template-columns: repeat(5, minmax(0, 50px)); gap: 5px; }
  .kachel { font-size: 25px; }
  .mensch { padding: 3px 8px; } .mensch .magnet { --g: 32px; } .leute { gap: 5px; }
}

/* ------------------------------------------------------------------ Handy quer: bitte drehen */
@media (orientation: landscape) and (max-height: 559px) {
  #dreh { display: flex; }
  #app, #tafeln, #hinweis { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ Feinschliff Runde 1: Kritzeleien, Podium, große Schirme */
.start, .menue, .code, .ende, .lobby { position: relative; }
.start::before, .menue::before, .code::before, .ende::before { content: ''; position: absolute; left: 4%; right: 4%; top: 10px; height: 26%; max-height: 120px; background: url('../assets/dinge/kritzel-oben.svg?v=edc66eca') center top / contain no-repeat; opacity: .8; pointer-events: none; }
.start::after, .menue::after, .code::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: 10px; height: 26%; max-height: 120px; background: url('../assets/dinge/kritzel-unten.svg?v=edc66eca') center bottom / contain no-repeat; opacity: .8; pointer-events: none; }
.start > *, .menue > *, .code > *, .ende > * { position: relative; z-index: 1; }
.start .logo { width: min(94%, 460px); }
.unterzeile { font-size: 25px; }
.schwammbild { width: 46px; height: 33px; border-radius: 0; background: url('../assets/dinge/schwamm.webp?v=edc66eca') center / contain no-repeat; box-shadow: none; }
.podium { align-items: end; min-height: 260px; padding-top: 70px; }
.p1 .sockel { height: clamp(120px, 26vh, 240px); } .p2 .sockel { height: clamp(84px, 18vh, 170px); } .p3 .sockel { height: clamp(58px, 12vh, 120px); }
.p1 .magnet { --g: 84px; } .podium .magnet.gross { --g: 68px; } .p1 .magnet.gross { --g: 88px; }
.pname { font-size: 21px; } .ppunkte { font-size: 14px; }
.sockel { font-size: 52px; }
.lobby .spielerliste { margin: 4px 0; }
@media (min-height: 760px) and (max-width: 699px) {
  .sp { min-height: 58px; } .lobby { gap: 14px; } .lobby .magnet { --g: 50px; } .spn strong { font-size: 21px; }
  .knopf.opt { min-height: 68px; } .knopf.opt strong { font-size: 26px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .start, .menue, .code, .lobby, .ende { zoom: 1.3; }
  .mensch .mname { font-size: 15px; } .mensch .magnet { --g: 44px; } .mensch { padding: 7px 10px; } .mensch .mpunkte { font-size: 26px; }
  .rundeinfo { font-size: 25px; padding: 8px 16px; } .uhr { width: 48px; height: 48px; } .uhr .uz { font-size: 22px; }
  #kopf { height: 64px; } .kopfknopf { width: 46px; height: 46px; } #kopfmitte .titel { font-size: 30px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 1000px) { .mensch .magnet { --g: 34px; } .mensch { padding: 4px 8px; } .start, .menue, .code, .lobby, .ende { zoom: 1.12; } }
@media (min-width: 700px) and (orientation: portrait) {
  .start, .menue, .code, .lobby, .ende { zoom: 1.35; width: min(100%, 520px); }
  .mensch .mname { font-size: 15px; }
  .rundeinfo { font-size: 26px; padding: 8px 16px; } .uhr { width: 50px; height: 50px; } .uhr .uz { font-size: 23px; }
  #kopf { height: 66px; } .kopfknopf { width: 48px; height: 48px; } #kopfmitte .titel { font-size: 32px; }
}

/* Podium und Lobby auf kleinen Handys, Restliste zweizeilig, Luft für Kritzeleien auf großen Schirmen */
.rz .rn { white-space: normal; line-height: 1.05; font-size: 12.5px; overflow: visible; }
.restliste { gap: 5px 10px; }
@media (max-height: 700px) {
  .podium { min-height: 150px; padding-top: 0; }
  .p1 .sockel { height: 86px; } .p2 .sockel { height: 58px; } .p3 .sockel { height: 38px; }
  .p1 .magnet.gross { --g: 60px; } .podium .magnet.gross { --g: 48px; }
  .pname { font-size: 17px; } .ppunkte { font-size: 12px; } .sockel { font-size: 34px; padding-top: 0; }
  .ende::before { display: none; } .ende { gap: 6px; padding: 8px 10px; }
  .rz .magnet { --g: 24px; } .rz b, .rz .rp { font-size: 17px; }
  .endefuss .knopf { min-height: 40px; } .endefuss .knopf.flach { min-height: 30px; padding: 2px; }
}
@media (max-width: 380px) { .lobbyfuss .knopf { font-size: 15px; padding: 6px 10px; white-space: nowrap; } .lobbyfuss .zeile { gap: 7px; } }
@media (min-width: 700px) { #buehne > .start { min-height: 470px; } .menue, .code { padding-top: 96px !important; padding-bottom: 96px !important; } .ende::before { opacity: .55; } }
#buehne > .ende .podium { flex: 1 0 auto; }
#buehne > .ende { overflow: hidden auto; }
@media (min-width: 700px) {
  #buehne > .start { padding-top: 112px; padding-bottom: 112px; }
  #buehne > .ende { max-height: calc((100vh - 96px) / 1.3); }
  .p1 .sockel { height: clamp(96px, 15vh, 180px); } .p2 .sockel { height: clamp(66px, 10.5vh, 126px); } .p3 .sockel { height: clamp(44px, 7vh, 84px); }
  .podium { padding-top: 56px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 1000px) { #buehne > .ende { max-height: calc((100vh - 80px) / 1.12); } #buehne > .start { padding-top: 84px; padding-bottom: 84px; } }

/* ================================================================== Runde 2 (nach der ersten Bildkritik) */
/* Zeile über dem Brett: wer malt, Melden-Fahne rechts */
.malerzeile { flex: none; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; position: relative; padding: 0 44px; font-size: 19px; line-height: 1; }
.malerzeile .magnet { --g: 24px !important; }
.malerzeile .knopf.melden { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 36px; min-width: 36px; height: 36px; min-height: 36px; opacity: 1; color: var(--grau); }
.malerzeile .knopf.melden::before { content: ''; position: absolute; inset: -5px; }

/* Lobby: zehn Plätze, verteilt über die Höhe, Entfernen durch Antippen */
.lobby .spielerliste { flex: 1 1 auto; align-content: space-evenly; min-height: 0; }
.sp.waehlbar { cursor: pointer; }
.sp.waehlbar:active { background: rgba(226, 59, 59, .12); }
.sp.leer .magnet { --g: 34px; opacity: .7; }
.spn { gap: 3px; } .spn .klein { line-height: 1.15; }
.codegross, .cf { font-family: Nunito, sans-serif; font-weight: 900; letter-spacing: .02em; }
.codegross { font-size: 40px; } .cf { font-size: 34px; }
.knopf.opt strong { font-size: 21px; white-space: nowrap; }
.knopf:disabled { opacity: 1; filter: none; }
.knopf.haupt:disabled { background: #d5dbdf; color: #5d6872; box-shadow: 0 3px 0 #b3bcc3; text-shadow: none; }

/* Start: Reihe aus Tiermagneten */
.parade { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; max-width: 330px; }
.parade .magnet { --g: 46px; transform: rotate(var(--dreh, 0deg)); margin: 4px 2px; }
.start { gap: 16px; }
.menue { gap: 16px; } .knopf.karte { min-height: 104px; padding: 16px 18px; } .knopf.karte strong { font-size: 25px; }
.namenskarte { padding: 16px 16px; } .namenskarte strong { font-size: 30px; }

/* Farben in zwei Reihen: Tippziele mindestens 44 Punkte */
.farben { grid-template-columns: repeat(6, 1fr); gap: 6px 4px; justify-items: center; }
.farbe { width: min(100%, 46px); position: relative; }
.farbe::before { content: ''; position: absolute; inset: -4px -6px; }
.farbe.gewaehlt { transform: scale(.86); }

/* Buchstabenmagnete: weißer Kunststoffstein, Buchstabe bunt wie der Schriftzug */
.kachelfeld { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; --breite: calc((100% - (var(--spalten) - 1) * 4px) / var(--spalten)); }
.kachel { flex: 0 0 var(--breite); max-width: 54px; font-size: 29px; font-weight: 1000; text-shadow: 0 1.5px 0 rgba(0, 0, 0, .16); }
.kf0 { color: #e23b3b; } .kf1 { color: #ef7d12; } .kf2 { color: #d9a400; } .kf3 { color: #1f8f4e; } .kf4 { color: #129fa4; } .kf5 { color: #2f6fe0; } .kf6 { color: #8a4fd6; }
.kachel.weg { opacity: .14; }

/* Hinweiszeile, Auflösung und „Richtig“ in der Ablage statt über der Zeichnung */
.ablage.hinweiszeile { min-height: 72px; font-size: 22px; text-align: center; color: var(--grau); line-height: 1.1; padding: 0 12px; }
.ablage.loesungplatz { min-height: 110px; padding: 6px 0; }
.ablage .loesung { transform: rotate(-1deg); min-width: 62%; max-width: 100%; padding: 10px 18px 12px; animation: rein .25s ease-out; }
.ablage .loesung strong { font-size: 34px; }
.gruenzettel { background: linear-gradient(175deg, #dcf7d0, #bdebaa); color: #14532d; display: flex; flex-direction: column; align-items: center; padding: 10px 26px 12px; transform: rotate(-1.2deg); }
.gruenzettel .klein { color: #2f6b3f; }
.ablage.fertig { min-height: 96px; }

/* eigene Punkte: kleiner Zettel statt Unterstreichung */
.mensch.ich .mpunkte { text-decoration: none; background: var(--gelb); color: var(--tinte); padding: 0 6px; border-radius: 2px 2px 6px 2px; box-shadow: 0 1px 2px rgba(60, 50, 0, .3); }
.mensch .abz { top: -5px; }
.leute { padding-top: 4px; }
.mensch .magnet { --g: calc(min(34px, (100vw - 24px) / var(--zahl) - 12px)); }

/* Podium: Grundlinie, Rangliste mit klarer Spaltentrennung */
.podium { border-bottom: 5px solid var(--tinte); border-radius: 0 0 3px 3px; margin-bottom: 8px; }
.restliste { gap: 6px 0; }
.rz { padding: 0 10px 0 4px; }
.rz:nth-child(even) { border-left: 2px dashed #c9d1d6; padding-left: 12px; padding-right: 2px; }
.rz b { min-width: 34px; text-align: right; }

/* Tafeln im Brettstil: handgeschriebene Zeilen statt grauer Kästen */
.schalter { background: none; border-bottom: 3px solid #dfe5e8; border-radius: 0; padding: 6px 4px; font: 400 23px/1 'Patrick Hand', cursive; }
.schalter:last-of-type { border-bottom: 0; }
.tafel { gap: 12px; }
.tafel h2 { text-align: center; font-size: 32px; color: var(--blau); }

/* Drehhinweis: Handy hochkant mit Pfeil */
#dreh { padding: 16px; }
.drehbild { position: relative; width: 58px; height: 100px; animation: none; transform: none; }
.drehbild::after { content: ''; position: absolute; left: 74px; top: 22px; width: 46px; height: 46px; border: 6px solid var(--blau); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(20deg); }
.drehbild::before { content: ''; position: absolute; left: 106px; top: 58px; border: 11px solid transparent; border-top-color: var(--blau); transform: rotate(18deg); }
#dreh .drehbild { margin-right: 60px; }

/* Kritzeleien: nur in freien Randzonen */
.start::before, .menue::before, .code::before, .ende::before, .start::after, .menue::after, .code::after { height: 84px; max-height: none; }
.start, .menue, .code { padding-top: 100px; padding-bottom: 100px; }
.ende { padding-top: 96px; } .podium { padding-top: 0; }
@media (max-height: 700px) {
  .start::before, .menue::before, .code::before, .ende::before, .start::after, .menue::after, .code::after { height: 52px; top: 6px; } .start::after, .menue::after, .code::after { top: auto; bottom: 6px; }
  .start, .menue, .code { padding-top: 60px; padding-bottom: 60px; } .ende { padding-top: 60px; } .ende::before { display: block; }
  .parade .magnet { --g: 38px; } .knopf.karte { min-height: 84px; } .lobby .magnet { --g: 32px; } .sp { min-height: 36px; } .spn strong { font-size: 16px; } .sp.leer .magnet { --g: 26px; }
  .farbe { width: min(100%, 40px); } .ablage.loesungplatz { min-height: 96px; } .ablage .loesung strong { font-size: 28px; }
  .malerzeile { min-height: 26px; font-size: 17px; }
}
@media (min-width: 700px) {
  #buehne > .start, #buehne > .menue, #buehne > .code { padding-top: 104px !important; padding-bottom: 104px !important; }
  #buehne > .ende { padding-top: 100px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 1000px) { #buehne > .start, #buehne > .menue, #buehne > .code { padding-top: 96px !important; padding-bottom: 96px !important; } }

/* Tablet hochkant: eigene Zeile für „… malt“, Liste füllt die Höhe */
@media (min-width: 700px) and (orientation: portrait) {
  .spiel { grid-template-columns: minmax(0, 1fr) 200px; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: 'wort wort' 'maler leute' 'brett leute' 'ablage leute'; }
  .malerzeile { grid-area: maler; font-size: 24px; } .malerzeile .magnet { --g: 32px !important; }
  .leute { justify-content: flex-start; gap: 10px; } .mensch { flex: 0 1 76px; } .mensch .magnet { --g: 46px; } .mensch .mname { font-size: 16px; }
  .farbe { width: min(100%, 62px); } .kachel { max-width: 70px; font-size: 38px; } .kachelfeld { gap: 7px; --breite: calc((100% - (var(--spalten) - 1) * 7px) / var(--spalten)); }
  .ablage.hinweiszeile { font-size: 28px; } .ablage .loesung strong { font-size: 44px; } .plus b { font-size: 26px; } .plus .magnet { --g: 36px; }
  .lobby .spielerliste { gap: 10px 14px; }
}
/* Tablet quer und PC */
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .spiel { grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: 'leute wort ablage' 'leute maler ablage' 'leute brett ablage'; }
  .malerzeile { grid-area: maler; font-size: 23px; } .malerzeile .magnet { --g: 30px !important; }
  .leute { align-self: start; margin-top: 70px; justify-content: flex-start; } .ablage { align-self: start; margin-top: 70px; }
  .mensch .mname { font-size: 17px; }
  .ablage.kacheln .kachelfeld { --spalten: 4 !important; gap: 7px; --breite: calc((100% - 21px) / 4); } .kachel { max-width: 66px; font-size: 34px; }
  .farben { grid-template-columns: repeat(4, 1fr); gap: 10px; } .farbe { width: min(100%, 60px); }
  .ablage.hinweiszeile, .ablage.loesungplatz, .ablage.fertig { background: none; box-shadow: none; }
  .ablage.hinweiszeile { font-size: 28px; } .ablage .loesung strong { font-size: 40px; } .ablage .loesung .klein { font-size: 16px; } .plus b { font-size: 26px; } .plus .magnet { --g: 36px; }
  .meinwort .klein { font-size: 17px; } .knopf.wort strong { font-size: 34px; }
  .lobby .spielerliste { align-content: start; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 860px) {
  .ablage.kacheln .kachelfeld { --spalten: 5 !important; --breite: calc((100% - 20px) / 5); gap: 5px; } .kachel { font-size: 27px; }
  .leute, .ablage { margin-top: 56px; }
}
.kachel { padding: 0 3px 6px 0; }
.wortzeile .status.klein { flex: 0 1 auto; min-width: 120px; }
.wortzeile .knopf.zurlobby { flex: none; white-space: nowrap; max-width: none; min-height: 38px; }
/* Die Kopfleiste ist immer mindestens so hoch wie das X des Portals, damit darunter nichts neben dem X landet */
#kopf { min-height: calc(var(--x-hoehe) + 4px); }

/* ================================================================== Runde 3 (nach der zweiten Bildkritik) */
/* Tippziele: Kopfknöpfe 44, Melden 44, Code-Tasten in sechs Spalten */
.kopfknopf { width: 44px; height: 44px; }
#kopf { height: 56px; }
.malerzeile { min-height: 46px; padding: 0 52px; }
.malerzeile .knopf.melden { width: 44px; min-width: 44px; height: 44px; min-height: 44px; right: 0; }
.malerzeile .knopf.melden .ic { width: 22px; height: 22px; }
.tasten { grid-template-columns: repeat(6, 1fr); gap: 7px; max-width: 340px; }
.knopf.taste { min-height: 46px; font-size: 20px; }
.code { gap: 10px; }
/* „Alles zurück“ ist die letzte Taste im Feld der Buchstabenmagnete */
.knopf.allezurueck { flex: 0 0 var(--breite); max-width: 54px; min-height: 0; aspect-ratio: 160 / 176; padding: 0 3px 6px 0; border-radius: 10px; background: linear-gradient(180deg, #eef1f3, #d6dce1); box-shadow: 0 3px 0 #9aa3ab; color: var(--grau); }
.knopf.allezurueck .ic { width: 26px; height: 26px; }
/* Start: zwölf Tiere in zwei Reihen */
.parade { display: grid; grid-template-columns: repeat(6, auto); gap: 8px 6px; max-width: none; justify-content: center; }
.parade .magnet { --g: 44px; margin: 2px; }
@media (min-height: 780px) and (max-width: 699px) { .parade .magnet { --g: 50px; } .start .logo { width: min(96%, 480px); } .start { gap: 20px; } }
@media (max-height: 700px) { .parade .magnet:nth-child(n+7) { display: none; } .parade .magnet { --g: 40px; } }
/* Text ohne verwaiste Wörter, bessere Lesbarkeit der Hinweise */
.status, .ablage.hinweiszeile, .info, .unterzeile, .tafel p { text-wrap: balance; }
.ablage.hinweiszeile { color: #3f4c57; }
.sp.leer .klein { color: #7c8791; } .sp.leer { opacity: .75; }
.spn .klein { margin-left: 9px; }
.luecke.hinweis { color: #7a5200; }
/* Wortwahl: größere Zettel */
.knopf.wort { min-height: 78px; width: min(88%, 330px); } .knopf.wort strong { font-size: clamp(26px, 8.4vw, 38px); }
.ueber.wahl { gap: 18px; }
/* knappe Zeit: der Rahmen des Bretts wird rot */
body.knapp .whiteboard { box-shadow: 0 0 0 3px var(--rot), 0 8px 18px rgba(226, 59, 59, .35); }
/* Lobby-Knöpfe einzeilig, auch in langen Sprachen */
.lobbyfuss .zeile .knopf { white-space: nowrap; padding-left: 12px; padding-right: 12px; } .lobbyfuss .zeile .knopf:first-child { flex: none; }
.lobbyfuss .zeile .knopf.haupt { font-size: 16px; }
/* Podium: Rest als eine Spalte, wenn Platz ist */
@media (min-height: 760px) and (max-width: 699px) {
  .restliste { grid-template-columns: 1fr; gap: 5px; padding: 0 8px; } .rz:nth-child(even) { border-left: 0; padding-left: 4px; padding-right: 10px; }
  .rz .rn { font-size: 15px; } .ende { padding-top: 84px; } .ende::before { height: 70px; }
}
/* kleines Handy: Magnete kompakter, damit das Brett groß bleibt */
@media (max-height: 700px) {
  #kopf { height: 52px; } .kopfknopf { width: 44px; height: 44px; }
  .kachel, .knopf.allezurueck { aspect-ratio: 1 / 1; max-width: 46px; background-size: 300% 100%; font-size: 25px; padding: 0 2px 5px 0; }
  .kachelfeld { gap: 3px; --breite: calc((100% - (var(--spalten) - 1) * 3px) / var(--spalten)); }
  .ablage.kacheln { padding: 6px 6px 7px; } .malerzeile { min-height: 44px; font-size: 16px; } .wortzeile { min-height: 40px; }
  .luecke { height: 36px; line-height: 30px; } .leute { min-height: 44px; } .mensch .mpunkte { font-size: 15px; margin-top: 1px; }
  .tasten { gap: 5px; } .knopf.taste { min-height: 44px; font-size: 18px; } .code { padding-top: 46px !important; padding-bottom: 46px !important; gap: 6px; } .cf { height: 46px; font-size: 28px; }
  .knopf.wort { min-height: 60px; }
}
/* Tablet und PC: Liste und Ablage mittig zum Brett, Punkte in zwei Spalten */
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .leute, .ablage { align-self: center; margin-top: 0; }
  .ablage .plusliste { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; justify-items: start; }
  .ablage .loesung { min-width: 0; width: 100%; }
  .knopf.allezurueck { max-width: 66px; }
  .malerzeile .knopf.melden { position: static; transform: none; margin-left: 10px; } .malerzeile { padding: 0; }
}
@media (min-width: 700px) and (orientation: portrait) {
  .leute { justify-content: center; } .knopf.allezurueck { max-width: 70px; } .kopfknopf { width: 48px; height: 48px; }
  .tasten { max-width: 460px; gap: 9px; }
}

/* „Alles zurück“ sitzt links in der Zeile über dem Brett, die Melden-Fahne rechts */
.malerzeile .knopf.allezurueck { position: absolute; left: 0; top: 50%; transform: translateY(-50%); flex: none; width: 44px; min-width: 44px; max-width: none; height: 44px; min-height: 44px; aspect-ratio: auto; padding: 0; border-radius: 50%; background: linear-gradient(180deg, #ffffff, #e8ecef); box-shadow: 0 3px 0 #aab3ba, 0 5px 10px rgba(0, 0, 0, .14); }
.malerzeile .knopf.allezurueck .ic { width: 22px; height: 22px; }
@media (min-aspect-ratio: 21/20) and (min-height: 560px) { .malerzeile .knopf.allezurueck { position: static; transform: none; margin-right: 10px; } }

/* kleines Handy: 15 und 16 Magnete in zwei Reihen (acht Spalten), damit das Brett die Hauptsache bleibt */
@media (max-height: 700px) and (max-width: 699px) { .kachelfeld[data-zahl="15"], .kachelfeld[data-zahl="16"] { --spalten: 8 !important; } .kachelfeld[data-zahl="15"] .kachel, .kachelfeld[data-zahl="16"] .kachel { aspect-ratio: 8 / 9; font-size: 23px; } }

/* ================================================================== Runde 4 (nach der dritten Bildkritik) */
/* Lücken: ein gelegter Buchstabe ist ein kleiner Magnet, ein Hinweis ein gelber, das gelöste Wort grün */
.luecke { font: 1000 calc(min(22px, (100vw - 60px) / var(--n) - 2px)) / 1 Nunito, sans-serif; color: var(--tinte); height: 38px; padding: 0 1px 4px 0; border-bottom: 4px solid var(--tinte); border-radius: 2px; display: flex; align-items: center; justify-content: center; }
.luecke.voll, .luecke.hinweis, .luecke.richtig { border-bottom-color: transparent; background: url('../assets/dinge/kachel.webp?v=edc66eca') 0 0 / 300% 100% no-repeat; }
.luecke.hinweis { background-position: 50% 0; color: #4a3600; }
.luecke.richtig { background-position: 100% 0; color: #0f3d1f; }
.luecken { align-items: center; }
/* Buchstabenmagnete: dunklere Farben für Gelb, Orange und Türkis (Kontrast) */
.kf1 { color: #d45f00; } .kf2 { color: #a87a00; } .kf4 { color: #0c7f84; }
.kachelfeld { --spalten: 7; }
/* Lobby: Abzeichen unten links am Magneten, „getrennt“ lesbar, Zettel zeigen einen Stift, wenn man sie ändern darf */
.sp .magnet .abz { right: auto; left: -6px; bottom: -6px; }
.sp.fort { opacity: 1; } .sp.fort .magnet, .sp.fort strong { opacity: .45; } .sp.fort .klein { color: #5d6872; font-size: 12px; }
.spn .klein { font-size: 12px; color: #5d6872; margin-left: 2px; }
.knopf.opt { position: relative; }
.tippbar { position: absolute; right: 3px; top: 3px; color: rgba(40, 40, 40, .5); display: flex; } .tippbar .ic { width: 13px; height: 13px; }
/* Start: Tierreihen mit Abstand zum Rahmen */
.parade .magnet { --g: calc(min(48px, (100vw - 130px) / 6)); }
/* Menü: dritte Karte „Frei malen“ */
.knopf.karte.hell { color: var(--tinte); background: linear-gradient(175deg, #fff3a8, #ffe27a); box-shadow: 0 4px 0 #cfae3c, 0 6px 12px rgba(0, 0, 0, .14); min-height: 84px; }
.knopf.karte.hell .klein { color: #6a5a10; }
.menue { gap: 12px; }
/* Podium: Liste in Handschrift mit Luft, am Handy immer eine Spalte */
.rz .rn { font: 400 18px/1.05 'Patrick Hand', cursive; }
.rz { gap: 9px; min-height: 30px; }
@media (max-width: 699px) {
  .restliste { grid-template-columns: 1fr; gap: 4px; padding: 0 8px; } .rz:nth-child(even) { border-left: 0; padding-left: 4px; padding-right: 10px; }
}
@media (max-height: 700px) { .ende::before { display: none !important; } .ende { padding-top: 10px !important; } #buehne > .ende .podium { flex: 0 0 auto; margin-top: auto; } .rz { min-height: 26px; } .rz .rn { font-size: 16px; } }
/* Leiste mit vielen Spielern: kleinere Abzeichen, die auf dem eigenen Magneten bleiben */
.leute.viele .mensch .abz { width: 13px; height: 13px; top: -4px; right: calc(50% - 15px); box-shadow: 0 0 0 1.5px var(--wand); }
.leute.viele .mensch .abz .ic { width: 9px; height: 9px; }
.meinwort .klein { color: #5a4c08; font-size: 14px; }
/* Tablet und PC: Hinweis zur Wortwahl direkt unter dem Brett statt in der Seitenspalte */
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .luecke { font-size: calc(min(30px, 430px / var(--n))); width: calc(min(42px, 480px / var(--n) - 4px)); height: 48px; }
  .rz .rn { font-size: 17px; }
}
@media (min-width: 700px) and (orientation: portrait) { .luecke { font-size: calc(min(34px, 560px / var(--n))); height: 54px; } }

/* ================================================================== Runde 5 (Muss-Befunde der vierten Bildkritik) */
/* Stift auf den Einstellungszetteln unten rechts, Werte passen auch bei 360 */
.tippbar { top: auto; bottom: 3px; right: 3px; }
@media (max-width: 380px) { .knopf.opt strong { font-size: 18px; } .knopf.opt .klein { font-size: 11px; } .optionen { gap: 6px; } }
/* Magnete und Farben sichtbar mindestens 44 Punkte: Bild füllt die Taste, kleinere Fugen */
.kachel { background-size: 324% 108%; background-position: 1.8% 12%; }
.kachelfeld { gap: 2px; --breite: calc((100% - (var(--spalten) - 1) * 2px) / var(--spalten)); }
.farbe { width: min(100%, 50px); } .farben { gap: 5px 2px; }
@media (max-height: 700px) {
  .farbe { width: min(100%, 45px); } .farben { gap: 3px 2px; }
  .kachelfeld { gap: 1px; --breite: calc((100% - (var(--spalten) - 1) * 1px) / var(--spalten)); } .kachel { max-width: 50px; font-size: 26px; }
  .ablage.kacheln, .ablage.werkzeuge { padding: 5px 4px 6px; }
  /* Podium mittig mit kleinen Kritzeleien statt leerem oberen Drittel */
  .ende { justify-content: center; padding-top: 52px !important; } .ende::before { display: block !important; height: 40px; top: 8px; }
  #buehne > .ende .podium { margin-top: 0; }
}
/* Uhr: größere Ziffer */
.uhr { width: 46px; height: 46px; } .uhr .uz { font-size: 23px; } .uhr circle { stroke-width: 4; }
/* Hinweis zur Wortwahl steht auf dem Brett */
.brettzeile { font-size: 22px; color: #3f4c57; text-align: center; padding: 0 16px; text-wrap: balance; line-height: 1.1; }
.ueber.warte { gap: 22px; }
/* Namen in der Seitenliste brechen nur an Leerzeichen um */
.mensch .mname { overflow-wrap: normal; word-break: normal; hyphens: none; }
@media (min-width: 700px) and (orientation: portrait) { .mensch .mname { font-size: 15px; } .mensch { gap: 8px; padding: 6px 6px; } .brettzeile { font-size: 30px; } }
@media (min-aspect-ratio: 21/20) and (min-height: 560px) { .brettzeile { font-size: 28px; } .uhr { width: 54px; height: 54px; } .uhr .uz { font-size: 27px; } }
/* Tablet quer: Startbrett mit gleichem Abstand oben und unten */
@media (min-aspect-ratio: 21/20) and (min-height: 560px) and (max-height: 860px) {
  #buehne > .start, #buehne > .menue, #buehne > .code { padding-top: 64px !important; padding-bottom: 64px !important; }
  .start::before, .menue::before, .code::before, .start::after, .menue::after, .code::after { height: 52px; }
  .parade .magnet:nth-child(n+7) { display: none; }
}
/* kleines Handy: im Menü keine Kritzeleien, dort stehen drei Karten */
@media (max-height: 700px) { .menue::before, .menue::after { display: none; } #buehne > .menue { padding-top: 14px; padding-bottom: 14px; gap: 9px; } .menue .knopf.karte { min-height: 76px; padding: 10px 14px; } }

/* ================================================================== Runde 6 (Rückmeldung von Taso, 26.11.2026) */
/* erwachsener: keine Kritzeleien und keine Tierreihe, dafür zeigt der Start, worum es geht */
.start::before, .start::after, .menue::before, .menue::after, .code::before, .code::after, .ende::before { display: none !important; }
.parade.aus { display: none; }
#buehne > .start, #buehne > .menue, #buehne > .code { padding-top: 22px !important; padding-bottom: 22px !important; }
#buehne > .ende { padding-top: 18px !important; }
.start { gap: 14px; }
.start .logo { width: min(82%, 380px); }
.unterzeile { font-size: 27px; color: var(--tinte); max-width: none; }
.vorfuehrung { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.demobrett { border-width: 5px; }
.demoluecken { flex: none; gap: 4px; --n: 8; }
.demoluecken .luecke { width: calc(min(30px, 240px / var(--n))); height: 34px; font-size: 19px; }
/* Namenskarte: Charakter ändern */
.namenskarte { flex-wrap: wrap; } .namenskarte .knopf.klein { flex: none; }
/* Lobby: Zurück-Pfeil oben, Einstellungen mit Pfeiltasten in zwei Spalten */
.lobbykopf { flex: none; display: flex; margin: -6px 0 -4px -6px; }
.knopf.zurueckknopf { color: var(--tinte); min-height: 44px; padding: 4px 10px 4px 4px; font-size: 17px; }
.optionen { grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.optfeld { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 6px 7px; }
.optfeld:nth-child(1) { transform: rotate(-.8deg); } .optfeld:nth-child(2) { transform: rotate(.6deg); background: linear-gradient(175deg, #d5f0ff, #b5e0fb); }
.optfeld:nth-child(3) { transform: rotate(.5deg); background: linear-gradient(175deg, #ffd9ea, #ffc1dc); } .optfeld:nth-child(4) { transform: rotate(-.6deg); background: linear-gradient(175deg, #dcf7d0, #c3eeb1); }
.optfeld .klein { color: rgba(40, 40, 40, .66); font-size: 12px; }
.optzeile { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
.optzeile strong { flex: 1; text-align: center; font-size: 23px; line-height: 1; color: var(--tinte); white-space: nowrap; }
.knopf.optpfeil { width: 40px; min-width: 40px; height: 40px; min-height: 40px; color: var(--tinte); position: relative; }
.knopf.optpfeil::before { content: ''; position: absolute; inset: -4px; }
.knopf.optpfeil:disabled { opacity: .3; }
.knopf.optpfeil .ic { width: 22px; height: 22px; }
.sp .aendern { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 #aab3ba; display: flex; align-items: center; justify-content: center; color: var(--blau); margin-right: 2px; }
.sp .aendern .ic { width: 15px; height: 15px; }
/* Charakter-Tafel */
.charkopf { display: flex; align-items: center; justify-content: center; gap: 12px; } .charkopf strong { font-size: 28px; line-height: 1; }
.tiergitter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.tierwahl { width: 62px; height: 62px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tierwahl .magnet { --g: 46px; --farbe: #c4cbd1 !important; }
.tierwahl.gewaehlt { background: #e6efff; box-shadow: 0 0 0 3px var(--blau) inset; } .tierwahl.gewaehlt .magnet { --farbe: var(--blau) !important; }
@media (max-height: 700px) {
  .lobby .codekarte { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 12px; padding: 6px 10px 8px; } .lobby .codekarte .klein { width: 100%; text-align: center; } .codegross { font-size: 30px; }
  .optfeld { padding: 3px 4px 5px; } .knopf.optpfeil { width: 34px; min-width: 34px; height: 34px; min-height: 34px; } .optzeile strong { font-size: 20px; } .optionen { gap: 5px 8px; }
  .lobbykopf { margin: -8px 0 -8px -6px; } .knopf.zurueckknopf { min-height: 38px; } .lobby .sp { min-height: 32px; } .lobby .magnet { --g: 28px; } .sp.leer .magnet { --g: 22px; }
  .start { gap: 9px; } .unterzeile { font-size: 22px; } .demoluecken .luecke { height: 30px; font-size: 17px; } .tierwahl { width: 54px; height: 54px; } .tierwahl .magnet { --g: 40px; }
}
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .lobby { grid-template-areas: 'zurueck zurueck' 'code liste' 'opt liste' 'fuss fuss'; } .lobbykopf { grid-area: zurueck; }
  .optionen { grid-template-columns: 1fr 1fr; }
}

.namenskarte { flex-wrap: wrap; row-gap: 8px; } .namenskarte .nk { flex: 1 1 60%; } .namenskarte .knopf.klein { flex: 1 0 100%; min-height: 40px; }

/* kleines Handy: Lobby-Zeilen ohne Rollenwort (die eigene Zeile ist farbig hinterlegt), Name passt neben den Stift */
@media (max-height: 760px) and (max-width: 699px) {
  .lobby .sp:not(.fort) .spn .klein { display: none; } .lobby .spn strong { font-size: 16px; line-height: 1; }
  .lobby .sp { gap: 6px; padding: 2px 3px 2px 6px; } .sp .aendern { width: 24px; height: 24px; }
}

/* ================================================================== Runde 7 (Taso: Knöpfe und HUD zu generisch und rund, Brett größer) */
/* Knöpfe sehen aus wie mit Marker aufs Brett gezeichnet: kantiger Kasten mit unruhigem Rand und hartem Schatten */
.knopf { border: 2.5px solid var(--tinte); border-radius: 13px 5px 11px 6px / 6px 11px 5px 13px; background: #fff; box-shadow: 3px 4px 0 var(--tinte);
  font: 400 22px/1.1 'Patrick Hand', 'Marker Felt', cursive; letter-spacing: .01em; color: var(--tinte); text-shadow: none; }
.knopf:active:not(:disabled) { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--tinte); }
.knopf.haupt { background: #37b86f; color: #fff; border-color: #10492a; box-shadow: 3px 4px 0 #10492a; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.knopf.haupt:active:not(:disabled) { box-shadow: 0 0 0 #10492a; }
.knopf.rot { background: #ea4c4c; color: #fff; border-color: #7d1717; box-shadow: 3px 4px 0 #7d1717; }
.knopf.haupt:disabled { background: #e6eaed; color: #5d6872; border-color: #8a949c; box-shadow: 3px 4px 0 #8a949c; text-shadow: none; }
.knopf.flach { border: 0; box-shadow: none; background: none; }
.knopf.flach:active:not(:disabled) { transform: none; opacity: .6; }
.knopf.riesig { font-size: 34px; border-width: 3px; border-radius: 18px 7px 16px 8px / 8px 16px 7px 18px; box-shadow: 4px 5px 0 #10492a; }
.knopf.klein { font-size: 19px; }
.knopf.rund { border-radius: 50% 45% 52% 47% / 47% 52% 45% 50%; box-shadow: 2px 3px 0 var(--tinte); }
.knopf.gruen.gedrueckt { color: #10492a; background: #d3f2df; border-color: #10492a; box-shadow: none; transform: translate(3px, 4px); }
.knopf.karte { border-width: 3px; border-radius: 16px 6px 14px 7px / 7px 14px 6px 16px; }
.knopf.karte strong { font: 400 31px/1 'Patrick Hand', cursive; }
.knopf.karte .klein { font: 600 13px/1.25 Nunito, sans-serif; }
.knopf.karte.gruen { background: #37b86f; border-color: #10492a; box-shadow: 4px 5px 0 #10492a; }
.knopf.karte.blau { background: #3f7bea; border-color: #153a86; box-shadow: 4px 5px 0 #153a86; }
.knopf.karte.hell { background: #ffe27a; border-color: #4f3f08; box-shadow: 4px 5px 0 #4f3f08; }
.knopf.sprach { font: 800 15px/1 Nunito, sans-serif; box-shadow: 2px 3px 0 var(--tinte); }
.knopf.sprach.gewaehlt { background: #3f7bea; border-color: #153a86; box-shadow: 2px 3px 0 #153a86; color: #fff; }
.knopf.taste { font: 900 19px/1 Nunito, sans-serif; box-shadow: 2px 3px 0 var(--tinte); border-width: 2px; }
.knopf.wort { border: 0; border-radius: 3px 3px 12px 3px; box-shadow: 0 4px 8px rgba(60, 50, 0, .28); }
.knopf.wort:active:not(:disabled) { transform: scale(.97); box-shadow: 0 2px 4px rgba(60, 50, 0, .28); }
.knopf.optpfeil { box-shadow: 2px 2px 0 var(--tinte); border-width: 2px; background: rgba(255, 255, 255, .85); }
.knopf.optpfeil:disabled { box-shadow: none; }
.lobbyfuss .zeile .knopf.haupt { font-size: 23px; } .lobbyfuss .knopf { font-size: 21px; }
/* Werkzeuge in der Ablage */
.staerke, .knopf.geraet { border: 2.5px solid var(--tinte); border-radius: 11px 5px 10px 6px / 6px 10px 5px 11px; background: #fff; box-shadow: 2px 3px 0 var(--tinte); }
.staerke.gewaehlt, .knopf.geraet.gewaehlt { background: #dbe7ff; box-shadow: none; transform: translate(2px, 3px); }
.knopf.geraet .ic { width: 28px; height: 28px; }
.knopf.leeren.scharf { background: #ea4c4c; border-color: #7d1717; box-shadow: 2px 3px 0 #7d1717; color: #fff; }
.malerzeile .knopf.allezurueck, .malerzeile .knopf.melden { border: 2.5px solid var(--tinte); box-shadow: 2px 3px 0 var(--tinte); background: #fff; color: var(--tinte); border-radius: 50% 45% 52% 47% / 47% 52% 45% 50%; }
/* Kopfleiste: gezeichnete Kästen statt dunkler Kunststoffknöpfe, Runde als Haftzettel, Uhr als Markerkreis */
.kopfknopf { background: #fff; color: var(--tinte); border: 2.5px solid var(--tinte); border-radius: 12px 5px 10px 6px / 6px 10px 5px 12px; box-shadow: 2px 3px 0 var(--tinte); }
.kopfknopf:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--tinte); }
.rundeinfo { background: linear-gradient(175deg, #fff3a8, #ffe27a); border-radius: 2px 2px 9px 2px; box-shadow: 0 3px 5px rgba(60, 50, 0, .25); transform: rotate(-1.6deg); padding: 6px 14px 7px; }
.uhr { box-shadow: 2px 3px 0 var(--tinte); border: 2.5px solid var(--tinte); border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%; }
.uhr svg { inset: 1px; } .uhr .ub { stroke: transparent; }
.schalter .sk { border: 2.5px solid var(--tinte); height: 32px; width: 58px; } .schalter .sn { top: 2px; left: 2px; border: 2px solid var(--tinte); width: 23px; height: 23px; box-shadow: none; } .schalter.an .sn { transform: translateX(26px); }
.tierwahl { border: 2px solid transparent; border-radius: 13px 5px 11px 6px / 6px 11px 5px 13px; } .tierwahl.gewaehlt { box-shadow: none; border-color: var(--tinte); background: #dbe7ff; }
.sp .aendern { box-shadow: 1.5px 2px 0 var(--tinte); border: 2px solid var(--tinte); color: var(--tinte); }
/* Brett größer: beim freien Malen gibt es keine Spielerleiste, Ablage und Zeilen knapper */
body.uebung .leute { display: none; }
.spiel { gap: 5px; padding-bottom: 6px; }
.ablage.werkzeuge { padding: 7px 8px 9px; gap: 6px; } .farben { gap: 5px 2px; }
@media (max-height: 700px) { .farbe { width: min(100%, 42px); } .staerke, .knopf.geraet { height: 42px; min-height: 42px; } .ablage.werkzeuge { padding: 5px 6px 7px; gap: 4px; } .wortzeile { min-height: 38px; } #kopf { height: 50px; } }
.knopf.wort.z0 { background: linear-gradient(175deg, #fff3a8, #ffe27a); }
.knopf.zurueckknopf { font-size: 21px; }

/* Lobby: Liste schrumpft nie unter ihren Inhalt, Zeilen sind so hoch, dass auch zehn Spieler passen */
.lobby .spielerliste { flex: 1 0 auto; align-content: space-evenly; }
.lobby { overflow: hidden auto; }
.lobby .sp { min-height: 44px; } .lobby .magnet { --g: 38px; } .lobby .spn strong { font-size: 18px; } .sp.leer .magnet { --g: 28px; }
@media (min-height: 820px) and (max-width: 699px) { .lobby .sp { min-height: 50px; } .lobby .magnet { --g: 44px; } .lobby .spn strong { font-size: 20px; } }
@media (max-height: 760px) and (max-width: 699px) { .lobby .sp { min-height: 34px; } .lobby .magnet { --g: 30px; } .lobby { gap: 6px; } }
@media (max-width: 380px) { .knopf.optpfeil { width: 34px; min-width: 34px; height: 34px; min-height: 34px; } .optzeile strong { font-size: 19px; } .optfeld { padding: 4px 3px 6px; } .optzeile { gap: 1px; } }
@media (min-aspect-ratio: 21/20) and (min-height: 560px) {
  .lobby { grid-template-columns: 340px minmax(0, 1fr); } .optzeile strong { font-size: 20px; } .knopf.optpfeil { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
  .lobby .spielerliste { align-content: start; }
}
/* kleinstes Handy (360 × 640) mit vollem Raum: noch knapper, damit Start und Einstellungen ohne Blättern passen */
@media (max-height: 660px) and (max-width: 699px) {
  .lobby { padding: 6px 10px 8px; gap: 4px; } .lobby .codekarte .klein { display: none; } .lobby .codekarte { padding: 4px 8px 7px; margin: 0 4px; }
  .lobby .sp { min-height: 29px; } .lobby .magnet { --g: 26px; } .lobby .spielerliste { gap: 3px 8px; margin: 2px 0; } .lobby .spn strong { font-size: 15px; }
  .optfeld .klein { font-size: 10.5px; } .optfeld { padding: 2px 3px 5px; } .knopf.optpfeil { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
  .lobbyfuss { gap: 4px; } .lobbyfuss .info { font-size: 11.5px; } .lobbyfuss .knopf { min-height: 42px; }
  .knopf.zurueckknopf { min-height: 32px; font-size: 19px; } .lobbykopf { margin: -4px 0 -6px -6px; }
}
.optzeile strong { font-size: 21px; min-width: 0; }

.lobby .spn strong, .spn strong { white-space: nowrap; }

/* ================================================================== Runde 9 (Muss-Befunde der Kritik am Endstand) */
/* Pfeile der Einstellungen sichtbar 44 Punkte, Wert mit Luft dazwischen */
.knopf.optpfeil { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.optzeile { gap: 3px; } .optzeile strong { font-size: 20px; overflow: hidden; }
.optfeld { padding: 4px 5px 7px; } .optionen { gap: 7px 8px; }
@media (max-width: 380px) { .knopf.optpfeil { width: 44px; min-width: 44px; height: 44px; min-height: 44px; } .optzeile strong { font-size: 17.5px; letter-spacing: -.01em; } .optfeld { padding: 3px 2px 6px; } .optionen { gap: 6px 6px; } .lobby { padding-left: 8px; padding-right: 8px; } }
@media (min-aspect-ratio: 21/20) and (min-height: 560px) { .knopf.optpfeil { width: 44px; min-width: 44px; height: 44px; min-height: 44px; } .lobby { grid-template-columns: 370px minmax(0, 1fr); } }
/* Abzeichen in der Lobby klein am Rand des Magneten, damit das Tiergesicht frei bleibt */
.sp .magnet .abz { width: 17px; height: 17px; left: -7px; bottom: -6px; box-shadow: 0 0 0 1.5px var(--brett); } .sp .magnet .abz .ic { width: 11px; height: 11px; }
@media (max-height: 760px) and (max-width: 699px) { .sp .magnet .abz { width: 14px; height: 14px; left: -7px; bottom: -5px; } .sp .magnet .abz .ic { width: 9px; height: 9px; } .lobby .sp { padding-left: 9px; } }
/* Werkzeugknöpfe auch am kleinen Handy 44 Punkte hoch */
@media (max-height: 700px) { .staerke, .knopf.geraet { height: 44px; min-height: 44px; } }
/* kleinstes Handy: Platz für die größeren Pfeile schaffen */
@media (max-height: 660px) and (max-width: 699px) {
  .knopf.optpfeil { width: 44px; min-width: 44px; height: 44px; min-height: 44px; } .optfeld > .klein { font-size: 10px; line-height: 1; } .optfeld { padding: 2px 2px 4px; }
  .lobby .sp { min-height: 26px; } .lobby .magnet { --g: 24px; } .lobby .spielerliste { gap: 2px 8px; } .lobbyfuss .info { display: none; }
}
/* unten immer etwas Abstand zum Bildschirmrand (Home-Balken) */
#app { padding-bottom: calc(var(--sb) + 4px); }
/* gelegte Magnete sitzen auf der Höhe der Lücken */
.luecke.voll, .luecke.hinweis, .luecke.richtig { background-size: 324% 108%; background-position: 1.8% 30%; } .luecke.hinweis { background-position: 50% 30%; } .luecke.richtig { background-position: 98.2% 30%; }
.optionen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .optfeld { min-width: 0; } .optzeile { min-width: 0; }
.lobbyfuss { padding: 0 5px 6px 0; }
@media (max-width: 699px) { .optzeile strong { font-size: 18px; } }
/* Runde 10: Pfeile wirklich 44 Punkte (die ältere Regel .knopf.rund.klein war stärker), Werte ohne abgeschnittene Unterlängen */
.knopf.rund.klein.optpfeil { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.optzeile strong { overflow: visible; line-height: 1.3; padding-bottom: 2px; }
.gruenzettel { gap: 5px; } .gruenzettel strong { line-height: 1.15; } .gruenzettel .klein { line-height: 1.2; }

/* lange Werte („gemischt“, „Português“) etwas kleiner, damit sie zwischen die 44-Punkte-Pfeile passen */
@media (max-width: 699px) { .optzeile strong.lang { font-size: 15.5px; letter-spacing: -.01em; } }
@media (max-width: 380px) { .optzeile strong.lang { font-size: 14px; } }
/* Lobby mit zehn Spielern am normalen Handy: Zeilen so hoch, dass alles ohne Blättern passt */
@media (min-height: 700px) and (max-width: 699px) { .lobby .sp { min-height: 40px; } .lobby .magnet { --g: 36px; } .lobby { gap: 8px; } .lobby .spielerliste { gap: 4px 8px; margin: 0; } }
@media (min-height: 661px) and (max-height: 790px) and (max-width: 699px) { .lobby .sp { min-height: 31px; } .lobby .magnet { --g: 28px; } .lobby { gap: 6px; } .lobby .spielerliste { gap: 3px 8px; } }
@media (min-height: 661px) and (max-height: 700px) and (max-width: 699px) { .lobby .sp { min-height: 29px; } .lobby { gap: 5px; } }
@media (min-height: 661px) and (max-height: 700px) and (max-width: 699px) { .lobbyfuss .info { display: none; } }
@media (max-width: 380px) { .lobbyfuss .zeile .knopf, .lobbyfuss .zeile .knopf.haupt { font-size: 19px; padding: 6px 8px; min-width: 0; } .lobbyfuss .zeile .knopf:first-child { flex: 0 1 auto; } .lobbyfuss .zeile { gap: 6px; } }
