:root {
  --bg: #141a2e;
  --bg2: #1d2540;
  --card: #232c4d;
  --line: #34406b;
  --text: #eef1fb;
  --mute: #9aa4c7;
  --accent: #ff6b4a;
  --accent2: #2ee6c5;
  --red: #ff4d6d;
  --yellow: #ffd23f;
  --win: #3ddc84;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(circle at 50% -10%, #2a3566 0%, var(--bg) 520px) no-repeat, var(--bg); }
main { max-width: 540px; margin: 0 auto; padding: 12px 14px calc(30px + env(safe-area-inset-bottom)); }
h1 { margin: 6px 0 2px; font-size: 2.4rem; letter-spacing: .02em; }
h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); margin: 26px 0 10px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
.loading { text-align: center; padding: 80px 0; color: var(--mute); }

/* Buttons allgemein */
.row { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.row.wrap { flex-wrap: wrap; }
.row > button, .big, .join button, .askform button, .modal-btns button, .panel > button {
  background: var(--accent); color: #fff; font-weight: 700; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 4px 0 #c24a2f; transition: transform .08s;
}
.row > button:active, .big:active { transform: translateY(2px); box-shadow: 0 2px 0 #c24a2f; }
button.ghost { background: var(--card); box-shadow: 0 3px 0 #141a33; border: 1px solid var(--line); color: var(--text); }
.big { display: block; width: 100%; font-size: 1.1rem; padding: 15px; margin: 12px 0; }
.big:disabled { background: var(--card); color: var(--mute); box-shadow: none; }
.link { background: none; color: var(--mute); text-decoration: underline; padding: 8px; }
button.yes { background: var(--win); box-shadow: 0 4px 0 #23a35d; flex: 1; font-size: 1.2rem; }
button.no { background: var(--red); box-shadow: 0 4px 0 #b8304a; flex: 1; font-size: 1.2rem; }

/* Startseite */
.hero { text-align: center; padding: 20px 0 6px; }
.hero .logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.hero p { color: var(--mute); margin: 0; }
.resume { display: block; width: 100%; margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--accent2); color: #0d2b26; font-weight: 600; }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: linear-gradient(160deg, var(--card), var(--bg2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; min-height: 130px; transition: transform .1s, border-color .1s;
}
.game-card:active { transform: scale(.97); border-color: var(--accent); }
.game-card .gi { font-size: 2rem; }
.game-card .gn { font-weight: 700; }
.game-card .gd { color: var(--mute); font-size: .82rem; }
.game-card.current { border-color: var(--accent2); }
.games.small .game-card { min-height: 0; padding: 10px; }
.games.small .gd { display: none; }
.games.small .gi { font-size: 1.4rem; }
.join { display: flex; gap: 10px; }
.join input {
  flex: 1; min-width: 0; font: 700 1.6rem/1 ui-monospace, Menlo, monospace; letter-spacing: .35em; text-transform: uppercase;
  text-align: center; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text);
}
.join input:focus { outline: none; border-color: var(--accent2); }
.hint { color: var(--mute); font-size: .85rem; text-align: center; }

/* Kopfzeile */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--card); font-size: 1.1rem; }
.tb-title { flex: 1; font-weight: 700; font-size: 1.1rem; }
.tb-title small { display: block; font-weight: 400; color: var(--mute); font-size: .8rem; letter-spacing: .05em; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.dot.on { background: var(--win); box-shadow: 0 0 10px var(--win); }
.dot.off { background: #666e8f; }

/* Lobby */
.lobby { text-align: center; }
.lobby .lead { color: var(--mute); }
.qr { width: min(72vw, 270px); margin: 10px auto; background: #fff; border-radius: 18px; padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.bigcode { display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.bigcode span { font: 800 2.2rem/1 ui-monospace, Menlo, monospace; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.url { color: var(--mute); font-size: .8rem; word-break: break-all; }
.waiting { color: var(--mute); display: flex; align-items: center; justify-content: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 3px solid var(--line); border-top-color: var(--accent2); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.change { margin-top: 24px; text-align: left; }
.change summary, .history summary { cursor: pointer; color: var(--mute); padding: 8px 0; }

/* Spielbildschirm */
.scorebar { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--mute); font-size: .95rem; }
.scorebar b { color: var(--text); font-size: 1.3rem; }
.status { text-align: center; font-weight: 700; font-size: 1.15rem; margin: 10px 0 14px; padding: 10px; border-radius: 12px; background: var(--bg2); }
.status.mine { background: linear-gradient(90deg, #ff6b4a33, #2ee6c533); box-shadow: inset 0 0 0 2px var(--accent2); animation: pulse 1.6s ease-in-out infinite; }
.status.win { background: #3ddc8433; box-shadow: inset 0 0 0 2px var(--win); }
.status.lose { background: #ff4d6d26; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 2px var(--accent); } }
.sub { text-align: center; color: var(--mute); font-size: .88rem; margin: 10px 0; }
.small { font-size: .85rem; color: var(--mute); }
.foot { text-align: center; margin-top: 16px; }
.over { text-align: center; margin-top: 14px; }
.over .ghost { width: 100%; padding: 12px; border-radius: 12px; margin-bottom: 12px; }
.nudge { color: var(--accent2); font-weight: 700; animation: pulse 1.2s infinite; }

/* Tic-Tac-Toe */
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(88vw, 360px); margin: 0 auto; }
.ttt .cell { aspect-ratio: 1; background: var(--card); border-radius: 18px; font-size: clamp(2.4rem, 13vw, 3.6rem); border: 1px solid var(--line); }
.ttt .cell.win { background: #3ddc8440; border-color: var(--win); }
.ttt .cell:not(:disabled):active { background: var(--line); }

/* Vier gewinnt */
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 8px; background: #2346b8; border-radius: 16px; box-shadow: inset 0 -6px 0 #17318a; width: min(94vw, 460px); margin: 0 auto; }
.c4 .hole { aspect-ratio: 1; padding: 0; background: var(--bg); border-radius: 50%; position: relative; overflow: hidden; }
.c4.can .hole:active { background: #2b3870; }
.disc { position: absolute; inset: 7%; border-radius: 50%; }
.disc.p1 { background: radial-gradient(circle at 35% 35%, #ff8aa0, var(--red)); }
.disc.p2 { background: radial-gradient(circle at 35% 35%, #fff1a8, var(--yellow)); }
.disc.last { animation: drop .35s ease-in; }
.disc.win { box-shadow: 0 0 0 3px #fff, 0 0 14px #fff; }
@keyframes drop { from { transform: translateY(calc(-110% * (var(--row) + 1))); } }
.disc-mini { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -0.12em; }
.disc-mini.p1 { background: var(--red); }
.disc-mini.p2 { background: var(--yellow); }

/* Schiffe versenken */
.grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; background: #0c3d63; padding: 4px; border-radius: 10px; width: min(94vw, 440px); margin: 0 auto; }
.grid.mini { width: min(64vw, 280px); }
.grid .sq { aspect-ratio: 1; background: #145b8c; border-radius: 3px; padding: 0; position: relative; }
.grid.can .sq:not(:disabled) { background: #1a6ea8; }
.grid.can .sq:not(:disabled):active { background: #2a8fd4; }
.sq.ship { background: #8fa3b8 !important; }
.sq.miss::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #cfe6ff; opacity: .8; }
.sq.hit { background: #ff6b4a !important; }
.sq.hit::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: .8em; }
.sq.sunk { background: #7a1f2e !important; }
.sq.sunk::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #ffb3c0; font-size: .8em; }
.sq.reveal { background: #536a80 !important; }
.sq.last { outline: 2px solid var(--yellow); outline-offset: -2px; z-index: 1; }
.label { display: flex; justify-content: space-between; width: min(94vw, 440px); margin: 14px auto 6px; font-weight: 700; }
.label span { color: var(--mute); font-weight: 400; font-size: .85rem; }
.fleet { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: .8rem; letter-spacing: -.1em; }
.chip.sel { border-color: var(--accent2); color: var(--accent2); box-shadow: 0 0 0 2px #2ee6c544; }
.chip.done { opacity: .4; text-decoration: line-through; }

/* Wer ist es? */
.secret { display: flex; align-items: center; gap: 12px; background: var(--bg2); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
.secret small { display: block; color: var(--mute); font-size: .78rem; }
.secret b { font-size: 1.2rem; }
.secret .mini-card { width: 64px; }
.mini-card { display: inline-flex; flex-direction: column; align-items: center; background: #fff; color: #222; border-radius: 12px; padding: 4px 4px 6px; width: 90px; }
.mini-card.center { margin: 0 auto 6px; }
.mini-card small { color: #666; font-size: .7rem; }
.face svg { display: block; width: 100%; height: auto; }
.face { width: 100%; background: linear-gradient(#cfe7ff, #eaf4ff); border-radius: 8px; overflow: hidden; }
.nm { font-weight: 700; font-size: .78rem; margin-top: 2px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; text-align: center; }
.panel p { margin: 6px 0; }
.panel.hot { border-color: var(--accent2); box-shadow: 0 0 0 3px #2ee6c522; }
.panel .q { font-size: 1.25rem; font-weight: 700; }
.panel > button.ghost { margin-top: 8px; padding: 10px 14px; border-radius: 12px; }
.answer { font-size: 1.6rem; font-weight: 800; }
.answer.yes, .history .yes { color: var(--win); }
.answer.no, .history .no { color: var(--red); }
.askform { display: flex; gap: 8px; }
.askform input { flex: 1; min-width: 0; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; }
.askform input:focus { outline: none; border-color: var(--accent2); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.sugg .chip { letter-spacing: 0; }
.reveal { display: flex; justify-content: center; gap: 14px; margin-top: 8px; }
.gboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 480px) { .gboard { grid-template-columns: repeat(6, 1fr); } }
.gcard { display: flex; flex-direction: column; align-items: center; background: #fff; color: #222; border-radius: 10px; padding: 3px 3px 4px; transition: transform .25s, opacity .25s, filter .25s; }
.gcard.down { transform: perspective(300px) rotateX(55deg) scale(.92); opacity: .35; filter: grayscale(1); }
.gcard.pick { box-shadow: 0 0 0 3px var(--accent2); animation: wiggle .6s ease-in-out infinite; }
.gcard:disabled { cursor: default; }
@keyframes wiggle { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.history ul { list-style: none; padding: 0; margin: 0; }
.history li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }

/* Toast & Dialog */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 200px); opacity: 0; background: #000c; color: #fff; padding: 12px 18px; border-radius: 12px; transition: transform .25s, opacity .25s; max-width: 90vw; text-align: center; z-index: 20; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.modal { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 10; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: min(92vw, 360px); text-align: center; }
.modal-box p { margin: 6px 0; }
.modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.modal-btns button { flex: 1; }

/* Hilfe-Knopf & Anleitung */
.icon-btn.help { font-weight: 800; color: var(--accent2); border: 1px solid var(--line); }
.modal.rules { z-index: 30; align-items: start; overflow-y: auto; padding: 24px 14px; }
.rules-sheet {
  position: relative; width: min(94vw, 480px); margin: auto; background: #fffaf0; color: #2a2a2a;
  border-radius: 20px; padding: 22px 20px 14px; box-shadow: 0 20px 60px #000a; border: 6px solid #fff;
  outline: 2px dashed #e0d3b8; outline-offset: -14px; animation: pop .2s ease-out;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.rules-sheet h3 { margin: 0 0 10px; font-size: 1.4rem; color: #1d2540; }
.rules-sheet p, .rules-sheet li { font-size: .95rem; line-height: 1.45; }
.rules-sheet ul { padding-left: 20px; margin: 6px 0 10px; }
.rules-sheet li { margin-bottom: 5px; }
.rules-sheet .tip { background: #e6f7f3; border-radius: 10px; padding: 8px 10px; }
.rules-sheet .warn { background: #ffe9e4; border-radius: 10px; padding: 8px 10px; }
.rules-sheet .small { color: #888; }
.rules-sheet .center { text-align: center; }
.rules-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: #1d2540; color: #fff; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; background: #145b8c; position: relative; }
.lg.hit { background: #ff6b4a; } .lg.sunk { background: #7a1f2e; }
.lg.miss::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #cfe6ff; }

/* Bomb Busters */
.levels { display: grid; gap: 10px; }
.levels .game-card { min-height: 0; }
.bombbar { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; margin-bottom: 4px; }
.fuse { display: flex; justify-content: center; gap: 6px; margin-bottom: 6px; }
.fz { width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: .9rem; }
.fz.burnt { background: #ff8a3d; border-color: #ffb37a; box-shadow: 0 0 10px #ff6b4a; }
.fz.skull { background: #3a1520; border-color: #7a1f2e; }
.fz.skull.burnt { background: #ff2d55; }
.track { display: flex; justify-content: center; gap: 3px; margin-top: 8px; }
.trk { flex: 1 1 0; max-width: 30px; min-width: 0; padding: 2px 0; border-radius: 6px; background: var(--card); font-size: .8rem; font-weight: 700; line-height: 1.1; }
.trk i { display: block; font-style: normal; color: var(--accent2); font-size: .6rem; height: .7rem; letter-spacing: -1px; }
.trk.full { background: #3ddc8440; color: var(--win); }
.hand { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.stand { display: flex; justify-content: center; gap: 3px; padding: 4px 4px 6px; background: linear-gradient(#3b2a1a, #2a1d12); border-radius: 10px; box-shadow: inset 0 -4px 0 #1b120b; }
.wire { flex: 1 1 0; max-width: 34px; min-width: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; }
.wire .wbody { width: 100%; height: 40px; border-radius: 5px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; }
.wire .wbody small { font-size: .55rem; font-weight: 700; }
.wire.wb .wbody { background: linear-gradient(#4b8bff, #2a5fc9); }
.wire.wy .wbody { background: linear-gradient(#ffe066, #e0b100); color: #3a2c00; }
.wire.wr .wbody { background: linear-gradient(#ff5c7a, #c41e3a); }
.wire.back .wbody { background: repeating-linear-gradient(45deg, #59606f, #59606f 4px, #4b5161 4px, #4b5161 8px); }
.wire.cut .wbody { opacity: .35; filter: grayscale(.4); background-image: linear-gradient(transparent 45%, #000a 45%, #000a 55%, transparent 55%), linear-gradient(#4b8bff, #2a5fc9); }
.wire.cut.wy .wbody { background-image: linear-gradient(transparent 45%, #000a 45%, #000a 55%, transparent 55%), linear-gradient(#ffe066, #e0b100); }
.wire.cut.wr .wbody { opacity: .7; background-image: linear-gradient(#ff5c7a, #c41e3a); }
button.wire:not(:disabled) .wbody { box-shadow: 0 0 0 2px var(--accent2); }
.wire.picked .wbody { box-shadow: 0 0 0 3px var(--yellow) !important; transform: translateY(-5px); }
.wire.flash .wbody { animation: flash 1.2s ease-out 2; }
@keyframes flash { 30% { box-shadow: 0 0 0 3px #fff, 0 0 14px #fff; } }
.tok { height: 15px; min-width: 15px; border-radius: 50%; background: #fff; color: #1d2540; font-size: .62rem; font-weight: 800; display: grid; place-items: center; padding: 0 2px; }
.tok.ty { background: #ffd23f; }
.tok.none { background: none; }
button.ghost.on { border-color: var(--accent2); color: var(--accent2); }
.panel .row.wrap button { padding: 9px 12px; font-size: .9rem; }

/* Mehrspieler */
.namefield { display: flex; flex-direction: column; gap: 6px; color: var(--mute); font-size: .85rem; margin-top: 16px; }
.namefield input { padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 1.05rem; }
.namefield input:focus { outline: none; border-color: var(--accent2); }
.game-card .pl { margin-top: 2px; font-size: .75rem; color: var(--accent2); font-weight: 700; }
.game-card:disabled { opacity: .35; }
.players { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.pl-chip { padding: 6px 12px; border-radius: 999px; background: var(--bg2); border: 1px dashed var(--line); color: var(--mute); }
.pl-chip.in { border-style: solid; border-color: var(--accent2); color: var(--text); }
.modal-btns button.num { font-size: 1.4rem; padding: 12px 0; }
.label.turn { color: var(--accent2); }

/* Bot-Modus */
.games.bots .game-card { min-height: 0; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; }
.games.bots .pl { display: none; }
.qlist .chip { font-size: .82rem; }
.chip.used { opacity: .4; }

/* ===== Neue Spiele ===== */
.modal-btns { flex-wrap: wrap; }
.modal-btns button.num { min-width: 52px; flex: 1 0 18%; }
.scorebar.multi { flex-wrap: wrap; gap: 6px 12px; }
.scorebar.multi span.me { color: var(--accent2); }
.scorebar.multi b { font-size: 1.05rem; }

/* Dame */
.dame { display: grid; grid-template-columns: repeat(8, 1fr); width: min(94vw, 440px); margin: 0 auto; border-radius: 10px; overflow: hidden; border: 4px solid #5d4037; }
.dq { aspect-ratio: 1; padding: 0; position: relative; display: grid; place-items: center; }
.dq.light { background: #f0d9b5; }
.dq.dark { background: #8b5a3c; }
.dq.lastm { box-shadow: inset 0 0 0 3px #ffd23f88; }
.dq.taken::after { content: '✕'; position: absolute; color: #ff4d6d; font-weight: 900; opacity: .7; }
.dq.can .piece { box-shadow: 0 0 0 3px var(--accent2), 0 3px 0 #0005; }
.dq.sel { background: #5e8b3c; }
.dq.target::before { content: ''; width: 34%; height: 34%; border-radius: 50%; background: #2ee6c5cc; position: absolute; }
.piece { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 3px 0 #0006, inset 0 -3px 0 #0002; }
.piece.p1 { background: radial-gradient(circle at 35% 35%, #fff, #e3d9c8); color: #b8860b; }
.piece.p2 { background: radial-gradient(circle at 35% 35%, #555, #1c1c1c); color: #ffd23f; }

/* Käsekästchen */
.boxes { display: block; width: min(94vw, 420px); margin: 0 auto; background: var(--bg2); border-radius: 14px; }
.boxes .ln { cursor: pointer; }
.boxes .ln:hover .hint, .boxes .ln:active .hint { stroke: var(--accent2); stroke-width: 5; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.pchip { padding: 4px 10px; border-radius: 999px; background: var(--bg2); border-left: 6px solid var(--c); font-size: .9rem; }

/* Mastermind */
.peg { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 #0003, 0 2px 0 #0004; border: 0; padding: 0; }
.peg.big { width: 40px; height: 40px; }
.peg.empty { background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.palette { display: flex; justify-content: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.mmrow { display: flex; gap: 8px; justify-content: center; }
.mmrow.input { margin: 10px 0; }
.mmboard { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.mmline { display: flex; align-items: center; gap: 10px; background: var(--bg2); padding: 6px 10px; border-radius: 12px; }
.mmline.cur { box-shadow: 0 0 0 2px var(--accent2); }
.mmline .no { color: var(--mute); width: 18px; text-align: right; font-size: .85rem; }
.pins { display: grid; grid-template-columns: repeat(2, 10px); gap: 3px; }
.pins i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pins i.b { background: #111; box-shadow: 0 0 0 1.5px #fff; }
.pins i.w { background: #fff; }
.opppins { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 8px; background: var(--bg2); border-radius: 12px; }
.mmgo { background: var(--accent); color: #fff; font-weight: 700; border-radius: 10px; padding: 8px 12px; }
.mmgo:disabled { background: var(--card); color: var(--mute); }

/* Kniffel */
.dice { display: flex; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.die { width: 54px; height: 54px; border-radius: 12px; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; gap: 2px; box-shadow: 0 4px 0 #b9bfd6; transition: transform .15s; }
.die i { border-radius: 50%; }
.die i.on { background: #1d2540; }
.die.held { background: #ffe066; box-shadow: 0 4px 0 #c9a400, 0 0 0 3px var(--accent2); transform: translateY(4px); }
.die.roll { animation: roll .45s ease-out; }
@keyframes roll { 0% { transform: rotate(-200deg) scale(.6); } 100% { transform: none; } }
.kntable { overflow-x: auto; margin-top: 8px; }
.kntable table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.kntable th, .kntable td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.kntable th:first-child { text-align: left; color: var(--mute); font-weight: 500; white-space: nowrap; }
.kntable tr:first-child th { color: var(--text); font-weight: 700; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
.kntable th.act { color: var(--accent2); }
.kntable td.mine { background: #2ee6c50d; }
.kntable td.ghost { color: var(--mute); font-style: italic; }
.kntable td.pick button { width: 100%; background: var(--accent); color: #fff; border-radius: 8px; padding: 4px 0; font-weight: 700; }
.kntable td.pick button.zero { background: var(--card); color: var(--mute); }
.kntable tr.sum td, .kntable tr.sum th { font-weight: 700; color: var(--text); background: var(--bg2); }
.kntable tr.total td { color: var(--accent2); font-size: 1rem; }

/* Werwolf */
.rolecard { background: linear-gradient(160deg, #2b2050, #1d2540); border: 2px solid #6a4fb3; border-radius: 18px; padding: 22px 16px; text-align: center; cursor: pointer; margin-bottom: 10px; }
.rolecard .ri { font-size: 3.4rem; }
.rolecard .rn { font-size: 1.6rem; font-weight: 800; margin: 4px 0 6px; }
.panel.night { background: linear-gradient(160deg, #11163a, #1d2540); }
.wwpick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.wwp { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.wwp.sel { border-color: var(--accent); background: #ff6b4a33; }
.wwlist { background: var(--bg2); border-radius: 14px; padding: 6px 12px; }
.wwrow { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.wwrow:last-child { border: 0; }
.wwrow.dead { opacity: .5; text-decoration: line-through; }
.myrole { text-align: center; color: var(--mute); margin-bottom: 8px; }
.warn-t { color: var(--red); font-weight: 700; }

/* Quiz */
.qtimer { position: relative; height: 26px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.qtimer div { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent2), var(--yellow)); transition: width .2s linear; }
.qtimer div.rev { background: var(--line); }
.qtimer span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: #141a2e; }
.qcat { text-align: center; color: var(--mute); font-size: .9rem; }
.qq { text-align: center; font-size: 1.3rem; font-weight: 800; margin: 6px 0 14px; line-height: 1.3; }
.qopts { display: grid; gap: 10px; }
.qopt { padding: 14px; border-radius: 14px; font-weight: 700; font-size: 1.02rem; color: #fff; text-align: left; box-shadow: 0 4px 0 #0005; display: flex; flex-direction: column; }
.qopt small { font-weight: 400; font-size: .75rem; opacity: .9; margin-top: 4px; }
.qopt.c0 { background: #e2445c; } .qopt.c1 { background: #2f6fe4; } .qopt.c2 { background: #e0a100; } .qopt.c3 { background: #2aa876; }
.qopt:disabled { opacity: .55; }
.qopt.mine { opacity: 1; box-shadow: 0 0 0 3px #fff; }
.qopt.right { opacity: 1; box-shadow: 0 0 0 4px var(--win), 0 0 18px var(--win); }
.qopt.wrong { opacity: 1; filter: grayscale(.6); }
.qscore { background: var(--bg2); border-radius: 14px; padding: 6px 12px; margin-top: 12px; }
.qscore div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.qscore div:last-child { border: 0; }
.qscore div.me { color: var(--accent2); }
.qscore em { color: var(--win); font-style: normal; font-size: .85rem; }

/* Codenames */
.cnhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 800; font-size: 1.2rem; }
.cnhead .you { font-size: .85rem; font-weight: 500; color: var(--mute); }
.cnhead .act { padding: 2px 10px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 2px var(--accent2); }
.cngrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.cn { aspect-ratio: 1.35; background: #efe6d2; color: #2a2a2a; border-radius: 8px; font-weight: 700; font-size: clamp(.58rem, 2.6vw, .85rem); padding: 2px; word-break: break-word; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; box-shadow: 0 3px 0 #b8ab8f; }
.cn small { font-weight: 400; font-size: .55rem; opacity: .85; }
.cn.spy-red { box-shadow: inset 0 0 0 3px #e2445c, 0 3px 0 #b8ab8f; }
.cn.spy-blue { box-shadow: inset 0 0 0 3px #2f6fe4, 0 3px 0 #b8ab8f; }
.cn.spy-black { box-shadow: inset 0 0 0 3px #111, 0 3px 0 #b8ab8f; background: #cfc6b4; }
.cn.rev.red { background: #e2445c; color: #fff; box-shadow: none; }
.cn.rev.blue { background: #2f6fe4; color: #fff; box-shadow: none; }
.cn.rev.neutral { background: #8d8576; color: #f3eee3; box-shadow: none; }
.cn.rev.black { background: #111; color: #fff; box-shadow: none; }
.cn:not(:disabled):active { transform: scale(.95); }
.cngrid:not(.spyview) .cn:disabled:not(.rev) { opacity: .95; }
.cnteams { font-size: .85rem; color: var(--mute); margin-top: 10px; }
.cnteams p { margin: 4px 0; }
.cnclue { display: flex; gap: 8px; }
.cnclue input { flex: 1; min-width: 0; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; }
.cnclue select { padding: 0 8px; border-radius: 12px; background: var(--bg2); color: var(--text); border: 2px solid var(--line); font: inherit; font-weight: 700; }
.cnclue button { background: var(--accent); color: #fff; font-weight: 700; padding: 0 14px; border-radius: 12px; }
.clue { font-size: 1.2rem; }

/* Wavelength */
.wscore { display: flex; justify-content: space-between; align-items: center; background: var(--bg2); border-radius: 12px; padding: 8px 14px; margin-bottom: 8px; }
.wscore b { font-size: 1.2rem; }
.wscore .act { color: var(--accent2); }
.wscale { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: .95rem; }
.wscale span:first-child { color: #64b5f6; } .wscale span:last-child { color: #ff8a65; text-align: right; }
.wdial { display: block; width: 100%; max-width: 420px; margin: 4px auto 6px; }
.wslider { width: 100%; height: 40px; accent-color: var(--accent2); }
.wclue { text-align: center; font-size: 1.5rem; font-weight: 800; margin: 4px 0 8px; }
.wclue small { display: block; font-size: .8rem; font-weight: 400; color: var(--mute); }
.wpts { font-size: 1.6rem; font-weight: 800; margin: 2px 0; }
.wteams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.wteam { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.wteam.a { border-top: 4px solid #ff9f43; } .wteam.b { border-top: 4px solid #3ddc84; }
.wteam div { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 30px; }
.wteam button { padding: 8px; border-radius: 10px; }
