:root {
  --cream: #FFF4E3; --card: #FFFFFF; --line: #EBD9BF; --ink: #3B2416; --muted: #7A5A44;
  --pink: #C93D63; --plum: #8A5A9E;
  --display: 'Baloo 2', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-weight: 700; touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; }
button:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
svg { display: block; }

#app { max-width: 520px; margin: 0 auto; height: 100dvh; padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 12px); display: flex; flex-direction: column; gap: 8px; }

.topbar { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.stat { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.stat small { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat b { font-family: var(--display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }

.stage { position: relative; flex: 1; min-height: 0; border-radius: 22px; overflow: hidden; border: 3px solid var(--ink); background: #F3E8F6; }
#board { width: 100%; height: 100%; display: block; }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(255, 244, 227, .72); }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 22px 20px; text-align: center; max-width: 340px; width: 100%; box-shadow: 0 6px 0 var(--ink); }
.card h1, .card h2 { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; margin: 6px 0 10px; color: var(--plum); }
.card p { margin: 0 0 14px; font-size: 16px; line-height: 1.35; }
.hero-pup { width: 170px; margin: 0 auto; }
.final { display: flex; flex-direction: column; align-items: center; margin: 4px 0 10px; }
.final b { font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; }
.final small { font-size: 14px; color: var(--muted); }
#finalNote { font-size: 14px; color: var(--muted); }
.big-btn { display: block; width: 100%; padding: 14px; border-radius: 16px; background: var(--pink); color: #fff; font-family: var(--display); font-weight: 800; font-size: 24px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); margin-top: 6px; }
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
