:root {
  --bg: #000;
  --text: #fff;
  --muted: #c8c8c8;
  --line: #2a2a2a;
  --btn: #c5d4f5;
  --serif: "Playfair Display", "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: inherit; text-decoration: underline; }
.nav-links a, .nav-brand { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 72px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0 10px; }
.nav-brand img { width: 52px; height: 52px; display: block; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; font-size: 14px; }
.nav-links a.active { text-decoration: underline; }
.hero { text-align: center; padding: 20px 0 14px; }
.wordmark { width: min(300px, 70vw); height: auto; margin: 0 auto 12px; display: block; }
.hero h1 { font-family: var(--serif); font-size: clamp(26px, 4vw, 40px); }
.hero p { color: var(--muted); max-width: 720px; margin: 8px auto 0; font-size: 15px; }
.tools { background: #f3f6ff; color: #111; border-radius: 16px; padding: 10px 12px 8px; margin-bottom: 12px; }
.palette { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.swatch { height: 22px; border: 2px solid transparent; border-radius: 3px; }
.swatch.on { border-color: #111; box-shadow: 0 0 0 1px #111; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; font-size: 13px; color: #4a4a4a; }
.bar button, .wallet-btn {
  background: #fff; border: 1px solid #cfd6e6; border-radius: 999px; padding: 5px 10px; color: #111;
}
.bar button.primary { background: var(--btn); border-color: var(--btn); font-weight: 650; }
.wallet-wrap { position: relative; margin-left: auto; }
.wallet-menu {
  position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid #cfd6e6;
  border-radius: 10px; min-width: 160px; z-index: 5;
}
.wallet-menu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; }
.hint { margin-top: 6px; font-size: 12px; color: #4a4a4a; }
.hint.bad { color: #9b1c1c; }
.hint.good { color: #166534; }
.board-wrap {
  height: min(74vh, 760px);
  overflow: hidden;
  background: #161616;
  border: 1px solid #5a5a5a;
  border-radius: 8px;
  cursor: crosshair;
}
#board {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 0 0;
  background: #000;
}
.howto { margin-top: 28px; color: var(--muted); }
.howto h2 { font-family: var(--serif); color: #fff; margin-bottom: 10px; }
.howto ol { padding-left: 22px; display: grid; gap: 8px; }
footer { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 700px) {
  .palette { grid-template-columns: repeat(8, 1fr); }
}
