:root {
  --grid-line: #d4d4d4;
  --square: #000;
}

body:has(#theme-toggle:checked) {
  --grid-line: #333;
  --square: #fff;
}

.fun-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: calc(100dvh - 200px);
  min-height: 420px;
}

.score {
  font-weight: bold;
  text-align: center;
}

.carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}

.controls-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.carousel-btn {
  cursor: pointer;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.carousel-btn.wide {
  width: auto;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
}

.carousel-label {
  min-width: 22ch;
  text-align: center;
  font-weight: bold;
}

.board-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.board {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
