/* Page chrome on Midnite tokens. Canvas games are untouched. */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, sans-serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px 16px; min-height: 100vh;
}
h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: 0.02em; }
p { margin: 0; font-size: 13px; color: hsl(var(--muted-foreground)); text-align: center; }
a { color: hsl(var(--foreground)); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: hsl(var(--muted-foreground)); }
a:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
#game {
  max-width: 100%; overflow: hidden;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.25);
}
#game canvas {
  display: block; max-width: 100%; height: auto !important;
}
.theme-menu { position: fixed; top: 12px; right: 12px; z-index: 20; }
.theme-menu select {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--input)); border-radius: calc(var(--radius) - 2px);
  padding: 6px 8px; font: inherit; font-size: 13px;
}
/* arcade menu + high-score pages */
.crt { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand-logo {
  height: 44px; width: auto; display: block; margin-bottom: 4px;
  padding: 6px 12px; border-radius: var(--radius);
  background: hsl(240 10% 5.5%); border: 1px solid hsl(var(--border));
}
.board {
  width: min(680px, 100%); padding: 16px; overflow-x: auto;
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
}
.subtitle { letter-spacing: 0.12em; text-transform: uppercase; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
thead th { color: hsl(var(--muted-foreground)); font-weight: 500; padding: 0 6px 10px; text-align: right; }
thead th:nth-child(1), thead th:nth-child(2) { text-align: left; }
tbody td { padding: 10px 6px; text-align: right; border-top: 1px solid hsl(var(--border)); }
tbody td:nth-child(1), tbody td:nth-child(2) { text-align: left; }
tbody td:nth-child(3) { font-weight: 600; }
tbody tr:first-child td:nth-child(2)::after { content: " ♛"; }
td .date { white-space: nowrap; }
td .date, .empty { color: hsl(var(--muted-foreground)); }
.empty { text-align: center; line-height: 2; padding: 32px 0; }
nav.actions { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
nav.actions a.danger { color: hsl(var(--destructive)); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
