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

html {
  width: 100%;
  height: 100%;
  /* iOS/Android browser chrome */
  height: 100dvh;
  height: -webkit-fill-available;
}

body {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  background: #2a1810;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  /* notch / home indicator */
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

#game-container {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 20%, #7a4a2c 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(245,158,11,.12), transparent 45%),
    radial-gradient(ellipse at 50% 30%, #5c3a24 0%, #2a1810 70%);
  box-shadow: inset 0 0 80px rgba(0,0,0,.35);
}

#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  touch-action: none;
}

/* subtle rotate hint (shown via JS class on tall portrait) */
#orient-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff8f0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

body.show-orient-hint #orient-hint {
  display: block;
}

@media (min-width: 900px) {
  #game-container canvas {
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
    max-width: min(100%, 1200px);
    max-height: min(100%, 720px);
    width: auto !important;
    height: auto !important;
  }
}
