/* Länder-Quartett – optimiert für iPhone */
/* Einheitliche Emoji auf allen Geräten (TASK-0007): Farbschrift nur mit den
   im Spiel benutzten Emoji, erzeugt von tools/make_emoji_font.py aus Twemoji
   (CC BY 4.0). Steht vorn in der Schriftliste; Zeichen, die sie nicht hat,
   kommen wie bisher aus der Systemschrift. */
@font-face {
  font-family: "Stichfest Emoji";
  src: url("fonts/emoji.woff") format("woff");
  font-display: swap;
}
:root {
  --bg: #0e1c2e;
  --bg2: #18304d;
  --paper: #fbf8f0;
  --ink: #1d232b;
  --muted: #66707b;
  --line: #e6dfcc;
  --accent: #ffc23d;
  --win: #26a35a;
  --lose: #d8443a;
  --tie: #7b5fd0;
  --g: #2563a8; /* Gruppenfarbe, je Karte überschrieben */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Stichfest Emoji", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(120% 70% at 50% 0%, var(--bg2), var(--bg) 75%) fixed, var(--bg);
  color: #fff;
  min-height: 100vh; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }

.screen {
  display: none;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  flex-direction: column; align-items: center;
}
.screen.active { display: flex; }
.screen.center { justify-content: center; text-align: center; }

.logo { font-size: 64px; margin-top: 24px; line-height: 1.1; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; text-align: center; }
h2 { font-size: 22px; font-weight: 700; margin: 12px 0 6px; }
.sub { color: #b4c3d3; font-size: 15px; margin-bottom: 20px; max-width: 340px; text-align: center; line-height: 1.4; }
.sub.small { font-size: 13px; margin: 10px 0 0; min-height: 1.3em; }

.panel {
  width: 100%; max-width: 380px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 18px; margin-bottom: 16px; text-align: left;
}
label { display: block; font-size: 13px; color: #b4c3d3; margin-bottom: 6px; font-weight: 600; }
input, select {
  width: 100%; font: inherit; font-size: 17px; /* ≥16px verhindert Auto-Zoom auf dem iPhone */
  padding: 13px 14px; border-radius: 12px; border: 0; background: #fff; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

.btn {
  font: inherit; font-size: 17px; font-weight: 700; border: 0; border-radius: 14px;
  padding: 15px 20px; cursor: pointer; width: 100%; max-width: 380px;
  transition: transform .1s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #2a1f00; margin-top: 14px; }
.btn.ghost { background: transparent; color: #b4c3d3; border: 1px solid rgba(255,255,255,.25); margin-top: 14px; }
.btn:disabled { opacity: .5; }

.rules { width: 100%; max-width: 380px; font-size: 14px; color: #c4d0dc; line-height: 1.5; }
.rules summary { cursor: pointer; font-weight: 700; color: #fff; padding: 8px 0; }
.rules ul { padding-left: 20px; }
.credits-link { margin-top: auto; padding-top: 24px; font-size: 12px; color: #7f93a8; }

.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent);
  animation: spin 1s linear infinite; margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Spielbildschirm ---------- */
.screen.game { padding-top: calc(10px + var(--safe-t)); }
.scorebar { width: 100%; max-width: 420px; display: flex; gap: 8px; align-items: stretch; }
.score {
  flex: 1; background: rgba(255,255,255,.08); border-radius: 12px; padding: 6px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border: 2px solid transparent; transition: border-color .2s;
}
.score.turn { border-color: var(--accent); }
.score .who { font-size: 13px; color: #c9d5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score b { font-size: 20px; font-variant-numeric: tabular-nums; }
.mid { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #9fb1c4; min-width: 64px; }
.mid .pot { color: #d9c9ff; }
.status { min-height: 22px; margin: 8px 0 6px; font-size: 15px; font-weight: 600; text-align: center; color: #e4ecf4; }
.status.wait::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.compare {
  width: 100%; max-width: 420px; border-radius: 14px; padding: 7px 12px; margin-bottom: 7px; row-gap: 2px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; text-align: center;
  background: rgba(255,255,255,.1);
}
.compare.win { background: rgba(38,163,90,.28); }
.compare.lose { background: rgba(216,68,58,.28); }
.compare.tie { background: rgba(123,95,208,.3); }
.compare .res { grid-column: 1 / -1; font-size: 16px; font-weight: 800; }
.compare .side small { display: block; font-size: 11px; color: #c9d5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare .side b { font-size: 15px; font-variant-numeric: tabular-nums; }
.compare .vs { font-size: 12px; color: #c9d5e1; }
.compare .best b { color: #fff; text-decoration: underline 3px var(--accent); text-underline-offset: 4px; }

.tabs { display: flex; gap: 6px; width: 100%; max-width: 420px; margin-bottom: 7px; }
.tab {
  flex: 1; font: inherit; font-size: 13px; font-weight: 600; padding: 6px; border-radius: 10px; border: 0;
  background: rgba(255,255,255,.08); color: #c9d5e1;
}
.tab.active { background: #fff; color: var(--ink); }

.card-slot { width: 100%; max-width: 420px; display: flex; justify-content: center; }
.actions {
  width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center;
  position: sticky; bottom: 0; z-index: 3; margin-bottom: calc(-16px - var(--safe-b));
  padding: 0 0 calc(12px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(14,28,46,0), var(--bg) 22px);
}
.actions:empty { display: none; }
.actions .btn.primary { margin-top: 18px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.actions .status { margin-top: 22px; }
.status { margin-top: 6px; }

/* ---------- Karte ---------- */
.card {
  width: 100%; background: var(--g); border-radius: 22px; padding: 7px;
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
  animation: deal .35s cubic-bezier(.2,.9,.3,1.2);
  color: var(--ink);
}
@keyframes deal { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.card.waiting { animation: deal .35s ease-out, breathe 2.4s ease-in-out .4s infinite; }
@keyframes breathe { 50% { transform: scale(.985); } }

.c-top { display: flex; align-items: center; gap: 8px; padding: 2px 4px 7px; color: #fff; }
.c-code {
  font-weight: 900; font-size: 21px; letter-spacing: -.02em; line-height: 1;
  background: #fff; color: var(--g); border-radius: 9px; padding: 4px 8px;
}
.c-sight { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.c-body { background: var(--paper); border-radius: 16px; overflow: hidden; }
.c-photo { position: relative; aspect-ratio: 16 / 8.6; background: #ccd; overflow: hidden; }
.c-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-credit {
  position: absolute; right: 0; bottom: 0; font-size: 8.5px; color: #fff; background: rgba(0,0,0,.42);
  padding: 2px 6px; border-top-left-radius: 6px; max-width: 80%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.c-flag {
  position: absolute; left: 8px; bottom: 6px; font-size: 26px; line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.c-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px 0; }
.c-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.c-cap { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.c-fact { font-size: 12px; color: #4d5661; padding: 2px 12px 7px; line-height: 1.35; border-bottom: 1px solid var(--line); }

.c-bottom { display: grid; grid-template-columns: 37% 1fr; gap: 8px; padding: 7px 8px 8px; }
.c-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c-map { width: 100%; aspect-ratio: 5 / 4; border-radius: 8px; display: block; object-fit: cover; border: 1px solid var(--line); }
.c-group { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.c-group b { color: var(--g); font-size: 11px; display: block; }
.c-group span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.c-stats { list-style: none; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.c-stats li {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: #f1ead3; border-radius: 8px; padding: 0 9px; height: 27px;
  font-size: 12.5px; transition: background .15s, transform .1s;
}
.c-stats .lbl { color: #4d5661; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-stats .val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card.choose .c-stats li { cursor: pointer; background: #ffe7a6; box-shadow: inset 0 0 0 1px #f1c04f; }
.card.choose .c-stats li:active { transform: scale(.97); background: var(--accent); }
.c-stats li.hl { color: #fff; }
.c-stats li.hl .lbl { color: rgba(255,255,255,.9); }
.c-stats li.hl.win { background: var(--win); }
.c-stats li.hl.lose { background: var(--lose); }
.c-stats li.hl.tie { background: var(--tie); }

/* Kleine iPhones (SE / mini) etwas kompakter */
@media (max-height: 600px) {
  .c-photo { aspect-ratio: 16 / 7; }
  .c-stats li { height: 25px; }
  .c-fact { display: none; }
}

/* ---------- Verbindung unterbrochen ---------- */
.reconnect {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-t)) 20px calc(20px + var(--safe-b));
  background: rgba(8,16,28,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade .25s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.rc-box {
  width: 100%; max-width: 340px; text-align: center; background: #18304d; border-radius: 20px;
  padding: 22px 20px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center;
}
.rc-icon { font-size: 44px; animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.rc-box h2 { margin: 6px 0 6px; }
.rc-box p { font-size: 15px; color: #c9d5e1; line-height: 1.4; }
.rc-box .spinner { margin: 14px 0 10px; width: 34px; height: 34px; border-width: 3px; }
.rc-hint { font-size: 12.5px !important; color: #8fa3b8 !important; }

/* ---------- Aufdeck-Szene ---------- */
.card { position: relative; }
.c-stats .ic { font-size: 11px; margin-right: 4px; }
.card.picking .c-stats li:not(.pick):not(.hl) { opacity: .3; transition: opacity .4s; }
.c-stats li.pick {
  background: var(--accent) !important; color: #2a1f00; position: relative; z-index: 1;
  transform: scale(1.05); animation: pickPulse .7s ease-in-out infinite alternate;
}
.c-stats li.pick .lbl { color: #2a1f00; }
@keyframes pickPulse {
  from { box-shadow: 0 0 0 2px rgba(255,194,61,.9), 0 4px 12px rgba(0,0,0,.25); }
  to   { box-shadow: 0 0 0 8px rgba(255,194,61,.2), 0 4px 12px rgba(0,0,0,.25); }
}
.pick-banner {
  position: absolute; left: 50%; top: 26%; z-index: 5; transform: translate(-50%, -50%);
  background: rgba(14,28,46,.94); color: #fff; border: 2px solid var(--accent); border-radius: 18px;
  padding: 12px 22px 14px; text-align: center; white-space: nowrap;
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
  animation: bannerIn .5s cubic-bezier(.2,1.5,.4,1);
}
.pick-banner small { display: block; font-size: 13px; color: #c9d5e1; margin-bottom: 2px; }
.pick-banner b { font-size: 26px; letter-spacing: -.01em; }
.pick-banner.out { animation: bannerOut .35s ease-in forwards; }
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
@keyframes bannerOut { to { transform: translate(-50%, -90%) scale(.85); opacity: 0; } }

.compare { animation: fade .25s ease-out; }
.compare.pending { background: rgba(255,255,255,.12); }
.compare .q { display: inline-block; font-size: 20px; animation: qpulse .6s ease-in-out infinite; }
@keyframes qpulse { 50% { transform: scale(1.35); opacity: .55; } }
.compare.pop { animation: popIn .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes popIn { from { transform: scale(.88); } }

.card.glow { box-shadow: 0 0 0 4px var(--win), 0 0 30px rgba(38,163,90,.6), 0 14px 34px rgba(0,0,0,.45); transition: box-shadow .3s; }
.card.glow-tie { box-shadow: 0 0 0 4px var(--tie), 0 14px 34px rgba(0,0,0,.45); }
.card.shake { animation: shake .5s; }
@keyframes shake { 15%, 55% { transform: translateX(-8px) rotate(-1deg); } 35%, 75% { transform: translateX(8px) rotate(1deg); } }
.card.flip { animation: flipIn .55s cubic-bezier(.2,.9,.3,1.1); }
@keyframes flipIn { from { transform: perspective(1000px) rotateY(85deg) scale(.95); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  .card, .compare, .pick-banner, .c-stats li.pick, .card.flip, .card.shake { animation: none !important; }
}

/* ---------- Warteraum ---------- */
.logo.sm { font-size: 44px; margin-top: 8px; }
.players { list-style: none; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.player {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  font: inherit; color: var(--ink); background: var(--paper); border: 0; border-radius: 16px;
  padding: 12px 14px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25);
  animation: plIn .35s ease-out; transition: transform .1s, opacity .2s;
}
.player:active { transform: scale(.97); }
.player:disabled { opacity: .55; }
.player.joining { opacity: 1; outline: 3px solid var(--accent); }
.pl-av {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg2); color: var(--accent); font-weight: 800; font-size: 19px;
}
.pl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-txt b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-txt small { font-size: 13px; color: var(--muted); }
.pl-go { flex: none; background: var(--accent); color: #2a1f00; font-weight: 800; font-size: 15px; padding: 9px 12px; border-radius: 11px; }
.pl-empty {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.25); color: #c4d0dc; font-size: 16px; line-height: 1.35;
}
.pl-empty small { display: block; font-size: 13px; color: #8ea2b6; margin-top: 3px; }
.spinner.sm { width: 28px; height: 28px; border-width: 3px; margin: 0; flex: none; }
.spinner.xs { display: inline-block; width: 16px; height: 16px; border-width: 2px; margin: 0; vertical-align: middle; border-top-color: #2a1f00; border-color: rgba(42,31,0,.25); border-top-color: #2a1f00; }
#scr-lobby .panel { margin-top: 14px; }
.hint { font-size: 12px; color: #8ea2b6; margin-top: 8px; line-height: 1.35; }
@keyframes plIn { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .player { animation: none; } }

/* ---------- Quartett-Auswahl ---------- */
.deck-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.deck {
  font: inherit; color: #fff; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: transform .1s, border-color .15s, background .15s;
}
.deck:active { transform: scale(.96); }
.deck .d-ic { font-size: 30px; line-height: 1.1; }
.deck .d-name { font-size: 14px; font-weight: 700; text-align: center; }
.deck.sel { border-color: var(--accent); background: rgba(255,194,61,.16); }
.pl-av { font-size: 24px; }

/* ---------- Laufende Spiele im Warteraum ---------- */
.games-head { width: 100%; max-width: 380px; margin: 18px 0 2px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #8ea2b6; text-align: left; }
.games-head[hidden] { display: none; }
.game-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255,255,255,.07); color: #dde6ef; animation: plIn .35s ease-out;
}
.game-row .pl-av { width: 36px; height: 36px; font-size: 17px; }
.game-row .pl-txt b { font-size: 16px; }
.game-row .pl-txt small { color: #9fb1c3; }
.g-score { flex: none; display: flex; flex-direction: column; align-items: center; font-size: 17px; font-weight: 800; color: var(--accent); }
.g-score b { white-space: nowrap; }
.g-score small { font-size: 10px; font-weight: 600; color: #8ea2b6; }

/* ---------- Fortsetzungs-Code & Bilanz ---------- */
.code-line { margin: 10px auto 0; font-size: 12px; color: #8ea2b6; text-align: center; }
.code-line b, .rc-hint b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; color: #c4d0dc; user-select: all; -webkit-user-select: all; }
.code-line:has(b:empty) { display: none; }
#resumeForm { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
#resumeCode { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.st-sum { margin: 8px 0; font-weight: 700; }
.st-opp { width: 100%; border-collapse: collapse; font-size: 15px; }
.st-opp td { padding: 5px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.st-score { font-weight: 800; color: var(--accent); text-align: right; white-space: nowrap; }
.st-d { font-size: 12px; color: #8ea2b6; text-align: right; }
.rules .st-last { list-style: none; padding: 0; margin: 12px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.st-last li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sl-txt { flex: 1; display: flex; flex-direction: column; }
.sl-txt small { font-size: 12px; color: #8ea2b6; }

.tie-next { display: block; font-size: 13px; font-weight: 600; opacity: .85; margin-top: 3px; }

.start-note { width: 100%; max-width: 380px; margin: 4px 0 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255,200,60,.14); color: #ffe7a6; font-size: 14px; line-height: 1.4; }
.start-note[hidden] { display: none; }

/* Offline-Modus */
.offline-note { margin: 14px 0 0; font-size: 12px; color: #7f93a8; text-align: center; }
.offline-note.ok { color: #8fd19e; }
.offline-note[hidden], .a2hs[hidden] { display: none; }
.a2hs { position: relative; width: 100%; max-width: 380px; margin: 14px 0 0; padding: 10px 36px 10px 14px; border-radius: 12px; background: rgba(120,170,255,.13); color: #cfe0ff; font-size: 13px; line-height: 1.45; }
.a2hs p { margin: 0; }
.a2hs-ico { display: inline-block; font-weight: 700; }
.a2hs-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; background: none; color: inherit; font-size: 15px; cursor: pointer; }

/* Sprachauswahl */
.lang-pick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: -4px 0 12px; }
.lang-pick .lang { border: 1px solid rgba(255,255,255,.18); background: transparent; color: #9fb1c4; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.lang-pick .lang.sel { background: rgba(255,194,61,.16); border-color: rgba(255,194,61,.6); color: #ffd56b; font-weight: 600; }

/* Bereich „Für Kinder“ */
.deck-sec { grid-column: 1 / -1; margin: 8px 0 -2px; font-size: 13px; font-weight: 700; color: #ffd56b; letter-spacing: .02em; }
.deck.kids { background: rgba(120,200,120,.10); }
.deck.kids.sel { background: rgba(255,194,61,.16); }
/* Kinder-Karten: größere Schrift, weniger Werte */
.card.kids .c-stats li { height: 38px; font-size: 15px; }
.card.kids .c-fact { font-size: 14px; }
.card.kids .c-name { font-size: 26px; }
@media (max-height: 700px) { .card.kids .c-stats li { height: 32px; font-size: 14px; } }

/* Karte ohne Foto: großes Symbol statt leerer Fläche */
.c-photo.nophoto { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, #fff 0%, color-mix(in srgb, var(--g) 22%, #f6efd6) 75%); }
.c-photo.nophoto img, .c-photo.nophoto .c-credit { display: none; }
.c-photo.nophoto::before { content: attr(data-ph); font-size: 92px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.card.kids .c-photo.nophoto .c-flag { display: none; }

/* Offene Spiele auf der Startseite */
.open-box { width: 100%; max-width: 380px; margin: 0 0 14px; }
.open-box .games-head:first-child { margin-top: 0; }
.open-box .pl-empty span { font-size: 13px; color: #9fb1c4; }

.app-version { margin: 10px 0 0; font-size: 11px; color: #5f7287; text-align: center; }
.srv-state { margin: 4px 0 0; font-size: 11px; color: #6f8399; text-align: center; width: 100%; max-width: 380px; }
.srv-state:empty { display: none; }
/* Knopf Pause/Beenden im Spiel */
.btn.small { width: auto; padding: 8px 16px; font-size: 14px; margin: 12px auto 0; display: block; }
#gameMenu .btn { width: 100%; margin-top: 10px; }
/* Kopier-Knopf und "Wer bist du?" */
.copy-btn { margin-left: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; vertical-align: middle; }
.copy-btn.done { border-color: #8fd19e; color: #8fd19e; }
#resumeMsg .who-q { display: block; margin: 8px 0 4px; font-weight: 700; }
#resumeMsg .who-btn { display: inline-block; margin: 4px; }

/* Vollbild-App (Home-Bildschirm): oben mindestens Platz für Uhrzeit/Akku lassen –
   iPads melden dort teils keinen Sicherheitsabstand */
html.standalone { --safe-t: max(env(safe-area-inset-top, 0px), 24px); }
html.standalone.ipad { --safe-t: max(env(safe-area-inset-top, 0px), 28px); }

/* Werte nie abschneiden – lieber die Beschriftung kürzen; Schrift passt sich schmalen Handys an
   (Safari/iPhone-Schrift läuft etwas breiter als andere) */
.c-stats li { font-size: clamp(11px, 3.15vw, 12.5px); }
.c-stats .lbl { min-width: 0; flex: 1 1 auto; }
.c-stats .val { flex: none; }
.card.kids .c-stats li { font-size: clamp(13px, 3.9vw, 15px); }
/* rechte Spalte darf schmaler werden als ihr Inhalt (sonst rutschen die Werte unter den Kartenrand) */
.c-bottom { grid-template-columns: 37% minmax(0, 1fr); }
.c-stats { min-width: 0; }

/* ---------- Wer ist dran? deutlich zeigen ---------- */
.status.myturn {
  display: inline-block; margin: 8px auto 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: #2a1f00; font-size: 17px; font-weight: 800;
  box-shadow: 0 0 0 3px rgba(255,194,61,.35), 0 6px 18px rgba(255,194,61,.35);
  animation: myturnPulse 1.6s ease-in-out infinite;
}
.status.myturn::before { content: "👉 "; }
.status.wait {
  display: inline-block; margin: 8px auto 8px; padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: #b9c7d6; font-weight: 600;
}
.status.wait::before { content: "⏳ "; }
.score.turn {
  border-color: var(--accent); background: rgba(255,194,61,.20);
  box-shadow: 0 0 0 2px var(--accent), 0 0 16px rgba(255,194,61,.45);
}
.score.turn .who { color: #ffe08a; font-weight: 700; }
.card.choose { box-shadow: 0 0 0 3px var(--accent), 0 0 26px rgba(255,194,61,.55); animation: myturnGlow 1.6s ease-in-out infinite; }
@keyframes myturnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes myturnGlow { 0%, 100% { box-shadow: 0 0 0 3px var(--accent), 0 0 14px rgba(255,194,61,.35); } 50% { box-shadow: 0 0 0 3px var(--accent), 0 0 30px rgba(255,194,61,.75); } }
@media (prefers-reduced-motion: reduce) { .status.myturn, .card.choose { animation: none; } }
