:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #6FB6E8;
  font-family: "Baloo 2", "Fredoka", system-ui, -apple-system, sans-serif;
  /* Stop iOS double-tap zoom / text selection getting in the way of taps. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: none;
  overscroll-behavior: none;
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  /* Soft sky-to-grass backdrop frames the board on wide screens. */
  background:
    radial-gradient(120% 80% at 50% 0%, #B6E6FF 0%, #8FD3FF 45%, #6FB6E8 100%);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#game {
  display: block;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(20, 30, 60, 0.35);
  touch-action: none;
}

.back-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1B1B2F;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}

.back-link:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.back-link:active {
  transform: translateY(0);
}
