/* Wizard Punkte – Design-Tokens & Komponenten (Dark only, mobile-first)
   Grundsätze: ein Akzent (Gold), Grün/Rot tragen nur Treffer/Daneben, getönte Schatten,
   feine Körnung gegen Flächenleere, Bewegung nur als Antwort auf eine Handlung. */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0d0b14;
  --bg-2: #120f1d;
  --surface: #171427;
  --surface-2: #1f1b33;
  --surface-3: #292440;
  --line: rgba(236, 226, 255, 0.07);
  --line-strong: rgba(236, 226, 255, 0.14);
  --text: #f2edf9;
  --muted: #a098ba;
  --faint: #6f688a;
  --gold: #e2b254;
  --gold-2: #f4d88a;
  --gold-soft: rgba(226, 178, 84, 0.13);
  --gold-line: rgba(226, 178, 84, 0.5);
  --gold-glow: rgba(226, 178, 84, 0.22);
  --hit: #6bd19c;
  --hit-soft: rgba(107, 209, 156, 0.15);
  --miss: #ee7280;
  --miss-soft: rgba(238, 114, 128, 0.15);
  --shadow: 0 14px 36px rgba(6, 4, 18, 0.55);
  --shadow-sm: 0 4px 14px rgba(6, 4, 18, 0.4);
  --glass: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --z-sticky: 5; --z-sheet: 50; --z-toast: 60; --z-fx: 40;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; overflow: hidden; background: var(--bg); }
body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg);
  background-image:
    radial-gradient(760px 420px at 70% -12%, rgba(226, 178, 84, 0.10), transparent 70%),
    radial-gradient(600px 500px at -10% 110%, rgba(120, 90, 200, 0.10), transparent 70%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
/* Körnung: bricht die digitale Flächenleere, bleibt unterhalb der Wahrnehmungsschwelle */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

#app { height: 100%; display: flex; flex-direction: column; position: relative; z-index: 2; }

/* ---------- Shell ---------- */
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: screen-in 0.3s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + var(--sat)) 16px 8px; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand h1 { font: 600 22px/1 var(--display); margin: 0; letter-spacing: -0.01em; color: var(--gold-2); }
.brand span { font-size: 12px; color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; }
.topbar .actions { display: flex; gap: 6px; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--glass); color: var(--text);
  transition: transform 0.15s var(--spring), background 0.2s, opacity 0.2s;
}
.iconbtn:active { transform: scale(0.9); background: var(--surface-2); }
.iconbtn:disabled { opacity: 0.3; }
.iconbtn svg { width: 22px; height: 22px; }

.main { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; scroll-behavior: auto; }
.main.pad-bottom { padding-bottom: 28px; }
.h2 { font: 600 26px/1.1 var(--display); letter-spacing: -0.015em; margin: 10px 0 0; }
.lead { color: var(--muted); margin: 4px 0 8px; font-size: 14px; text-wrap: pretty; }
.stack { margin-top: 18px; }

/* ---------- Setup ---------- */
.hero { display: flex; align-items: center; gap: 16px; padding: 14px 2px 6px; }
.hero .mark { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 8px 18px rgba(6, 4, 18, 0.5)); }
.hero h2 { font: 600 32px/1.05 var(--display); margin: 0; letter-spacing: -0.02em; }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; text-wrap: pretty; }

.card { background: var(--surface); border-radius: var(--r-xl); padding: 14px; margin-top: 12px; box-shadow: var(--glass), var(--shadow-sm); }
.card h3 { margin: 0 0 10px; font: 600 15px var(--display); font-style: italic; letter-spacing: 0.01em; color: var(--muted); }

.plist { display: flex; flex-direction: column; gap: 8px; }
.prow {
  display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 8px;
  background: var(--surface-2); border-radius: var(--r-md); padding: 6px 6px 6px 8px;
}
.fresh .prow { animation: row-in 0.3s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.seat { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 600 14px var(--display); background: var(--surface-3); color: var(--muted); }
.prow input {
  min-width: 0; width: 100%; height: 44px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; padding: 0 8px; font-size: 16px; font-weight: 600; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.prow input:focus { border-color: var(--gold-line); background: rgba(0, 0, 0, 0.22); }
.prow input::placeholder { color: var(--faint); font-weight: 500; }
.dealerbtn {
  height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); white-space: nowrap;
  transition: all 0.2s var(--ease);
}
.dealerbtn.on { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); color: var(--gold-2); }
.rowtools { display: flex; gap: 2px; }
.rowtools button { width: 36px; height: 40px; border-radius: 10px; color: var(--muted); display: grid; place-items: center; transition: background 0.15s, opacity 0.2s; }
.rowtools button:active { background: var(--surface-3); }
.rowtools button:disabled { opacity: 0.2; }
.rowtools svg { width: 18px; height: 18px; }

.addbtn {
  margin-top: 10px; width: 100%; height: 48px; border-radius: var(--r-md);
  border: 1px dashed var(--line-strong); color: var(--gold-2); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.2s, border-color 0.2s;
}
.addbtn:active { background: var(--gold-soft); border-color: var(--gold-line); }
.addbtn svg { width: 18px; height: 18px; }

.stepper { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 10px; }
.stepbtn {
  height: 56px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--glass);
  font: 600 28px var(--display); color: var(--gold-2); transition: transform 0.15s var(--spring), background 0.2s, opacity 0.2s;
}
.stepbtn:active { transform: scale(0.92); background: var(--surface-3); }
.stepbtn:disabled { opacity: 0.25; }
.stepval { text-align: center; }
.stepval b { display: block; font: 600 34px/1 var(--display); color: var(--text); }
.stepval span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 10px 0 0; text-wrap: pretty; }
.autobtn { margin-top: 10px; width: 100%; min-height: 40px; border-radius: 10px; color: var(--gold-2); font-weight: 700; font-size: 13px; background: var(--gold-soft); padding: 8px 12px; }
.autobtn:active { opacity: 0.8; }

.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switchrow .lbl { font-weight: 700; }
.switchrow .sub { color: var(--muted); font-size: 13px; margin-top: 2px; text-wrap: pretty; }
.switch { width: 54px; height: 32px; border-radius: 16px; background: var(--surface-3); position: relative; flex: none; box-shadow: inset 0 0 0 1px var(--line-strong); transition: background 0.2s, box-shadow 0.2s; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform 0.25s var(--spring), background 0.2s; }
.switch.on { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
.switch.on::after { transform: translateX(22px); background: var(--gold); }

.btn {
  width: 100%; height: 56px; border-radius: var(--r-md); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.15s var(--spring), opacity 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--gold); color: #1b1507; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px var(--gold-glow); }
.btn.primary:disabled { opacity: 0.32; box-shadow: none; }
.btn.ghost { background: var(--surface); box-shadow: var(--glass); color: var(--text); }
.btn.subtle { height: 44px; font-size: 15px; color: var(--muted); font-weight: 600; }
.btn + .btn { margin-top: 10px; }

/* ---------- Game: round header ---------- */
.roundwrap {
  position: sticky; top: 0; z-index: var(--z-sticky); margin: 0 -16px; padding: 2px 16px 10px;
  background: rgba(13, 11, 20, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.roundcard {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  background: rgba(31, 27, 51, 0.6); border-radius: var(--r-lg); padding: 10px 14px;
  box-shadow: var(--glass), var(--shadow);
}
.roundcard.editing { box-shadow: inset 0 0 0 1px var(--gold-line), var(--shadow); }
.cardsnum { text-align: center; min-width: 54px; }
.cardsnum b { display: block; font: 600 40px/1 var(--display); color: var(--gold-2); letter-spacing: -0.02em; }
.cardsnum span { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.roundinfo .rnd { font-weight: 700; font-size: 16px; }
.roundinfo .rnd .of { color: var(--faint); font-weight: 600; }
.roundinfo .dealer { color: var(--muted); font-size: 14px; margin-top: 2px; }
.roundinfo .dealer b { color: var(--text); font-weight: 700; }
.phase { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); transition: all 0.25s var(--ease); }
.pill.on { color: var(--gold-2); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
.pill.done { color: var(--hit); box-shadow: none; }

.editbanner {
  margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); border-radius: var(--r-md); padding: 8px 12px;
  font-size: 14px; color: var(--gold-2); font-weight: 700;
}
.editbanner button { height: 36px; padding: 0 12px; border-radius: 9px; background: rgba(0, 0, 0, 0.28); font-weight: 700; font-size: 13px; }

/* ---------- Game: player rows ---------- */
.rows { display: flex; flex-direction: column; gap: 6px; }
.row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  min-height: 50px; padding: 6px 8px 6px 12px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--glass);
  transition: box-shadow 0.25s var(--ease), background 0.25s, transform 0.2s var(--ease);
  text-align: left; width: 100%;
}
.fresh .row { animation: row-in 0.3s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.row.active { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold-line), 0 8px 24px rgba(226, 178, 84, 0.1); }
.row .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .total { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row .total.neg { color: var(--miss); }
.tag { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; color: var(--gold-2); background: var(--gold-soft); flex: none; }
.vals { display: flex; align-items: center; gap: 6px; }
.bub {
  min-width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font: 600 20px var(--display); font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--faint); padding: 0 8px;
  transition: all 0.2s var(--ease);
}
.bub.set { color: var(--text); }
.bub.hit { background: var(--hit-soft); color: var(--hit); }
.bub.miss { background: var(--miss-soft); color: var(--miss); }
.bub.pop { animation: pop 0.38s var(--spring); }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.arrow { color: var(--faint); font-size: 14px; }

/* ---------- Bottom panel ---------- */
.panel { flex: none; padding: 10px 12px calc(10px + var(--sab)); background: linear-gradient(to bottom, rgba(13, 11, 20, 0), var(--bg) 18px); }
.prompt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 8px; min-height: 28px; }
.prompt .q { font-weight: 700; font-size: 15px; }
.prompt .q b { color: var(--gold-2); }
.prompt .hintline { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.prompt .hintline.warn { color: var(--miss); font-weight: 700; }
.prompt .hintline.ok { color: var(--hit); font-weight: 700; }

.keys { display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 5), 1fr); max-height: 38vh; overflow-y: auto; padding: 2px; margin: -2px; }
.key {
  height: 54px; border-radius: 14px; background: var(--surface-2); box-shadow: var(--glass);
  font: 600 24px var(--display); font-variant-numeric: tabular-nums; color: var(--text);
  transition: transform 0.15s var(--spring), background 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.key:active { transform: scale(0.9); background: var(--surface-3); }
.key:disabled { opacity: 0.2; }
.key.selected { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); color: var(--gold-2); }
.key.hint { box-shadow: inset 0 0 0 1px var(--gold-line), 0 0 18px var(--gold-glow); animation: hint 0.9s var(--ease) 1; }
@keyframes hint { 0%, 100% { background: var(--surface-2); } 50% { background: var(--gold-soft); } }
.key.forbidden { text-decoration: line-through; color: var(--miss); opacity: 0.45; }

.panel .btnrow { display: flex; gap: 8px; margin-top: 10px; }
.panel .btnrow .btn { height: 52px; }
.panel .btnrow .btn.ghost { flex: 0 0 auto; width: auto; padding: 0 16px; }

/* ---------- Tabs ---------- */
.tabs { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px solid var(--line); background: var(--bg); padding: 6px 8px calc(6px + var(--sab)); }
.tab { height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; transition: color 0.2s, background 0.2s; }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--gold-2); background: var(--gold-soft); }
.tab:active { background: var(--surface); }

/* ---------- Ranking ---------- */
.rank { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rank-final { margin-top: 18px; }
.rrow {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--r-md); padding: 10px 14px 10px 10px;
  min-height: 60px; will-change: transform; box-shadow: var(--glass);
}
.fresh .rrow { animation: row-in 0.32s var(--ease) both; animation-delay: calc(var(--i, 0) * 32ms); }
.rrow.lead { background: linear-gradient(90deg, var(--gold-soft), var(--surface) 65%); box-shadow: inset 0 0 0 1px var(--gold-line), 0 8px 24px rgba(226, 178, 84, 0.08); }
.rrow .pos { font: 600 18px var(--display); color: var(--muted); text-align: center; }
.rrow.lead .pos { color: var(--gold-2); }
.rrow .nm { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .gap { color: var(--faint); font-size: 12px; margin-top: 2px; }
.rrow .pts { text-align: right; }
.rrow .pts b { display: block; font: 600 26px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rrow .pts .d { display: inline-block; margin-top: 3px; font-size: 13px; font-weight: 800; padding: 1px 7px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.d.up { color: var(--hit); background: var(--hit-soft); }
.d.down { color: var(--miss); background: var(--miss-soft); }
.crown { width: 18px; height: 18px; vertical-align: -3px; margin-left: 4px; color: var(--gold); }

/* ---------- History ---------- */
.tablewrap { margin: 8px 0 0; }
table.hist { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; }
.hist th, .hist td { padding: 7px 4px; text-align: center; font-size: 13px; border-bottom: 1px solid var(--line); }
.hist th { color: var(--muted); font-weight: 700; font-size: 12px; position: sticky; top: 0; background: var(--bg); z-index: 1; white-space: nowrap; }
.hist th.rc, .hist td.rc { text-align: left; position: sticky; left: 0; background: var(--bg); z-index: 2; min-width: 54px; }
.hist th.rc { z-index: 3; }
.hist td.rc b { display: block; font: 600 15px var(--display); }
.hist td.rc span { font-size: 11px; color: var(--faint); }
.hist td .p { display: block; font: 600 15px var(--display); font-variant-numeric: tabular-nums; }
.hist td .bt { display: block; font-size: 11px; color: var(--faint); }
.hist td .p.hit { color: var(--hit); }
.hist td .p.miss { color: var(--miss); }
.hist tr.edit { transition: background 0.15s; }
.hist tr.edit:active td { background: var(--surface); }
.hist tr.cur td.rc b { color: var(--gold-2); }
.hist tr.cur td { color: var(--faint); font-style: italic; }
.hist tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; }
.hist tfoot td .p { font-size: 17px; }
.hist .pen { width: 14px; height: 14px; color: var(--faint); vertical-align: -2px; margin-left: 2px; }
.hint-text { color: var(--faint); font-size: 13px; text-align: center; margin-top: 12px; text-wrap: pretty; }

/* ---------- Sheet / overlay ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(6, 4, 12, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; z-index: var(--z-sheet);
  animation: fade 0.2s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); box-shadow: var(--glass), 0 -10px 40px rgba(6, 4, 18, 0.6);
  border-radius: 24px 24px 0 0; padding: 14px 16px calc(16px + var(--sab));
  animation: sheet-in 0.42s var(--spring) both;
}
@keyframes sheet-in { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { font: 600 26px var(--display); letter-spacing: -0.015em; margin: 6px 0 2px; }
.sheet .sub { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.sheet .rank { margin-top: 6px; }
.sheet .btn { margin-top: 14px; }
.sheet .rrow .bt { color: var(--faint); font-size: 12px; margin-top: 2px; }
.sheet .rrow .bt b { color: var(--muted); }
.sheet .rrow .pos { animation: fade 0.35s ease 1.1s both; }
.sheetfoot { position: sticky; bottom: calc(-16px - var(--sab)); margin: 0 -16px calc(-16px - var(--sab)); padding: 10px 16px calc(16px + var(--sab)); background: linear-gradient(to bottom, rgba(23, 20, 39, 0), var(--surface) 30%); }
.sheetfoot .btn { margin-top: 0; }
.dialog { align-items: center; padding: 20px; }
.dialog .sheet { border-radius: 20px; max-width: 420px; animation-name: dialog-in; }
@keyframes dialog-in { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog p { color: var(--muted); margin: 4px 0 0; text-wrap: pretty; }

/* ---------- Finish ---------- */
.finish { text-align: center; padding-top: 10px; }
.finish-inline { padding-top: 40px; }
.finish .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.finish .trophy { width: 84px; height: 84px; margin: 10px auto 6px; color: var(--gold); filter: drop-shadow(0 10px 26px var(--gold-glow)); animation: trophy 0.8s var(--spring) both; }
@keyframes trophy { from { transform: scale(0.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.finish h2 { font: 600 42px/1.05 var(--display); margin: 0; color: var(--gold-2); letter-spacing: -0.02em; text-wrap: balance; }
.finish .pts { color: var(--muted); margin-top: 6px; font-size: 15px; }
.finish .pts b { color: var(--text); font: 600 22px var(--display); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-fx); }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + var(--sab)); transform: translateX(-50%);
  background: var(--surface-3); box-shadow: var(--glass), var(--shadow); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; z-index: var(--z-toast);
  animation: toast 2.6s var(--ease) both; max-width: 90vw; text-align: center;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- Hover nur dort, wo es einen Zeiger gibt ---------- */
@media (hover: hover) {
  .key:hover:not(:disabled), .iconbtn:hover:not(:disabled), .stepbtn:hover:not(:disabled) { background: var(--surface-3); }
  .btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
  .row:hover { background: var(--surface-2); }
  .hist tr.edit:hover td { background: var(--surface); }
  .tab:hover { color: var(--muted); }
}

@media (min-width: 600px) {
  #app { max-width: 520px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (max-height: 700px) {
  .key { height: 48px; font-size: 22px; }
  .row { min-height: 46px; }
  .cardsnum b { font-size: 32px; }
  .hero { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
