:root {
  color-scheme: light;
  --ink: #1f2a2e;
  --cream: #f5efe3;
  --rust: #c15d3c;
  --brass: #d0a24a;
  --teal: #2b7a78;
  --tile: rgba(64, 43, 28, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #f8f1e4, #e7d8c3 55%, #d6c1a9 100%);
  color: var(--ink);
}

.frame {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(140deg, #fdf8ee, #e7d6be);
  box-shadow: 0 24px 50px rgba(31, 42, 46, 0.2);
  display: grid;
  gap: 12px;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 10px 2px;
}

.title-bar h1 {
  font-size: 30px;
  letter-spacing: 0.5px;
  color: #2b1c12;
}

.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.board {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 480px) minmax(180px, 260px);
  align-items: start;
}

.leaderboard {
  background: #f8ead6;
  border-radius: 16px;
  border: 3px solid #4b2e1b;
  padding: 16px;
  min-height: 220px;
}

.leaderboard h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #2b1c12;
  text-align: center;
}

.name-field {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #4b2e1b;
  margin-bottom: 4px;
}

#leaderboard-name {
  width: 100%;
  height: 36px;
  border: 2px solid #9f7249;
  border-radius: 10px;
  background: #fff8ef;
  color: #2b1c12;
  font-size: 15px;
  font-weight: 700;
  padding: 0 10px;
  margin-bottom: 12px;
}

#leaderboard-name:focus {
  outline: 2px solid #2f9a90;
  outline-offset: 1px;
}

.leaderboard ol {
  list-style: decimal;
  padding-left: 22px;
  display: grid;
  gap: 6px;
  color: #2b1c12;
  font-weight: 600;
}

.leaderboard-note {
  margin-top: 12px;
  font-size: 12px;
  color: #5c3b26;
  text-align: center;
}

.other-games {
  text-align: center;
  color: #4b2e1b;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 8px 8px;
}

.other-games a {
  color: #0e5c70;
  text-decoration: none;
}

.other-games a:hover,
.other-games a:focus-visible {
  text-decoration: underline;
}

canvas {
  display: block;
  width: min(92vw, 480px);
  height: auto;
  border-radius: 18px;
  background: #f2e5d2;
  border: 4px solid #402b1c;
}

@media (max-width: 780px) {
  .board {
    grid-template-columns: 1fr;
  }

  .leaderboard {
    width: min(92vw, 480px);
    justify-self: center;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
