:root {
  color-scheme: light;
  --bg: #f4f1e8;
  --panel: #fffdf7;
  --ink: #1b1b1b;
  --muted: #6e6a61;
  --grid: #ddd5c4;
  --snake: #2f5d50;
  --snake-head: #183b32;
  --food: #b3472f;
  --button: #efe7d8;
  --button-border: #cbbfa8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.site-link {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 2;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(27, 27, 27, 0.08);
}
.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 72px 24px 24px;
}
.panel {
  width: min(100%, 460px);
  background: var(--panel);
  border: 1px solid var(--button-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(27, 27, 27, 0.08);
}
.status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.profile-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}
.profile-name {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
}
.profile-actions,
.auth-actions,
.history-header {
  display: flex;
  gap: 12px;
  align-items: center;
}
.auth-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-view {
  padding: 14px;
  border: 1px solid var(--button-border);
  border-radius: 12px;
  background: #faf6ee;
}
.history-header {
  justify-content: space-between;
}
.history-list {
  margin: 12px 0 0;
  padding-left: 20px;
}
.history-list li {
  margin-bottom: 8px;
  color: var(--ink);
}
.label,
.value,
.message {
  margin: 0;
}
.label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.value {
  font-size: 28px;
  font-weight: 700;
}
.board {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--button-border);
  border-radius: 12px;
  background: #f8f4ea;
}
.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.setting {
  display: grid;
  gap: 8px;
}
select,
input {
  appearance: none;
  border: 1px solid var(--button-border);
  background: var(--button);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
select:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--snake);
  outline-offset: 2px;
}
.actions,
.controls-row {
  display: flex;
  gap: 12px;
}
.actions {
  margin-top: 16px;
}
button {
  appearance: none;
  border: 1px solid var(--button-border);
  background: var(--button);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}
.message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
}
.controls {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 16px;
}
.controls button {
  min-width: 88px;
}
@media (min-width: 721px) {
  .controls {
    display: none;
  }
}
@media (max-width: 480px) {
  .settings {
    grid-template-columns: 1fr;
  }
  .profile-bar {
    align-items: start;
    flex-direction: column;
  }
  .profile-actions,
  .auth-actions,
  .history-header {
    flex-wrap: wrap;
  }
}
