/* Mitspielen: baut auf shared/ui.css auf (Farben, Knöpfe, Karten). Schriften liegen schon bei der Sprachmut App. */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/sprachmut-app/fonts/Fredoka-600.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("/sprachmut-app/fonts/Fredoka-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/sprachmut-app/fonts/Inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/sprachmut-app/fonts/Inter-600.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url("/sprachmut-app/fonts/Caveat-700.woff2") format("woff2"); }

:root { --font-hand: "Caveat", cursive; --shadow: 0 6px 0 var(--line); --lime-ink: #1E1233; }
body { min-height: 100dvh; overflow-x: hidden; }
.mp { max-width: 560px; margin: 0 auto; padding: 12px 16px 48px; }
.mp-top { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-bottom: 8px; }
.mp-top .home { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; font: 700 18px var(--font-display); min-height: 44px; }
.mp-top .home::before { content: "←"; font-size: 18px; }
.mp-top .home.root::before { content: none; }
.mp-top .spacer { flex: 1; }
.mp-lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 99px; overflow: hidden; }
.mp-lang button { font: 600 12px var(--font-body); padding: 6px 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; min-height: 32px; }
.mp-lang button[aria-pressed=true] { background: var(--purple); color: #fff; }
.mp-me { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 4px 10px 4px 6px; font: 600 13px var(--font-body); cursor: pointer; min-height: 36px; max-width: 140px; }
.mp-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-me .av { font-size: 20px; line-height: 1; }

h1.mp-title { font-size: clamp(26px, 7vw, 34px); line-height: 1.1; margin: 4px 0 6px; }
.mp-sub { color: var(--muted); margin: 0 0 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hand { font-family: var(--font-hand); font-size: 24px; color: var(--terra); line-height: 1.1; }
.btn { width: 100%; }
.btn.inline { width: auto; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.lime { color: var(--lime-ink); }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; }
.link { background: none; border: 0; font: 600 14px var(--font-body); cursor: pointer; padding: 8px 0; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; }
:root { --accent: var(--purple); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #B9A0FF; } }
:root[data-theme="dark"] { --accent: #B9A0FF; }
/* In Dunkel ist Lila auf Lila zu schwach: Text in Akzentfarbe nimmt das helle Lila. */
.link, .mp-top .home, h1.mp-title, dialog.mp-dialog h2, .score { color: var(--accent); }
.btn.ghost { color: var(--accent); border-color: var(--accent); }

.card { box-shadow: var(--shadow); }
.card.pop { animation: pop .35s var(--ease-bounce, cubic-bezier(.34,1.56,.64,1)); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.rise { animation: rise .35s ease both; }
@media (prefers-reduced-motion: reduce) { .card.pop, .rise { animation: none; } }

/* Person mit Emoji */
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.who .av { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.who.big .av { width: 52px; height: 52px; font-size: 30px; }
.report { background: none; border: 0; color: var(--muted); font: 500 12px var(--font-body); cursor: pointer; padding: 6px; min-height: 32px; }
.report::before { content: "⚑ "; }

/* Intro "So geht's" */
.steps { list-style: none; padding: 0; margin: 8px 0 16px; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font: 700 16px var(--font-display); }

/* Hub */
.games { display: grid; gap: 12px; }
.game { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.game .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; font-size: 30px; }
.game h2 { font-size: 19px; color: var(--ink); }
.game p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.game .meta { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); color: var(--ink); font: 600 12px var(--font-body); padding: 3px 9px; border-radius: 99px; }
.pill.new { background: var(--lime); color: var(--lime-ink); }
.game.soon { opacity: .6; pointer-events: none; }
a.game:hover h2 { color: var(--purple); }

/* Formulare */
textarea, input[type=text] { width: 100%; font: 500 16px var(--font-body); padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); min-height: 46px; }
textarea { resize: vertical; min-height: 64px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); font-size: 14px; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--purple); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0 0; }
.emojis { display: flex; gap: 6px; flex-wrap: wrap; }
.emojis button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-size: 22px; cursor: pointer; padding: 0; }
.emojis button[aria-pressed=true] { border-color: var(--purple); background: var(--soft); }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; font: 700 16px var(--font-display); min-height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.seg button[aria-pressed=true] { border-color: var(--purple); background: var(--purple); color: #fff; }

/* Dialog */
dialog.mp-dialog { border: 0; border-radius: 22px; padding: 20px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(30, 18, 51, .3); }
dialog.mp-dialog::backdrop { background: rgba(30, 18, 51, .45); }
dialog.mp-dialog h2 { font-size: 22px; margin-bottom: 4px; }
.box { background: var(--soft); border-radius: 14px; padding: 12px; }
.linkbox { font: 500 13px ui-monospace, monospace; word-break: break-all; background: var(--bg); border: 1.5px dashed var(--line); padding: 8px 10px; border-radius: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-weight: 600; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); text-align: center; animation: rise .25s ease; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ergebnis-Balken */
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--purple); border-radius: 99px; transition: width .8s ease; }
.score { font: 700 44px var(--font-display); line-height: 1; }
