/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --surface-3: #e6e9f2;
  --text: #151826;
  --muted: #646b80;
  --border: #e2e5ee;
  --accent: #4f46e5;
  --accent-soft: #eceafe;
  --accent-text: #ffffff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --gold: #d97706;
  --gold-soft: #fef3c7;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 4px 16px rgb(16 24 40 / .06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --topbar-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1117;
    --surface: #171a23;
    --surface-2: #1e222d;
    --surface-3: #272c39;
    --text: #eceef5;
    --muted: #9aa1b5;
    --border: #2a2f3c;
    --accent: #8b85ff;
    --accent-soft: #25234a;
    --accent-text: #0f1117;
    --success: #4ade80;
    --success-soft: #11291b;
    --danger: #f87171;
    --danger-soft: #3a1717;
    --gold: #fbbf24;
    --gold-soft: #33280c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1117;
  --surface: #171a23;
  --surface-2: #1e222d;
  --surface-3: #272c39;
  --text: #eceef5;
  --muted: #9aa1b5;
  --border: #2a2f3c;
  --accent: #8b85ff;
  --accent-soft: #25234a;
  --accent-text: #0f1117;
  --success: #4ade80;
  --success-soft: #11291b;
  --danger: #f87171;
  --danger-soft: #3a1717;
  --gold: #fbbf24;
  --gold-soft: #33280c;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.brand-mark { font-size: 1.3rem; }
.topbar-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: transparent; border: 0; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Layout ---------- */
#app {
  max-width: 760px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  outline: none;
}
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.stack-sm { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.page-head h1 { flex: 1; }
.back { margin-left: -8px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
}
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 4px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; white-space: nowrap;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-danger { color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 16px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--surface); }

/* ---------- Segmented / Chips ---------- */
.segmented {
  display: flex; padding: 4px; gap: 4px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: 1 0 auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.chip .order { min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .75rem; display: grid; place-items: center; padding: 0 5px; }

.avatar {
  --c: var(--accent);
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  box-shadow: inset 0 0 0 2px var(--c);
  font-size: 1rem; font-weight: 700; color: var(--text);
}
.avatar-lg { width: 44px; height: 44px; font-size: 1.35rem; }
.avatar-sm { width: 24px; height: 24px; font-size: .8rem; box-shadow: inset 0 0 0 1.5px var(--c); }

/* ---------- Lists ---------- */
.list { display: grid; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 16px; width: 100%;
  background: transparent; border: 0; text-align: left;
  border-top: 1px solid var(--border);
}
.list-item:first-child { border-top: 0; }
button.list-item:hover, a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); width: 18px; height: 18px; }

/* ---------- Home ---------- */
.hero { padding: 8px 4px 0; }
.hero p { margin: 4px 0 0; }
.game-tile { position: relative; overflow: hidden; }
.game-tile .tile-head { display: flex; align-items: center; gap: 12px; }
.game-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); font-size: 1.7rem; flex: none;
}
.tile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tile-actions .btn-primary { grid-column: 1 / -1; }
.tile-soon { border-style: dashed; box-shadow: none; background: transparent; }
.tile-soon .game-icon { background: var(--surface-2); }
.resume { display: grid; gap: 8px; margin-top: 14px; }
.resume-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.resume-item .grow { flex: 1; min-width: 0; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -6px; border: 2px solid var(--surface-2); }
.avatars .avatar:first-child { margin-left: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--surface-3); color: var(--muted);
}
.badge-live { background: var(--success-soft); color: var(--success); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }

/* ---------- Login ---------- */
.login { min-height: calc(100dvh - var(--topbar-h) - 64px); display: grid; place-items: center; }
.login .card { width: 100%; max-width: 380px; text-align: center; padding: 28px 20px; }
.login .big-emoji { font-size: 3rem; line-height: 1; }
.login form { display: grid; gap: 12px; margin-top: 18px; }
.login .input { text-align: center; font-size: 1.15rem; letter-spacing: .08em; }
.error-text { color: var(--danger); font-size: .9rem; min-height: 1.2em; }

/* ---------- Kniffel Sheet ---------- */
.sheet-top { display: grid; gap: 10px; }
.seg-label { align-self: center; padding: 0 6px 0 8px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.segmented button { flex: 1 0 auto; }
/* Tisch: Tabelle scrollt in beide Richtungen, Kopfzeile + Kategorien bleiben stehen */
.grid-scroll { max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 120px); overflow: auto; overscroll-behavior: contain; }
.banner {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--text); font-weight: 600; font-size: .92rem;
}

.grid-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
table.kgrid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; }
.kgrid th, .kgrid td { border-bottom: 1px solid var(--border); padding: 0; text-align: center; }
.kgrid thead th {
  position: sticky; top: 0; background: var(--surface); z-index: 2;
  padding: 10px 4px 8px; font-size: .8rem; font-weight: 700; min-width: 64px;
  border-bottom: 2px solid var(--border);
}
.kgrid thead th .pname { display: block; max-width: 76px; margin: 4px auto 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kgrid .cat {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  text-align: left; padding: 6px 10px; min-width: 112px; max-width: 128px; white-space: nowrap;
  border-right: 1px solid var(--border);
}
.kgrid thead .cat { z-index: 3; }
.kgrid .cat .lbl { display: block; font-weight: 600; font-size: .9rem; line-height: 1.15; }
.kgrid .cat .hint { display: block; font-size: .72rem; color: var(--muted); line-height: 1.15; }
.kgrid .cat .dice { font-size: .95rem; margin-right: 4px; }
.kgrid tr.sum td, .kgrid tr.sum th { background: var(--surface-2); }
.kgrid tr.sum .cat { background: var(--surface-2); }
.kgrid tr.sum .lbl { font-size: .82rem; color: var(--muted); }
.kgrid tr.total td, .kgrid tr.total .cat { background: var(--accent-soft); }
.kgrid tr.total .lbl { color: var(--text); font-weight: 800; }
.kgrid tr.total td { font-weight: 800; font-size: 1.1rem; }
.kgrid tr.section-end td, .kgrid tr.section-end th { border-bottom: 2px solid var(--border); }
.kgrid tr:last-child td, .kgrid tr:last-child th { border-bottom: 0; }
.kgrid td.sumcell { font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 6px; height: 40px; }
.kgrid td.sumcell.bonus-hit { color: var(--success); }
.kgrid td.win { color: var(--gold); }

.cell {
  width: 100%; height: 46px; min-width: 56px; border: 0; background: transparent;
  font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums;
  display: grid; place-items: center; position: relative;
}
.cell:hover:not([disabled]) { background: var(--surface-2); }
.cell.empty::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--surface-3); }
.cell.zero { color: var(--muted); font-weight: 600; }
.cell.flash { animation: flash .9s ease; }
.cell[disabled] { cursor: default; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.col-me { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }

/* "Ich"-Modus */
.me-summary { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.me-total { font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.progress.done > span { background: var(--success); }
.me-list .list-item { min-height: 58px; padding: 6px 8px 6px 16px; }
.me-list .val {
  min-width: 72px; height: 46px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.me-list .val.empty { color: var(--muted); font-weight: 600; font-size: .9rem; border-style: dashed; background: transparent; }
.me-list .val.zero { color: var(--muted); }
.me-list .sumrow { background: var(--surface-2); min-height: 44px; font-size: .9rem; }
.others { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.others::-webkit-scrollbar { display: none; }
.other { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; font-weight: 600; font-size: .9rem; }

/* Gesamt-Tab */
.podium { display: grid; gap: 8px; }
.podium-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.podium-row.first { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.podium-row .rank { width: 28px; font-weight: 800; color: var(--muted); text-align: center; }
.podium-row .grow { flex: 1; min-width: 0; font-weight: 700; }
.podium-row .pts { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Bottom-Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .4); animation: fade .15s ease; }
.bsheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgb(0 0 0 / .2);
  animation: up .2s cubic-bezier(.2,.8,.2,1);
}
.bsheet .grab { width: 40px; height: 5px; border-radius: 999px; background: var(--surface-3); margin: 0 auto 12px; }
.bsheet h2 { margin-bottom: 2px; }
.bsheet .sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.picker.dense { grid-template-columns: repeat(5, 1fr); }
.pick {
  min-height: 60px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums;
  display: grid; place-content: center; gap: 0; line-height: 1.1;
}
.picker.dense .pick { min-height: 50px; font-size: 1.1rem; }
.pick small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.pick:active { transform: scale(.97); }
.pick.current { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pick.current small { color: inherit; opacity: .8; }
.pick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pick-strike { color: var(--danger); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 999px; border: 3px solid transparent; background: var(--c); }
.swatch[aria-pressed="true"] { border-color: var(--text); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-row button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 1.3rem; }
.emoji-row button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Stats ---------- */
.stat-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; grid-column: 1 / -1; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .75rem; color: var(--muted); }

/* ---------- Toast / States ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: center; pointer-events: none; padding: 0 16px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); animation: up .2s ease; max-width: 100%; }
.toast.error { background: var(--danger); color: #fff; }
.empty-state { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty-state .big { font-size: 2.4rem; }
.loading { display: grid; place-items: center; padding: 48px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); display: inline-block; }
.sync-dot.off { background: var(--danger); }

@media (min-width: 640px) {
  .picker { grid-template-columns: repeat(6, 1fr); }
  .picker.dense { grid-template-columns: repeat(7, 1fr); }
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Startseite: Cover-Karussell ---------- */
.home .hero { padding-bottom: 0; }
.carousel-wrap { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); }
.carousel {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px calc(50% - min(34vw, 150px)) 14px;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.cover-card {
  flex: 0 0 min(68vw, 300px); aspect-ratio: 3 / 4;
  scroll-snap-align: center; perspective: 1200px;
  transition: transform .25s ease, opacity .25s ease;
  transform: scale(.92); opacity: .65;
}
.cover-card.active { transform: scale(1); opacity: 1; }
.flipper { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.flipper.flipped { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 30px rgb(0 0 0 / .25), 0 2px 6px rgb(0 0 0 / .15);
}
.face.front { cursor: pointer; }
.cover-svg { display: block; width: 100%; height: 100%; stroke: none; }
.face.back {
  transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.back-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 8px 16px; border-bottom: 1px solid var(--border); }
.back-head h2 { font-size: 1rem; }
.rules { overflow-y: auto; padding: 10px 16px 16px; display: grid; gap: 10px; font-size: .86rem; line-height: 1.4; overscroll-behavior: contain; }
.rules h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 2px; }
.rules p { margin: 0; color: var(--text); }
.cover-btn {
  position: absolute; top: 10px; width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; border: 0;
  background: rgb(0 0 0 / .35); color: #fff; font-size: 1.25rem; font-weight: 800; line-height: 1;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.cover-btn.star { left: 10px; }
.cover-btn.star.on { color: #fde047; background: rgb(0 0 0 / .5); }
.cover-btn.info { right: 10px; font-family: Georgia, serif; font-style: italic; }
.cover-btn.flipback { position: static; background: var(--surface-2); color: var(--text); flex: none; }
.cover-card.soon .face { border: 2px dashed var(--border); box-shadow: none; background: var(--surface); color: var(--muted); }
.soon-text { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; display: grid; gap: 4px; padding: 0 16px; }
.soon-text span { font-size: .85rem; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--surface-3); transition: width .2s ease, background .2s ease; }
.dots span.on { width: 20px; background: var(--accent); }
.game-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.game-panel .panel-head p { margin: 2px 0 0; }

/* ---------- Neue Partie: Schalter ---------- */
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }

/* ---------- Wizard ---------- */
.standings .other.lead { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: var(--gold-soft); }
.round-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.round-nav .icon-btn { width: 48px; height: 48px; background: var(--surface); border: 1px solid var(--border); }
.round-nav .icon-btn[disabled] { opacity: .35; }
.round-title { text-align: center; }
.round-title .big { font-size: 1.5rem; font-weight: 800; }
.wz-status { text-align: center; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.wz-status.ok { background: var(--success-soft); color: var(--success); }
.wz-status.warn { background: var(--danger-soft); color: var(--danger); }
.wz-list { display: grid; }
.wz-row { padding: 12px 14px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.wz-row:first-child { border-top: 0; }
.wz-who { display: flex; align-items: center; gap: 10px; }
.wz-who .grow { flex: 1; min-width: 0; }
.wz-who .title { font-weight: 700; display: flex; align-items: center; }
.num-row { display: flex; flex-wrap: wrap; gap: 6px; }
.num-chip {
  min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
}
.num-chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.num-chip.blocked { opacity: .35; text-decoration: line-through; }
.num-chip.flash { animation: flash .9s ease; }
.num-chip:active { transform: scale(.95); }
.pts-badge { font-weight: 800; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 999px; }
.pts-badge.pos { background: var(--success-soft); color: var(--success); }
.pts-badge.neg { background: var(--danger-soft); color: var(--danger); }
.round-done { display: grid; gap: 12px; border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.wzgrid tbody tr { cursor: pointer; }
.wzgrid tr.current td, .wzgrid tr.current .cat { background: var(--accent-soft); }
.wzcell { padding: 6px 4px; height: 52px; line-height: 1.1; }
.wzcell b { display: block; font-size: 1.05rem; }
.wzcell small { display: block; font-size: .72rem; font-weight: 600; }
.wzcell small.hit { color: var(--success); }
.wzcell small.miss { color: var(--danger); }
