/* Lizzy's Arcade: verspielter Arcade Look, mobil zuerst, hell und dunkel.
   Farben nur über die Tokens unten, Komponenten nutzen nie feste Farbwerte. */

@font-face { font-family: "Bungee"; src: url("../fonts/bungee-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f3f1fb;
  --bg-2: #e9e5f7;
  --card: #ffffff;
  --ink: #1b1530;
  --ink-2: #5a5378;
  --ink-3: #8a84a6;
  --line: #d9d3ee;
  --pink: #e8338c;
  --pink-soft: #ffe3f1;
  --cyan: #0b9e8e;
  --cyan-soft: #d8f6f1;
  --yellow: #b98500;
  --yellow-soft: #fff3cc;
  --danger: #c62828;
  --shadow: 0 3px 0 var(--line);
  --display: "Bungee", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16142a;
    --bg-2: #1e1b38;
    --card: #232042;
    --ink: #f1eeff;
    --ink-2: #b4addb;
    --ink-3: #7d76a6;
    --line: #38335f;
    --pink: #ff4fa3;
    --pink-soft: #45204a;
    --cyan: #3ee6d1;
    --cyan-soft: #173f43;
    --yellow: #ffd23f;
    --yellow-soft: #433a1c;
    --danger: #ff6b6b;
    --shadow: 0 3px 0 #0e0c1d;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], [x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body);
  touch-action: manipulation;
}
a { color: var(--pink); }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; hyphens: auto; overflow-wrap: break-word; }
h1 { font: 400 clamp(26px, 7vw, 40px)/1.1 var(--display); }
h2 { font: 400 20px/1.2 var(--display); }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow::before { content: "> "; color: var(--pink); }

/* Kopfzeile, dünn gehalten */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 2px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.topbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); min-height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 400 17px/1 var(--display); }
.logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lizzy { image-rendering: pixelated; flex: none; }
.nav { position: relative; }
.nav-toggle { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); cursor: pointer; padding: 0; }
.avatar { display: inline-grid; place-items: center; width: 100%; height: 100%; font: 400 18px/1 var(--display); color: var(--pink); }
.nav-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; }
.nav-panel a, .nav-panel button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink);
  text-decoration: none; font: 600 15px var(--body); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.nav-panel a:hover, .nav-panel button:hover { background: var(--bg-2); }
.nav-accounts { border-top: 2px solid var(--line); margin-top: 4px; padding-top: 4px; }
.nav-accounts button { color: var(--ink-2); }
.nav-who { padding: 8px 12px 10px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.nav-who small { display: block; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* Hinweise unter der Kopfzeile, im Fluss statt über dem Inhalt */
.notices { max-width: 960px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 8px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.notice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: var(--radius);
  background: var(--yellow-soft); color: var(--ink); text-decoration: none; border: 2px solid color-mix(in srgb, var(--yellow) 50%, transparent); }
.notice.invite { background: var(--pink-soft); border-color: color-mix(in srgb, var(--pink) 50%, transparent); }
.notice-emoji { font-size: 22px; }
.notice-text { flex: 1; min-width: 0; font-weight: 600; }
.notice b { font: 400 13px var(--display); color: var(--pink); white-space: nowrap; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
.notice { animation: wiggle .4s ease-in-out 2; }

/* Inhalt */
main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
main.narrow { max-width: 460px; }
main.reading { max-width: 720px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.flash { background: var(--cyan-soft); color: var(--ink); border-radius: var(--radius); padding: 12px 16px; font-weight: 600; }

/* Knöpfe und Formulare: mindestens 44 px hoch */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 99px;
  border: 0; background: var(--pink); color: #fff; font: 400 15px/1 var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--pink) 55%, #000); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--pink) 55%, #000); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; font: 700 15px var(--body); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 13px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: 16px var(--body); color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 12px;
  min-height: 48px; padding: 10px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--pink); outline: none; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--pink); }
.error { color: var(--danger); font-weight: 600; font-size: 14px; }
.hint { color: var(--ink-3); font-size: 14px; }

/* Anmeldung */
.login-hero { display: flex; align-items: center; gap: 18px; }
.login-hero h1 { font-size: clamp(24px, 7vw, 32px); margin: 6px 0 4px; }

/* Spielkacheln */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--pink); }
.tile .emoji { font-size: 34px; line-height: 1; }
.tile b { font-weight: 700; font-size: 16px; line-height: 1.25; }
.tile small { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.tile.live { border-color: color-mix(in srgb, var(--pink) 40%, var(--line)); }
.tile.score { border-color: color-mix(in srgb, var(--cyan) 40%, var(--line)); }
.chip { display: inline-flex; align-items: center; gap: 4px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); width: fit-content; }
.chip.pink { background: var(--pink-soft); color: var(--pink); }
.chip.cyan { background: var(--cyan-soft); color: var(--cyan); }
.chip.yellow { background: var(--yellow-soft); color: var(--yellow); }
.tile .chip { margin-top: auto; }

/* Platzhalter eines Spiels */
.soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 18px; }
.soon .emoji { font-size: 64px; line-height: 1; }

/* Lobby */
.lobby-emoji { font-size: 48px; line-height: 1; }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
.room-row form { margin: 0; }
.modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.modes legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.mode { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.mode:has(input:checked) { border-color: var(--pink); background: var(--pink-soft); }
.mode input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pink); }
.mode small { display: block; color: var(--ink-2); font-size: 14px; }

/* Raum: Fokus auf das Feld, Hinweise darüber, nie darauf */
main.play { max-width: 560px; gap: 14px; padding-top: 12px; }
.room { display: flex; flex-direction: column; gap: 14px; }
.room-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.back { color: var(--ink-2); text-decoration: none; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.players { display: flex; gap: 8px; flex-wrap: wrap; }
.player { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; border: 2px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 15px; }
.player i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); opacity: .4; }
.player.seat-0 i { background: var(--pink); }
.player.seat-1 i { background: var(--cyan); }
.player.present i { opacity: 1; }
.player.active.seat-0 { border-color: var(--pink); }
.player.active.seat-1 { border-color: var(--cyan); }
.room-status { min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.room-status p { font: 400 18px/1.25 var(--display); }
.room.my-turn .room-status p { color: var(--pink); }
.timer { position: relative; height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.timer span { position: absolute; inset: 0 auto 0 0; background: var(--cyan); border-radius: 99px; }
.timer.low span { background: var(--pink); }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.board-wrap { display: flex; justify-content: center; }
.board { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.seat-0 { --seat: var(--pink); }
.seat-1 { --seat: var(--cyan); }

.board-tictactoe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 360px); }
.board-tictactoe .cell { aspect-ratio: 1; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
  font: 400 clamp(40px, 15vw, 72px)/1 var(--display); color: var(--seat, var(--ink)); cursor: pointer; padding: 0; box-shadow: var(--shadow); }
.board-tictactoe .cell:disabled { cursor: default; }
.board-tictactoe .cell:not(:disabled):hover { border-color: var(--pink); }
.board-tictactoe .cell.win { background: var(--yellow-soft); border-color: var(--yellow); }

.board-connect4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: min(100%, 480px); padding: 8px;
  background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius); }
.board-connect4 .col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 4px; padding: 3px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.board-connect4 .col:disabled { cursor: default; }
.board-connect4 .col:not(:disabled):hover { background: color-mix(in srgb, var(--me) 18%, transparent); }
.disc { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--bg); box-shadow: inset 0 3px 0 rgb(0 0 0 / .18); }
.disc.seat-0, .disc.seat-1 { background: var(--seat); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .22); }
.disc.win { outline: 3px solid var(--yellow); outline-offset: 1px; }
@keyframes drop { from { transform: translateY(-260%); } to { transform: translateY(0); } }
.disc.last { animation: drop .28s cubic-bezier(.5, 0, .8, 1); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.board-tictactoe .cell.last { animation: pop .22s ease-out; }

/* Admin */
.settings-list { display: flex; flex-direction: column; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; }
.setting > div { min-width: 0; }
.switch { position: relative; flex: none; width: 52px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); transition: transform .15s; }
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
th { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-top: 0; }

label.xp { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
label.xp input { width: 76px; min-height: 40px; padding: 6px 10px; }
.setting.account { flex-wrap: wrap; align-items: flex-end; }
.setting.account .field { flex: 1 1 160px; }

/* Rechtliches */
.legal { display: flex; flex-direction: column; gap: 12px; }
.legal h2 { font-size: 17px; margin-top: 12px; }

/* Fußzeile und feste Links */
.footer { display: flex; justify-content: center; gap: 12px; padding: 16px 16px calc(52px + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: 13px; }
.legal-fixed { position: fixed; right: max(8px, env(safe-area-inset-right, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 2px 6px; font-size: 12px; }
.legal-fixed a { color: var(--ink-2); text-decoration: none; padding: 6px 8px; }
/* Beim Spielen nichts Festes über dem Feld: die Links rutschen ans Seitenende */
body.playing .legal-fixed { position: static; margin: -40px auto 16px; width: fit-content; }
body.playing .footer { padding-bottom: 48px; }

/* Bewegung nur, wenn erwünscht */
@media (prefers-reduced-motion: reduce) {
  .disc.last, .board-tictactoe .cell.last, .notice { animation: none; }
  .btn, .switch span, .switch span::after { transition: none; }
}

/* Level, Profil und Duell */
.lvl { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-decoration: none; color: var(--ink); font-size: 12px; }
.lvl-bar, .bar { display: block; width: 56px; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.lvl-bar > span, .bar > span { display: block; height: 100%; background: var(--pink); }
.bar { width: 100%; height: 12px; border-radius: 6px; border: 2px solid var(--line); }
.lvl-big { font: 400 34px/1 var(--display); color: var(--pink); background: var(--pink-soft); border-radius: var(--radius); min-width: 64px; height: 64px; display: grid; place-items: center; }
.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.xp-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.xp-list li:last-child { border-bottom: 0; }
.xp-list b { color: var(--cyan); }
.name-form { align-items: flex-end; }
.name-form .field { flex: 1 1 180px; }
.periods { display: flex; flex-wrap: wrap; gap: 8px; }
.periods .chip { text-decoration: none; font-size: 12px; padding: 8px 12px; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.vs-side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vs-side:first-child { justify-content: flex-end; }
.vs-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-num { font: 400 clamp(36px, 12vw, 56px)/1 var(--display); color: var(--pink); }
.vs-side:last-child .vs-num { color: var(--cyan); }
.vs-colon { font: 400 32px/1 var(--display); color: var(--ink-3); }
.vs-sub { text-align: center; }
.ranking { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ranking li { display: grid; grid-template-columns: 2ch 1fr auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ranking li:last-child { border-bottom: 0; }
.rk-pos { font: 400 20px/1 var(--display); color: var(--ink-3); text-align: center; }
.rk-who { display: grid; gap: 2px; min-width: 0; }
.rk-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .vs-num { font-size: clamp(28px, 9vw, 40px); color: var(--ink-2); }
.ranking .rk-1 .vs-num { font-size: clamp(36px, 12vw, 56px); color: var(--pink); }
.ranking .rk-1 .rk-pos { color: var(--pink); }
.ranking .rk-2 .vs-num { color: var(--cyan); }
.duel-card { display: grid; gap: 12px; text-decoration: none; color: var(--ink); }
.duel-table { width: 100%; border-collapse: collapse; }
.duel-table th, .duel-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.duel-table .num { text-align: right; }
.duel-table thead th { font: 500 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.levelup { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.levelup .card { text-align: center; align-items: center; justify-items: center; max-width: 320px; width: 100%; }
.duel-table tbody th { font: 600 15px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); }
.curve-inputs .field { flex: 1 1 140px; }
.curve { width: 100%; height: auto; display: block; }
.curve rect { fill: var(--cyan-soft); }
.curve rect.mark { fill: var(--pink); }
.curve line { stroke: var(--line); stroke-width: 1; }
.curve-table .num { text-align: right; }
.curve-table tbody th { font: 600 15px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); }

/* Highscorespiele: gemeinsamer Rahmen */
@font-face { font-family: "Press Start 2P"; src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
.arcade { display: flex; flex-direction: column; gap: 12px; }
.arcade-stage { display: flex; justify-content: center; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
/* Wischen nur dort sperren, wo ein Spiel selbst Wischgesten auswertet, sonst lässt sich die Seite nicht mehr scrollen */
.arcade-snake canvas, .arcade-climb canvas { touch-action: none; }
.arcade-msg { min-height: 1.5em; text-align: center; font-weight: 600; color: var(--ink-2); }
.arcade-controls { display: flex; justify-content: center; }
.arcade-hint { margin: 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.arcade-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.keysize { display: inline-flex; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; }
.keysize button { border: 0; background: transparent; color: var(--ink-2); font: 500 12px var(--mono); min-width: 40px; min-height: 40px; cursor: pointer; }
.keysize button[aria-pressed="true"] { background: var(--pink-soft); color: var(--pink); }
.arcade-result { text-align: center; display: grid; gap: 6px; justify-items: center; }
.result-score { font: 400 clamp(32px, 10vw, 48px)/1.1 var(--display); color: var(--pink); }
.result-xp { color: var(--cyan); font-size: 18px; }
.board-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.scoreboard { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.scoreboard li { display: flex; justify-content: space-between; gap: 12px; }
.scoreboard li.me span { font-weight: 700; color: var(--pink); }
.focus-close { display: none; }

/* Steuerkreuz, Größe je Gerät über data-keys */
.dpad { --k: 64px; display: grid; grid-template-columns: repeat(3, var(--k)); grid-template-rows: repeat(3, var(--k)); gap: 6px; touch-action: manipulation; }
.arcade[data-keys="s"] .dpad { --k: 48px; }
.arcade[data-keys="l"] .dpad { --k: 84px; }
.dpad button { border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-size: calc(var(--k) * .36); box-shadow: var(--shadow); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.dpad button:active { transform: translateY(3px); box-shadow: none; }
.d-up { grid-area: 1 / 2; } .d-left { grid-area: 2 / 1; } .d-mid { grid-area: 2 / 2; } .d-right { grid-area: 2 / 3; } .d-down { grid-area: 3 / 2; }
@keyframes padswap { 0% { transform: rotate(0); } 30% { transform: rotate(-8deg) scale(1.05); } 60% { transform: rotate(8deg) scale(1.05); } 100% { transform: rotate(0); } }
.dpad.swap { animation: padswap .6s ease-in-out 2; }

/* Nur Spiel: Kopfzeile, Hinweise, Bestenliste und Fuß weg, Schließen oben rechts außerhalb des Felds */
body.focus .topbar, body.focus .notices, body.focus .footer, body.focus .legal-fixed, body.focus .arcade-boards,
body.focus .room-top .back, body.focus .arcade-top .chip, body.focus [data-focus] { display: none !important; }
.focus-btn { display: none; }
body.focus main.play { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.arcade-top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
body.focus .focus-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--card); color: var(--ink); font: 400 16px/1 var(--display); text-decoration: none; cursor: pointer; flex: none; }
body.focus .arcade-snake .focus-btn { border-radius: 0; border-color: var(--c64-fg); background: transparent; color: var(--c64-fg); }

/* Snake im C64 Look, Farben wie ../c64-dashboard */
.arcade-snake { --c64-bg: #004B87; --c64-fg: #8AB8EB; --c64-green: #00FF00; background: var(--c64-bg); color: var(--c64-fg); border: 10px solid var(--c64-fg);
  border-radius: 6px; padding: 12px; font-family: "Press Start 2P", var(--mono); }
.arcade-snake .back, .arcade-snake .arcade-msg { color: var(--c64-fg); font: 400 11px/1.6 "Press Start 2P", var(--mono); }
.arcade-snake .chip { background: transparent; border: 2px solid var(--c64-fg); color: var(--c64-fg); border-radius: 0; font-family: "Press Start 2P", var(--mono); font-size: 9px; }
.arcade-snake .btn { border-radius: 0; background: var(--c64-fg); color: var(--c64-bg); font-family: "Press Start 2P", var(--mono); font-size: 11px; box-shadow: none; }
.arcade-snake .btn.ghost { background: transparent; color: var(--c64-fg); border-color: var(--c64-fg); }
.arcade-snake .keysize { border-color: var(--c64-fg); border-radius: 0; }
.arcade-snake .keysize button { color: var(--c64-fg); font-family: "Press Start 2P", var(--mono); font-size: 10px; }
.arcade-snake .keysize button[aria-pressed="true"] { background: var(--c64-fg); color: var(--c64-bg); }
.arcade-snake .error { color: #FF6B6B; }
.c64 { width: min(100%, 420px); display: grid; gap: 8px; }
.c64 canvas { width: 100%; height: auto; aspect-ratio: 1; display: block; image-rendering: pixelated; border: 2px solid var(--c64-fg); }
.c64-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--c64-green); text-shadow: 0 0 4px rgba(138, 184, 235, .6); }
.c64-pad button { border-radius: 0; background: transparent; border-color: var(--c64-fg); color: var(--c64-fg); box-shadow: none; font-family: "Press Start 2P", var(--mono); font-size: calc(var(--k) * .26); }
.c64-pad button:active { background: var(--c64-fg); color: var(--c64-bg); }

/* Reaktionstest */
.reaction-pad { width: 100%; min-height: min(62vh, 420px); border: 0; border-radius: var(--radius); display: grid; place-content: center; gap: 8px; text-align: center;
  font: inherit; color: var(--ink); background: var(--bg-2); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.reaction-pad b { font: 400 clamp(32px, 11vw, 56px)/1.1 var(--display); }
.reaction-pad small { color: inherit; opacity: .8; }
.reaction-times { font: 500 13px var(--mono); opacity: .8; min-height: 1.4em; }
.reaction-pad[data-phase="wait"] { background: var(--pink); color: #fff; }
.reaction-pad[data-phase="go"] { background: #19c37d; color: #06301d; }
.reaction-pad[data-phase="early"] { background: var(--yellow-soft); color: var(--yellow); }
.reaction-pad[data-phase="done"] { background: var(--cyan-soft); color: var(--cyan); }

/* 2048 */
.g2048 { width: min(100%, 420px); display: grid; gap: 10px; }
.g2048-head { display: flex; justify-content: space-between; font: 500 13px var(--mono); color: var(--ink-2); }
.g2048-head b { color: var(--ink); font-size: 16px; }
.g2048-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; border-radius: var(--radius); background: var(--bg-2); aspect-ratio: 1; touch-action: none; }
.tile2048 { border-radius: 10px; background: var(--card); display: grid; place-items: center; font: 400 clamp(18px, 7vw, 32px)/1 var(--display); color: var(--ink); }
.tile2048:empty { background: color-mix(in srgb, var(--card) 45%, transparent); }
.tile2048.v8, .tile2048.v16 { background: var(--yellow-soft); color: var(--yellow); }
.tile2048.v32, .tile2048.v64 { background: var(--pink-soft); color: var(--pink); }
.tile2048.v128, .tile2048.v256, .tile2048.v512 { background: var(--cyan-soft); color: var(--cyan); font-size: clamp(16px, 6vw, 28px); }
.tile2048.v1024, .tile2048.v2048, .tile2048.v4096 { background: var(--pink); color: #fff; font-size: clamp(14px, 5vw, 24px); }
@keyframes tilepop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes bump { 50% { transform: scale(1.12); } }
.tile2048.new { animation: tilepop .14s ease-out; }
.tile2048.merged { animation: bump .14s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .dpad.swap, .tile2048.new, .tile2048.merged { animation: none; }
}
.duel-table td.lead { color: var(--pink); font-weight: 700; }

/* Spiele aus v0.5 */
.board-score { text-align: center; font: 500 13px var(--mono); color: var(--ink-2); margin-bottom: 8px; }
.board-hint { text-align: center; margin-top: 8px; }
.board-memory, .board-treasure, .board-battleship, .board-fastfinger { width: min(100%, 440px); }

.mem-grid, .treasure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card-mem, .tcell { aspect-ratio: 1; border: 2px solid var(--line); border-radius: 12px; background: var(--pink-soft); padding: 0;
  font-size: clamp(26px, 10vw, 44px); cursor: pointer; box-shadow: var(--shadow); color: var(--ink); touch-action: manipulation; }
.card-mem:not(.up) { background: repeating-linear-gradient(45deg, var(--pink-soft) 0 8px, var(--card) 8px 16px); }
.card-mem.up { background: var(--card); }
.card-mem.found { border-color: var(--seat); background: color-mix(in srgb, var(--seat) 14%, var(--card)); }
.card-mem.miss { border-color: var(--danger); }
.card-mem:disabled, .tcell:disabled { cursor: default; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.card-mem.up.last { animation: flip .18s ease-out; }

.tcell { background: var(--card); font: 400 clamp(16px, 5.5vw, 26px)/1 var(--display); border-radius: 8px; }
.treasure-grid { gap: 5px; }
.tcell.open { border-color: var(--seat); }
.tcell.heat-1 { background: #ff6b6b; color: #fff; } .tcell.heat-2 { background: #ff9f68; color: #3a1500; }
.tcell.heat-3 { background: #ffd36b; color: #3a2a00; } .tcell.heat-4 { background: #b9e6a0; color: #173300; }
.tcell.heat-5 { background: #9fd8f5; color: #00304a; } .tcell.heat-6 { background: #c9c1ee; color: #231a5a; }
.tcell.found { background: var(--yellow-soft); border-color: var(--yellow); font-size: clamp(20px, 7vw, 32px); }
.tcell.last { animation: pop .22s ease-out; }

.bs-label { font: 500 12px var(--mono); color: var(--ink-2); margin: 10px 0 6px; }
.bs-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 6px; background: var(--cyan-soft); border-radius: 12px; }
.bs-grid.own:not(.big) { width: 62%; margin: 0 auto; }
.bs-cell { aspect-ratio: 1; border: 0; border-radius: 4px; background: color-mix(in srgb, var(--card) 70%, transparent); padding: 0; position: relative; }
button.bs-cell { cursor: pointer; touch-action: manipulation; }
button.bs-cell:disabled { cursor: default; }
.bs-cell.ship { background: var(--ink-3); }
.bs-cell.sunk { background: var(--ink-2); }
.bs-cell.miss::after, .bs-cell.hit::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--ink-3); }
.bs-cell.hit::after { inset: 18%; background: var(--danger); }
.bs-cell.last { outline: 2px solid var(--yellow); outline-offset: -1px; }
.bs-bar { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

.ff-pad { width: 100%; min-height: min(56vh, 380px); border: 0; border-radius: var(--radius); display: grid; place-content: center; gap: 8px;
  text-align: center; font: inherit; color: var(--ink); background: var(--bg-2); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ff-pad b { font: 400 clamp(32px, 11vw, 56px)/1.1 var(--display); }
.ff-pad[data-phase="wait"] { background: var(--pink); color: #fff; }
.ff-pad[data-phase="go"] { background: #19c37d; color: #06301d; }
.ff-pad[data-phase="early"] { background: var(--yellow-soft); color: var(--yellow); }
.ff-pad[data-phase="win"] { background: var(--cyan-soft); color: var(--cyan); }
.ff-pad[data-phase="lose"], .ff-pad[data-phase="shown"] { background: var(--bg-2); }
@media (prefers-reduced-motion: reduce) {
  .card-mem.up.last, .tcell.last { animation: none; }
}

/* Startfläche über dem Feld statt eines Start Knopfs */
.arcade-field { position: relative; display: flex; justify-content: center; }
.arcade-field > .arcade-stage { width: 100%; }
.arcade-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; gap: 6px; border: 0; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--ink); cursor: pointer; text-align: center;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.arcade-overlay b { font: 400 clamp(20px, 6vw, 30px)/1.2 var(--display); color: var(--pink); }
.arcade-overlay small { font: 500 12px var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; }
.arcade-snake .arcade-overlay { border-radius: 0; background: rgba(0, 75, 135, .72); }
.arcade-snake .arcade-overlay b { font: 400 13px/1.6 "Press Start 2P", var(--mono); color: var(--c64-green); }
.arcade-snake .arcade-overlay small { font-family: "Press Start 2P", var(--mono); font-size: 9px; color: var(--c64-fg); }
@keyframes blink { 50% { opacity: .35; } }
.arcade-overlay b { animation: blink 1.2s steps(2) infinite; }
@media (prefers-reduced-motion: reduce) { .arcade-overlay b { animation: none; } }

/* Einladung als Kasten in der Mitte */
.room.inviting .players, .room.inviting .room-status { display: none; }
.room.inviting .board-wrap { min-height: 60vh; align-items: center; }
body.focus .room.inviting .board-wrap { min-height: 80vh; }
.room.inviting .board { display: block; width: min(100%, 380px); padding: 0; background: none; border: 0; }
.invite-card { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 20px; }
.invite-card h2 { font-size: 22px; }
.invite-emoji { font-size: 56px; line-height: 1; }
.invite-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.invite-actions .btn { min-width: 130px; }

/* Badges und Serie */
.badge-big { font-size: 64px; line-height: 1; }
.weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.weeks li { aspect-ratio: 1; border-radius: 10px; background: var(--bg-2); border: 2px solid var(--line); display: grid; place-items: end center; padding-bottom: 4px; }
.weeks li span { font: 500 9px var(--mono); color: var(--ink-3); }
.weeks li.on { background: var(--pink); border-color: var(--pink); }
.weeks li.on span { color: #fff; }
.weeks li.now { outline: 2px dashed var(--ink-3); outline-offset: 2px; }
.badge-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 12px 8px; border-radius: 12px; border: 2px dashed var(--line); color: var(--ink-3); }
.badge .badge-emoji { font-size: 30px; filter: grayscale(1); opacity: .45; }
.badge b { font-size: 14px; }
.badge small { font-size: 12px; line-height: 1.3; }
.badge.earned { border: 2px solid var(--yellow); background: var(--yellow-soft); color: var(--ink); }
.badge.earned .badge-emoji { filter: none; opacity: 1; }
.badge.earned small { color: var(--ink-2); }

.lizzy-egg { border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@keyframes hop { 50% { transform: translateY(-8px); } }
.lizzy-egg.hop { animation: hop .2s steps(2); }
@media (prefers-reduced-motion: reduce) { .lizzy-egg.hop { animation: none; } }

/* Wortduell */
.board-wordduel { width: min(100%, 460px); display: grid; gap: 10px; }
.wd-play { display: grid; gap: 12px; }
.wd-word { min-height: 48px; text-align: center; font: 400 clamp(26px, 9vw, 40px)/48px var(--display); letter-spacing: .12em; color: var(--pink); text-transform: uppercase; }
.wd-letters { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.wd-letter { aspect-ratio: .8; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font: 400 clamp(18px, 6vw, 28px)/1 var(--display); padding: 0; cursor: pointer; touch-action: manipulation; }
.wd-letter:disabled { opacity: .3; box-shadow: none; }
.wd-keys { display: flex; gap: 8px; justify-content: center; }
.wd-keys .btn { min-width: 76px; }
.wd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wd-list li { font: 500 13px var(--mono); padding: 4px 10px; border-radius: 99px; background: var(--cyan-soft); color: var(--cyan); }
.wd-end { display: grid; gap: 14px; }
.wd-result { text-align: center; font: 400 28px/1.2 var(--display); color: var(--pink); }
.wd-ready { min-height: 200px; }

/* Tagesrätsel */
.sudoku { width: min(100%, 440px); display: grid; gap: 8px; }
.sudoku-head { display: flex; justify-content: space-between; font: 500 14px var(--mono); color: var(--ink-2); }
.sudoku-head [data-time] { color: var(--ink); font-size: 18px; }
.sudoku-grid { display: grid; grid-template-columns: repeat(9, 1fr); border: 3px solid var(--ink-2); border-radius: 8px; overflow: hidden; background: var(--card); }
.sc { aspect-ratio: 1; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); color: var(--cyan);
  font: 600 clamp(16px, 5.5vw, 24px)/1 var(--body); padding: 0; position: relative; cursor: pointer; touch-action: manipulation; }
.sc.br { border-right: 3px solid var(--ink-2); }
.sc.bb { border-bottom: 3px solid var(--ink-2); }
.sc.given { color: var(--ink); font-weight: 700; }
.sc.near { background: var(--bg-2); }
.sc.same { background: var(--cyan-soft); }
.sc.sel { background: var(--pink-soft); outline: 2px solid var(--pink); outline-offset: -2px; z-index: 1; }
.sc.bad { color: var(--danger); }
.sc .notes { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); font: 500 clamp(7px, 2.2vw, 10px)/1.1 var(--mono); color: var(--ink-3); place-items: center; }
.sc .notes i { font-style: normal; }
.arcade[data-state="paused"] .sudoku-grid { filter: blur(6px); }
.sudoku-pad { --k: 44px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: min(100%, 440px); }
.arcade[data-keys="s"] .sudoku-pad { --k: 36px; } .arcade[data-keys="l"] .sudoku-pad { --k: 56px; }
.sudoku-pad button { height: var(--k); border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 400 calc(var(--k) * .45) var(--display); box-shadow: var(--shadow); cursor: pointer; touch-action: manipulation; }
.sudoku-pad button[aria-pressed="true"] { background: var(--pink-soft); color: var(--pink); border-color: var(--pink); }

/* Kletterwand */
.climb { width: min(100%, 380px); }
.climb canvas { width: 100%; height: auto; aspect-ratio: 360 / 560; display: block; border-radius: var(--radius); max-height: 64vh; object-fit: contain; }
.climb-pad { --k: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(100%, 380px); }
.arcade[data-keys="s"] .climb-pad { --k: 48px; } .arcade[data-keys="l"] .climb-pad { --k: 84px; }
.climb-pad button { height: var(--k); border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-size: calc(var(--k) * .4);
  box-shadow: var(--shadow); cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.climb-pad button:active { transform: translateY(3px); box-shadow: none; }

/* Benachrichtigungen und Furz */
.checks { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.quiet { align-items: center; gap: 8px; }
.quiet select { width: auto; min-height: 40px; }
.fart-card { display: grid; gap: 10px; }
.fart-card form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fart-card select { flex: 1 1 200px; width: auto; min-width: 0; max-width: 100%; }
.fart-card, .fart-card form { min-width: 0; }
.notice.fart { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }

/* Wer ist da */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.people li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); font-size: 14px; }
.people-chat { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.people-chat:hover b { text-decoration: underline; }
.people i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.people li.on i { background: #19c37d; box-shadow: 0 0 0 3px color-mix(in srgb, #19c37d 30%, transparent); }

/* Chat */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat { gap: 12px; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; min-height: 200px; overflow-y: auto; }
.msg { max-width: 82%; align-self: flex-start; background: var(--bg-2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; display: grid; gap: 2px; min-width: 0; }
.msg.mine { align-self: flex-end; background: var(--pink-soft); border-radius: 14px 14px 4px 14px; }
.msg b { font-size: 12px; color: var(--ink-2); }
.msg p { overflow-wrap: anywhere; }
.msg time { font: 500 10px var(--mono); color: var(--ink-3); justify-self: end; }
.chat-empty { text-align: center; padding: 24px 0; }
/* Abstand und eine feine Linie zwischen den Nachrichten und dem Eingabefeld */
.chat-list { padding-bottom: 6px; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; }
/* Chat der Partie: Knopf mit Zähler oben, Leiste unter dem Spielfeld */
.chat-toggle { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 16px; line-height: 1; cursor: pointer; flex: none; }
.chat-toggle.has-unread { border-color: var(--pink); }
.chat-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--pink); color: var(--bg); font: 600 11px/18px var(--mono); text-align: center; }
.room-chat { display: grid; gap: 10px; }
.room-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.room-chat .chat-list { max-height: 260px; min-height: 80px; }
.room-chat .chat-empty { padding: 12px 0; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-quick .btn { min-width: 44px; }
/* Nur Spiel: der Knopf erscheint nur bei Ungelesenem, die Leiste kommt als Blatt von unten und deckt nichts dauerhaft zu */
body.focus .chat-toggle:not(.has-unread):not([aria-expanded="true"]) { display: none; }
body.focus .room-chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 70vh; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .35);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
body.focus .room-chat .chat-list { max-height: 34vh; }
.bs-tip { text-align: center; min-height: 1.5em; }
.bs-grid.big button.bs-cell:not(:disabled) { cursor: crosshair; }
.bs-bar[hidden] { display: none; }

/* Touren mit Lizzy */
.help { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: var(--ink-2); font: 400 15px/1 var(--display); cursor: pointer; flex: none; }
.focus-on { display: inline-grid; place-items: center; }
.focus-on[aria-pressed="true"] { border-color: var(--pink); color: var(--pink); }
/* Tastengröße mit Abstand zum Steuerkreuz, damit man im Spiel nicht aus Versehen umschaltet */
.arcade-bar { margin-top: 28px; }
.arcade-bar:not(:has(> :not([hidden]))) { display: none; }
.arcade-snake .help { border-radius: 0; border-color: var(--c64-fg); background: transparent; color: var(--c64-fg); }
.arcade-snake .focus-on[aria-pressed="true"] { background: var(--c64-fg); color: var(--c64-bg); }
.tour { position: fixed; inset: 0; z-index: 60; }
.tour.center { display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 16px; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px color-mix(in srgb, var(--bg) 70%, transparent); outline: 3px solid var(--pink); pointer-events: none; transition: all .2s; }
.tour-bubble { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); margin: 0 auto; max-width: 420px;
  background: var(--card); border: 2px solid var(--pink); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: 44px 1fr; gap: 10px 12px; box-shadow: var(--shadow); }
.tour.center .tour-bubble { position: static; }
.tour-bubble p { align-self: center; }
.tour-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.tour-count { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); text-align: right; margin-top: -4px; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* Lizzys Echo */
.echo { width: min(100%, 420px); display: grid; gap: 10px; }
.echo-round { text-align: center; font: 400 22px var(--display); }
.echo-pads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.echo-pad { aspect-ratio: 1; border: 0; border-radius: 40% 55% 45% 60%; cursor: pointer; opacity: .55; box-shadow: inset 0 -6px 0 rgb(0 0 0 / .2); touch-action: manipulation; transition: opacity .08s, transform .08s; }
.echo-pad.p0 { background: #4fd18b; } .echo-pad.p1 { background: #ffd23f; } .echo-pad.p2 { background: #5ab8ff; }
.echo-pad.p3 { background: #ff4fa3; } .echo-pad.p4 { background: #a77bff; } .echo-pad.p5 { background: #3ee6d1; }
.echo-pad.p1, .echo-pad.p4 { border-radius: 55% 40% 60% 45%; }
.echo-pad.lit { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 4px var(--card), 0 0 24px currentColor; }
.echo-pad.want { outline: 4px dashed var(--ink); outline-offset: 3px; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .echo-pad { transition: none; } .echo-pad.lit { transform: none; } }

/* Tageswort */
.dw { width: min(100%, 420px); display: grid; gap: 10px; }
.dw-head { display: flex; justify-content: space-between; font: 500 14px var(--mono); color: var(--ink-2); }
.dw-head [data-time] { color: var(--ink); font-size: 18px; }
.dw-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 40px; }
.dw-rows li { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 2px solid var(--line); }
.dw-word { font: 400 22px/1 var(--display); letter-spacing: .2em; }
.dw-result { display: flex; gap: 10px; }
.dw-num { font: 600 15px var(--mono); color: var(--pink); white-space: nowrap; }
.dw-num.zero { color: var(--ink-3); opacity: .6; }
.dw-first { margin: 0; text-align: center; font-size: 15px; color: var(--ink-2); padding: 8px 12px; border: 2px dashed var(--line); border-radius: 10px; }
.dw-legend { font-size: 13px; color: var(--ink-2); }
.dw-legend summary { cursor: pointer; text-align: center; color: var(--ink-3); list-style-position: inside; }
.dw-legend p { margin: 6px 0 0; }
.dw-legend b { color: var(--pink); }
.dw-tip { margin: 0; min-height: 1.3em; text-align: center; font-size: 14px; font-weight: 600; color: var(--pink); }
.dw-keys button.ready { background: var(--pink); border-color: var(--pink); color: var(--bg); animation: dw-pulse 1s ease-in-out infinite; }
@keyframes dw-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .dw-keys button.ready { animation: none; } }
.dw-now { text-align: center; font: 400 28px/1.3 var(--display); letter-spacing: .15em; color: var(--cyan); }
.dw-keys { display: grid; gap: 6px; width: min(100%, 440px); }
.dw-keys div { display: flex; gap: 4px; justify-content: center; }
.dw-keys button { flex: 1 1 0; max-width: 40px; height: 46px; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 15px var(--body); padding: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.dw-keys button.wide { max-width: 64px; flex-grow: 1.6; font-family: var(--display); font-size: 13px; }
.dw-keys button.out { opacity: .3; text-decoration: line-through; }
.arcade[data-keys="s"] .dw-keys button { height: 38px; } .arcade[data-keys="l"] .dw-keys button { height: 56px; }

/* Kofferpacken */
.board-suitcase { width: min(100%, 460px); display: grid; gap: 10px; }
.sc-last { text-align: center; font: 400 17px/1.3 var(--display); color: var(--pink); }
.sc-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 32px; font-size: 24px; }
.sc-chain li.miss { outline: 3px solid var(--danger); border-radius: 6px; }
.sc-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sc-tile { aspect-ratio: 1; border: 2px solid var(--line); border-radius: 10px; background: var(--card); display: grid; place-items: center; padding: 2px; cursor: pointer; touch-action: manipulation; color: var(--ink); }
.sc-tile span { font-size: clamp(20px, 7vw, 30px); line-height: 1; }
.sc-tile small { font-size: 9px; line-height: 1.1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.sc-tile.picked { border-color: var(--pink); background: var(--pink-soft); }
.sc-tile:disabled { cursor: default; opacity: .75; }
.sc-end { display: grid; gap: 8px; }

/* Zuschauen */
.watch-link { border-radius: var(--radius); }
.watching .arcade-stage { pointer-events: none; }
.watch-stats-toggle { align-self: center; }
.watch-stats { font-size: .75rem; }
.watch-stats dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .75rem; margin: 0; }
.watch-stats dt { color: var(--ink-3); }
.watch-stats dd { margin: 0; overflow-wrap: anywhere; }
.people a { font-weight: 600; font-size: 13px; }

/* Admin, Konten: Abmelden und Löschen unter jedem Konto */
.account-danger { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: -4px 0 12px; }
.account-danger details { flex: 1 1 260px; min-width: 0; }
.account-danger summary { list-style: none; display: inline-flex; }
.account-danger summary::-webkit-details-marker { display: none; }
.account-danger details[open] form { margin-top: 10px; }
.btn.danger { color: var(--danger); border-color: currentColor; }
.btn.small.danger:not(.ghost) { background: var(--danger); color: #fff; }

/* Chatübersicht im Menü „Chat“ */
.chat-search { flex-wrap: nowrap; }
/* Suchfeld ohne das Aussehen des Browsers (Safari rundet und färbt es sonst eigen) */
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
.chat-search input { flex: 1; min-width: 0; }
.chat-overview { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; color: inherit; text-decoration: none; }
.chat-row:hover { border-color: var(--pink); }
.chat-row.unread { border-color: var(--pink); }
.chat-row-title { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.chat-row-badge { justify-self: end; font: 600 12px var(--mono); color: var(--bg); background: var(--pink); border-radius: 99px; padding: 2px 8px; align-self: start; }
.chat-row-last { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.chat-row-time { grid-column: 2; grid-row: 2; font-size: 11px; color: var(--ink-3); align-self: end; }

/* Sticker im Chat: Lizzys Tänze, Auswahl unter dem Eingabefeld, im Verlauf ohne Sprechblase */
.sticker-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sticker-toggle[aria-expanded="true"] { border-color: var(--pink); }
.sticker-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding-top: 8px; }
.sticker-picker button { border: 2px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 6px; cursor: pointer; display: grid; place-items: center; }
.sticker-picker button:hover, .sticker-picker button:focus-visible { border-color: var(--pink); }
.msg.has-sticker { background: transparent; padding: 0; }
.msg .sticker { display: block; width: 96px; height: 96px; }

/* Lieblingsspiele in der Kopfzeile, beim Ziehen erscheint ein freier Platz */
.favs { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.favs + .lvl { margin-left: 0; }
.favs[data-empty] { display: none; }
body.fav-dragging .favs { display: flex; }
.fav, .fav-drop { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.fav { font-size: 22px; line-height: 1; text-decoration: none; background: var(--card); border: 2px solid var(--line);
  -webkit-touch-callout: none; user-select: none; }
.fav:hover { border-color: var(--pink); }
.fav.lifted { opacity: .35; }
.fav-drop { display: none; border: 2px dashed var(--ink-3); color: var(--ink-3); font: 400 18px/1 var(--display); }
body.fav-dragging .fav-drop { display: grid; }
.favs.over .fav-drop, .favs.over .fav { border-color: var(--pink); color: var(--pink); }
.fav-ghost { position: fixed; z-index: 60; pointer-events: none; font-size: 40px; line-height: 1; transform: translate(-50%, -110%);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
[data-fav-tile] { -webkit-touch-callout: none; }
body.fav-dragging { user-select: none; }
.row > .fav-star { margin-left: auto; }
.fav-star { font-size: 18px; }
.fav-star[aria-pressed="true"] { color: var(--yellow); border-color: var(--yellow); }
.logo { min-width: 0; }
@media (max-width: 420px) {
  .fav, .fav-drop { width: 34px; height: 34px; border-radius: 10px; }
  .fav { font-size: 18px; }
  .topbar-inner { gap: 8px; }
}

/* Öffentliches Profil */
.avatar-big { width: 56px; height: 56px; font-size: 24px; flex: none; border-radius: 50%; border: 2px solid var(--pink); background: var(--card); }
.player-actions { align-items: flex-start; }
.player-challenge summary { list-style: none; cursor: pointer; }
.player-challenge summary::-webkit-details-marker { display: none; }
.player-games { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.player-games .chip { text-decoration: none; font-size: 13px; padding: 8px 12px; }
.player-bests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.player-bests li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.player-bests li:last-child { border-bottom: 0; padding-bottom: 0; }
.player-bests a { color: var(--ink); text-decoration: none; }
.player-link { color: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.player-link:hover { text-decoration-color: var(--pink); }
