:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: #f4efe6;
  color: #1f1f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4efe6;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 520px);
  padding: 24px;
  border: 2px solid #1f1f1f;
  background: #fffdf8;
  box-shadow: 8px 8px 0 #d8cfbe;
}

.header,
.actions,
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

h1,
.scoreboard strong,
.status,
button {
  margin: 0;
}

.scoreboard {
  text-align: right;
}

.status,
.help {
  margin-top: 16px;
  font-size: 0.95rem;
}

.meta {
  margin-top: 12px;
  font-size: 0.9rem;
}

.board {
  --cols: 16;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 2px;
  margin-top: 16px;
  padding: 8px;
  background: #1f1f1f;
  aspect-ratio: 1;
}

.cell {
  background: #efe7d8;
}

.snake-head {
  background: #356b3f;
}

.snake-body {
  background: #4f9158;
}

.food {
  background: #b9472c;
}

.actions,
.controls {
  margin-top: 16px;
}

.controls {
  display: grid;
  gap: 12px;
  justify-items: center;
}

button {
  border: 1px solid #1f1f1f;
  background: #f7f1e7;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

@media (min-width: 720px) {
  .controls {
    display: none;
  }
}
