@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --red: #e8322f;
  --yellow: #ffcd1e;
  --green: #1fa95a;
  --blue: #1d6fe0;
  --ink: #17151f;
  --paper: #fffaf0;
  --bg: #241b3a;
  --bg2: #2f2450;
  --muted: #b9b0d6;
  --radius: 22px;
  --shadow: 0 5px 0 var(--ink);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Fredoka", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(232,50,47,.25), transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(29,111,224,.25), transparent 45%),
    radial-gradient(circle at 30% 95%, rgba(31,169,90,.22), transparent 45%);
  background-attachment: fixed;
  color: #fff;
  font-size: 17px;
  overscroll-behavior: none;
  user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font: inherit; }

/* ---------- Layout ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(var(--safe-top) + 10px) 18px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 24px; letter-spacing: .5px; }
.logo .mini-card {
  width: 30px; height: 42px; border-radius: 6px; background: var(--red);
  border: 3px solid #fff; display: grid; place-items: center; transform: rotate(-12deg);
  font-size: 13px; box-shadow: 0 3px 0 var(--ink); animation: wiggle 4s ease-in-out infinite;
}
.logo .mini-card i { font-style: normal; background: #fff; color: var(--red); border-radius: 50%; width: 22px; height: 30px; display: grid; place-items: center; transform: rotate(25deg); font-weight: 700; }
.kasse-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 99px;
  background: var(--yellow); color: var(--ink); font-weight: 700; box-shadow: 0 3px 0 var(--ink);
  border: 2px solid var(--ink);
}
.kasse-pill .pig { font-size: 20px; display: inline-block; }
.kasse-pill.bump .pig { animation: oink .6s ease; }

main { flex: 1; padding: 4px 16px calc(var(--safe-bottom) + 100px); max-width: 720px; width: 100%; margin: 0 auto; }
.view { animation: viewIn .35s cubic-bezier(.2,1.4,.5,1); }

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px); z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow);
  max-width: 560px; margin: 0 auto;
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; border-radius: 18px;
  color: var(--ink); font-weight: 600; font-size: 13px; transition: background .2s, transform .2s;
}
.tabbar button .ic { font-size: 24px; line-height: 1.1; transition: transform .3s cubic-bezier(.2,2,.4,1); }
.tabbar button.active { background: var(--ink); color: #fff; }
.tabbar button.active .ic { transform: translateY(-2px) rotate(-8deg) scale(1.15); }

/* ---------- Generic ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-size: 26px; margin: 10px 0 12px; }
h3 { font-size: 19px; margin: 18px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }

.card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 16px;
  border: 3px solid var(--ink); box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card.dark { background: var(--bg2); color: #fff; border-color: #120d20; box-shadow: 0 5px 0 #120d20; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 18px; font-weight: 700; font-size: 18px;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.big { width: 100%; padding: 18px; font-size: 22px; border-radius: 22px; }
.btn.red { background: var(--red); color: #fff; }
.btn.yellow { background: var(--yellow); }
.btn.green { background: var(--green); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }
.btn.sm { padding: 8px 12px; font-size: 15px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-col { display: grid; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 8px; border-radius: 99px;
  background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.25); font-weight: 600;
  transition: transform .2s cubic-bezier(.2,2,.4,1), background .2s;
}
.chip.on { background: var(--paper); color: var(--ink); border-color: var(--ink); transform: scale(1.05); box-shadow: 0 3px 0 var(--ink); }
.chip .order { background: var(--ink); color: #fff; border-radius: 99px; min-width: 22px; height: 22px; font-size: 13px; display: grid; place-items: center; }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 22px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
}
.avatar.sm { width: 30px; height: 30px; font-size: 17px; border-radius: 9px; }
.avatar.xl { width: 84px; height: 116px; font-size: 50px; border-radius: 18px; border-width: 4px; box-shadow: 0 6px 0 var(--ink); }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: 14px; border: 3px solid var(--ink); background: #fff; color: var(--ink); font-size: 18px;
  outline: none; user-select: text; min-width: 0; width: 100%;
}
.field input:focus { border-color: var(--blue); }

.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .big-emoji { font-size: 64px; display: block; animation: float 3s ease-in-out infinite; }

/* ---------- Home / Start ---------- */
.hero { text-align: center; padding: 16px 0 8px; position: relative; }
.card-fan { position: relative; height: 150px; margin: 4px auto 26px; width: 260px; }
.card-fan .fc {
  position: absolute; left: 50%; bottom: 0; width: 80px; height: 120px; margin-left: -40px; border-radius: 12px;
  border: 4px solid #fff; box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; transform-origin: 50% 220%;
  font-weight: 700; font-size: 34px; color: #fff; text-shadow: 2px 2px 0 var(--ink);
  animation: fanIn .8s cubic-bezier(.2,1.6,.4,1) both;
}
.card-fan .fc::before { content: ""; position: absolute; inset: 14px 8px; border-radius: 50%; background: rgba(255,255,255,.95); transform: rotate(30deg); z-index: 0; }
.card-fan .fc span { position: relative; z-index: 1; }
.card-fan .fc:nth-child(1) { background: var(--red); --r: -20deg; }
.card-fan .fc:nth-child(2) { background: var(--yellow); --r: -7deg; animation-delay: .08s; }
.card-fan .fc:nth-child(3) { background: var(--green); --r: 7deg; animation-delay: .16s; }
.card-fan .fc:nth-child(4) { background: var(--blue); --r: 20deg; animation-delay: .24s; }
.card-fan .fc span { color: inherit; }
.card-fan .fc:nth-child(1) span { color: var(--red); }
.card-fan .fc:nth-child(2) span { color: #d9a400; }
.card-fan .fc:nth-child(3) span { color: var(--green); }
.card-fan .fc:nth-child(4) span { color: var(--blue); }
.card-fan:active .fc { animation: shuffle .5s ease; }

/* ---------- Game ---------- */
.game-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 6px 0 8px; }
.round-badge { font-size: 15px; color: var(--muted); font-weight: 600; }
.round-big { font-size: 40px; font-weight: 700; line-height: 1; }
.round-big small { font-size: 20px; color: var(--muted); }
.progress { height: 14px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; border: 2px solid #120d20; margin-bottom: 14px; }
.progress > div {
  height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,1.4,.5,1);
  background: repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--yellow) 12px 24px, var(--green) 24px 36px, var(--blue) 36px 48px);
  background-size: 68px 100%; animation: stripes 2s linear infinite;
}

.scoreboard { display: grid; gap: 10px; }
.score-row {
  display: grid; grid-template-columns: 30px 44px 1fr auto; gap: 10px; align-items: center;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 12px;
  box-shadow: 0 4px 0 var(--ink); transition: transform .5s cubic-bezier(.2,1.4,.5,1);
}
.score-row .place { font-weight: 700; font-size: 20px; text-align: center; }
.score-row .name { font-weight: 700; font-size: 19px; line-height: 1.1; }
.score-row .sub { font-size: 13px; color: #6b6585; font-weight: 500; }
.score-row .money { text-align: right; font-weight: 700; font-size: 22px; }
.score-row .money small { display: block; font-size: 13px; color: #6b6585; font-weight: 500; }
.score-row.leader { background: #fff6c9; }
.score-row.loser .money { color: var(--red); }
.uno-dots { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: middle; }

.wait-card { text-align: center; padding: 22px 16px; }
.wait-card .dealer { font-size: 54px; display: inline-block; animation: shuffleHands 1.6s ease-in-out infinite; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
table.rounds { border-collapse: collapse; color: var(--ink); width: 100%; font-variant-numeric: tabular-nums; }
table.rounds th, table.rounds td { padding: 8px 10px; text-align: center; border-bottom: 1px solid #e6dfcc; white-space: nowrap; }
table.rounds th { position: sticky; top: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
table.rounds td:first-child, table.rounds th:first-child { position: sticky; left: 0; background: #f1e9d4; font-weight: 700; z-index: 1; }
table.rounds th:first-child { background: var(--ink); z-index: 2; }
table.rounds tr.clickable:active td { background: #ffe98a; }
table.rounds td.win { background: #d7f5df; font-weight: 700; }
table.rounds td.win::after { content: " 🏆"; font-size: 12px; }
table.rounds td.ouch { color: var(--red); font-weight: 700; }
table.rounds tfoot td { font-weight: 700; background: #fff1b8; border-top: 3px solid var(--ink); }
table.rounds tfoot tr.eur td { background: var(--yellow); }

/* ---------- Overlay / Wizard ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,10,30,.75); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; animation: fadeIn .2s ease;
}
.sheet {
  margin-top: auto; background: var(--bg); border-top: 4px solid var(--ink); border-radius: 28px 28px 0 0;
  padding: 18px 18px calc(var(--safe-bottom) + 18px); max-height: 92vh; overflow-y: auto;
  animation: sheetUp .35s cubic-bezier(.2,1.3,.5,1);
}
.sheet.full { margin-top: 0; height: 100%; max-height: none; border-radius: 0; border: 0; padding-top: calc(var(--safe-top) + 12px); display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.1); }

.wiz-steps { display: flex; gap: 6px; justify-content: center; margin: 0 0 8px; }
.wiz-steps i { width: 10px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.25); transition: all .3s; }
.wiz-steps i.done { background: var(--green); }
.wiz-steps i.cur { width: 28px; background: var(--yellow); }

.wiz-player { display: flex; flex-direction: row; align-items: center; gap: 14px; perspective: 800px; padding: 0 4px; }
.wiz-player .avatar.xl { width: 66px; height: 92px; font-size: 40px; border-radius: 14px; }
.wiz-player .avatar.xl { animation: dealCard .55s cubic-bezier(.2,1.3,.5,1); }
.wiz-q { font-size: 20px; line-height: 1.25; text-align: left; font-weight: 500; }
.wiz-q b { font-weight: 700; }
.display {
  margin: 8px auto 2px; min-width: 180px; text-align: center; font-size: 60px; font-weight: 700; line-height: 1;
  background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 22px; padding: 6px 24px; box-shadow: 0 5px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}
.display.pop { animation: pop .25s ease; }
.display.shake { animation: shake .4s ease; }
.display.uno { background: var(--green); color: #fff; }
.display-eur { text-align: center; color: var(--yellow); font-weight: 600; font-size: 20px; min-height: 26px; }
.quip { text-align: center; min-height: 22px; color: var(--muted); font-size: 16px; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.keypad button {
  height: 54px; border-radius: 16px; background: var(--paper); color: var(--ink); font-size: 30px; font-weight: 700;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .06s, box-shadow .06s;
}
.keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.keypad button.fn { background: #d8d1ea; font-size: 24px; }
.keypad button.fn[data-act="wizClear"] { background: #ff9d9b; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.quick button { padding: 8px 4px; border-radius: 14px; font-weight: 700; font-size: 15px; border: 2px solid var(--ink); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.quick button:nth-child(1) { background: var(--yellow); }
.quick button:nth-child(2) { background: #c5b8f2; }

.uno-btn {
  width: 100%; margin-top: 8px; padding: 11px; border-radius: 20px; font-size: 22px; font-weight: 700;
  background: var(--red); color: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  text-shadow: 2px 2px 0 var(--ink); letter-spacing: 1px;
}
.uno-btn.on { background: var(--green); animation: unoPulse 1s ease-in-out infinite; }
.wiz-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: auto; padding-top: 12px; }

.review-list { display: grid; gap: 8px; }
.review-item { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; padding: 8px 12px; box-shadow: 0 3px 0 var(--ink); animation: slideIn .4s both cubic-bezier(.2,1.3,.5,1); }
.review-item .pts { font-weight: 700; font-size: 22px; }
.review-item .eur { color: #6b6585; font-weight: 600; min-width: 64px; text-align: right; }
.review-item.winner { background: #d7f5df; }

/* ---------- Toast / Celebration ---------- */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 14px); z-index: 300; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 18px;
  box-shadow: var(--shadow); font-weight: 600; max-width: 92vw; text-align: center; animation: toastIn 2.8s ease forwards;
}
.splash { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; pointer-events: none; }
.splash .uno-burst {
  font-size: 96px; font-weight: 700; color: var(--yellow); text-shadow: 5px 5px 0 var(--red), 9px 9px 0 var(--ink);
  -webkit-text-stroke: 3px var(--ink); animation: burst 1.4s cubic-bezier(.2,1.6,.4,1) forwards; transform: rotate(-8deg);
}
.splash .uno-burst small { display: block; font-size: 28px; text-align: center; color: #fff; -webkit-text-stroke: 1px var(--ink); text-shadow: 2px 2px 0 var(--ink); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 260; }

.coin { position: fixed; top: -40px; z-index: 255; font-size: 30px; pointer-events: none; animation: coinFall linear forwards; }

/* ---------- Game over ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 20px 0 10px; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rise .8s both cubic-bezier(.2,1.4,.5,1); }
.podium .block { width: 90px; border: 3px solid var(--ink); border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.podium .p1 .block { height: 120px; background: var(--yellow); }
.podium .p2 .block { height: 85px; background: #d8d1ea; }
.podium .p3 .block { height: 60px; background: #f0a66e; }
.podium .p1 { order: 2; animation-delay: .5s; }
.podium .p2 { order: 1; animation-delay: .25s; }
.podium .p3 { order: 3; animation-delay: .1s; }
.podium .nm { font-weight: 700; }
.crown { font-size: 34px; animation: float 2s ease-in-out infinite; }

/* ---------- History ---------- */
.game-item { display: flex; align-items: center; gap: 12px; }
.game-item .date-block { width: 58px; text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 6px 0; flex-shrink: 0; }
.game-item .date-block b { display: block; font-size: 22px; line-height: 1; }
.game-item .date-block span { font-size: 12px; text-transform: uppercase; }
.game-item .info { flex: 1; min-width: 0; }
.game-item .info .ttl { font-weight: 700; }
.game-item .avatars { display: flex; margin-top: 4px; }
.game-item .avatars .avatar { margin-right: -6px; }
.game-item .sum { font-weight: 700; font-size: 20px; text-align: right; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #d8d1ea; color: var(--ink); font-weight: 600; }
.tag.live { background: var(--green); color: #fff; animation: pulse 1.6s infinite; }

.seg { display: inline-grid; grid-auto-flow: column; background: rgba(255,255,255,.1); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.seg button.on { background: var(--paper); color: var(--ink); }

/* ---------- Stats ---------- */
.jar { display: flex; align-items: center; gap: 16px; }
.jar .pigbig { font-size: 64px; animation: float 3s ease-in-out infinite; }
.jar .amount { font-size: 40px; font-weight: 700; line-height: 1; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.award { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 12px; box-shadow: 0 4px 0 var(--ink); animation: slideIn .5s both cubic-bezier(.2,1.3,.5,1); }
.award .em { font-size: 30px; }
.award .t { font-weight: 700; font-size: 14px; text-transform: uppercase; color: #6b6585; letter-spacing: .5px; }
.award .w { font-weight: 700; font-size: 18px; }
.award .v { font-size: 14px; color: #6b6585; }
.award:nth-child(4n+1) { transform: rotate(-1.2deg); }
.award:nth-child(4n+2) { transform: rotate(1deg); }
.award:nth-child(4n+3) { transform: rotate(.8deg); }
.award:nth-child(4n) { transform: rotate(-.8deg); }

.stat-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stat-table td, .stat-table th { padding: 7px 4px; border-bottom: 1px solid #e6dfcc; text-align: right; font-size: 15px; }
.stat-table th { font-size: 12px; color: #6b6585; text-transform: uppercase; font-weight: 600; }
.stat-table td:first-child, .stat-table th:first-child { text-align: left; white-space: nowrap; }
.stat-table td { font-size: 14px; padding: 7px 3px; }
.stat-table th { font-size: 10.5px; padding: 6px 3px; }
.bar-line { display: grid; grid-template-columns: 90px 1fr 76px; gap: 8px; align-items: center; margin: 6px 0; font-weight: 600; }
.bar-line .bar { height: 22px; border-radius: 8px; border: 2px solid var(--ink); transform-origin: left; animation: growX .9s both cubic-bezier(.2,1.2,.5,1); }
.bar-line .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-line .val { text-align: right; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease forwards; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--c); margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--ink); }

/* ---------- Players ---------- */
.player-item { display: flex; align-items: center; gap: 12px; }
.player-item .nm { font-weight: 700; font-size: 19px; flex: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { font-size: 24px; padding: 6px 0; border-radius: 10px; background: rgba(0,0,0,.05); }
.emoji-grid button.on { background: var(--yellow); outline: 3px solid var(--ink); }
.color-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.color-grid button { width: 38px; height: 38px; border-radius: 12px; border: 3px solid var(--ink); }
.color-grid button.on { transform: scale(1.18) rotate(-8deg); box-shadow: 0 3px 0 var(--ink); }

.score-input-grid { display: grid; gap: 8px; }
.score-input-grid .line { display: grid; grid-template-columns: 34px 1fr 90px 70px; gap: 8px; align-items: center; }
.score-input-grid input { width: 100%; padding: 10px; border-radius: 12px; border: 3px solid var(--ink); font-size: 18px; text-align: right; font-weight: 700; background: #fff; color: var(--ink); user-select: text; }

/* ---------- Animations ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes wiggle { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(8deg) scale(1.08); } }
@keyframes oink { 0% { transform: scale(1); } 30% { transform: scale(1.6) rotate(-15deg); } 60% { transform: scale(.9) rotate(10deg); } 100% { transform: scale(1); } }
@keyframes fanIn { from { transform: rotate(0) translateY(60px) scale(.6); opacity: 0; } to { transform: rotate(var(--r)); } }
@keyframes shuffle { 50% { transform: rotate(calc(var(--r) * -1)) translateY(-14px); } }
@keyframes stripes { to { background-position: 68px 0; } }
@keyframes shuffleHands { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg) translateY(-6px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes dealCard { from { transform: translateX(120vw) rotate(40deg) rotateY(180deg); } }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes shake { 20%,60% { transform: translateX(-8px) rotate(-2deg); } 40%,80% { transform: translateX(8px) rotate(2deg); } }
@keyframes unoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03) rotate(-1deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } }
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, -30px) scale(.8); } 10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -20px); } }
@keyframes burst { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 30% { transform: scale(1.2) rotate(-8deg); opacity: 1; } 75% { transform: scale(1) rotate(-8deg); opacity: 1; } 100% { transform: scale(1.6) rotate(-8deg); opacity: 0; } }
@keyframes coinFall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes rise { from { transform: translateY(80px); opacity: 0; } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
