* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  background: #1b3a14;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
#game-wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background-color: #1b3a14;
  /* Portrait phone: soft orchard letterbox. Landscape: canvas itself is full-bleed. */
  background-image: url('assets/art/12-bg-sunny-orchard.webp');
  background-size: cover;
  background-position: center;
  touch-action: none;
  overscroll-behavior: none;
}
#game-wrap.landscape {
  background-image: none;
  background-color: #0c1c0a;
}
#game-wrap.portrait::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(12, 28, 10, 0.58);
  pointer-events: none;
  z-index: 0;
}
#game-wrap > * { position: relative; z-index: 1; }
#game {
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  background: #81d4fa;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
#game-wrap.landscape #game {
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  max-height: none;
}
#loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 35, 126, 0.92);
  z-index: 5;
  transition: opacity 0.3s;
}
#loading.hidden { opacity: 0; pointer-events: none; }
.load-card { text-align: center; color: #fff; }
.load-card h1 { font-size: 2rem; margin: 0.4rem 0; }
.load-card p { color: #ffe082; margin-bottom: 1.2rem; }
.splash-emoji { font-size: 3rem; }
.spinner {
  width: 36px; height: 36px; margin: 0 auto;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #ff4081;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#btn-fs { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: #fff; }
}
