:root {
  --bg: #121522;
  --panel: #1d2437;
  --line: #38435f;
  --text: #f8fafc;
  --muted: #c2c9d6;
  --accent: #80ed99;
  --card: #f8fafc;
  --ink: #182033;
  --matched: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button { border: 0; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(680px, 100%); min-height: 100dvh; margin: 0 auto; padding: 16px 14px 22px; }
.topbar, .status-panel, .actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.eyebrow, .status-label { margin: 0 0 4px; color: var(--accent); font-size: .76rem; font-weight: 900; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 9vw, 3.2rem); line-height: .95; }
.icon-button, .secondary { min-height: 44px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-weight: 900; }
.icon-button { width: 46px; }
.secondary { padding: 0 14px; flex: 1; }
.status-panel { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.status-text, .note { margin: 0; color: var(--muted); line-height: 1.35; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.card { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, #35415c, #1f2638); border: 1px solid var(--line); font-size: clamp(1.45rem, 9vw, 2.6rem); font-weight: 1000; box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.card.face { background: var(--card); color: var(--ink); }
.card.matched { background: var(--matched); color: #171717; }
.card:disabled { cursor: default; opacity: .88; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.note { margin-top: 10px; text-align: center; }
