/* Snake-specific canvas, ready screen, impact animation, and touch layout. */
.game-title { position: relative; justify-self: center; }
.beta-label {
  position: absolute;
  top: 2px;
  left: calc(100% + 5px);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.privacy-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.privacy-link:hover { background: transparent; color: var(--text); }
#privacy-open { position: absolute; top: calc(50% + 44px); }
.privacy-view {
  position: absolute;
  inset: 2px;
  z-index: 3;
  padding: clamp(16px, 5vw, 28px);
  overflow: auto;
  background: var(--board);
  color: var(--text);
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}
.privacy-view h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.2; }
.privacy-view h2:focus { outline: none; }
.privacy-view p { margin: 0 0 12px; }
.privacy-view .privacy-status { color: var(--muted); }
.privacy-view .privacy-link { padding-left: 0; color: var(--text); }
#timer {
  display: inline-block;
  min-width: 4ch;
}
.combo-panel {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  color: #194832;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px var(--board), 0 0 6px var(--board);
  transition: opacity 120ms ease-out;
}
:root[data-theme='dark'] .combo-panel { color: #a0d9b7; }
.combo-content {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transform-origin: center top;
}
.combo-caption {
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
#combo-count {
  display: inline-block;
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  .combo-panel { transition: none; }
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--edge);
  background: var(--board);
  touch-action: none;
}
.overlay.ready #overlay-action,
.overlay.finished #overlay-action {
  min-width: 160px;
  min-height: 64px;
  padding: 20px 42px;
  font-size: 24px;
  line-height: 28px;
}
.overlay:not(.ready):not(.finished) .overlay-actions button {
  min-width: 128px;
  min-height: 52px;
  padding: 14px 22px;
  font-size: 20px;
  line-height: 24px;
}
.overlay.finished .overlay-detail {
  margin: 16px 0 24px;
  color: var(--text);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.overlay.finished .overlay-title {
  color: var(--muted);
  font-size: 26px;
  font-weight: 500;
}
.overlay.ready .overlay-title,
.overlay.ready .overlay-detail {
  display: none;
}
#pause,
.mobile-directions,
.mobile-hint {
  display: none;
}
.board-pause {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #087a96;
  font-size: 13px;
  line-height: 18px;
}
.board-pause svg {
  display: block;
  width: 22px;
  height: 22px;
  opacity: var(--pause-opacity, 0.5);
  transition: opacity 120ms ease-out;
}
.board-pause:focus-visible svg {
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .board-pause svg {
    transition: none;
  }
}
:root[data-theme='dark'] .board-pause {
  color: #64d8ed;
}
.board-pause:hover {
  background: transparent;
}
#overlay {
  z-index: 2;
}
canvas:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.game-screen.impact canvas {
  animation: impact 450ms ease-out;
}
@keyframes impact {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-5px);
  }
  35% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(1px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-screen.impact canvas {
    animation: none;
  }
}
/* Touch and small-screen controls. */
@media (max-width: 600px), (pointer: coarse) {
  .hints {
    display: none;
  }
  .mobile-hint {
    display: block;
    margin: 16px 0 12px;
    color: var(--muted);
    font-size: 14px;
  }
  .mobile-directions {
    display: block;
    margin-top: 16px;
  }
  #pause {
    display: inline-block;
  }
}
