:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef7ff;
  color: #17324d;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.game-frame,
.game-frame *,
#game-container,
#game-container canvas,
.mobile-controls,
.mobile-controls button {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}


html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.96), transparent 34rem),
    linear-gradient(180deg, #e8f5ff 0%, #f7fbff 58%, #e5f2f9 100%);
}

body { padding: 18px; }
.page-shell { width: min(920px, 100%); margin: 0 auto; }

.game-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: #3975a7;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.utility-btn {
  border: 1px solid #b7d4e9;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  padding: 10px 15px;
  color: #17324d;
  font-weight: 750;
  cursor: pointer;
}

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 430px;
  overflow: hidden;
  touch-action: none;
  border: 6px solid rgba(255,255,255,.94);
  border-radius: 24px;
  background: #c5ebff;
  box-shadow: 0 18px 50px rgba(28, 69, 99, .18);
}

#game-container,
#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.loading-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #244c69;
  pointer-events: none;
}

.mobile-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: none;
  justify-content: space-between;
  padding: 0 22px;
  pointer-events: none;
  z-index: 10;
}

.mobile-controls button {
  width: 82px;
  height: 82px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 50%;
  background: rgba(20, 64, 96, .74);
  color: white;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 5px 15px rgba(0,0,0,.2);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

.help-text {
  margin: 12px auto 0;
  text-align: center;
  color: #42657f;
  font-size: .95rem;
}

@media (pointer: coarse), (max-width: 800px) {
  body { padding: 8px; }
  .game-header { align-items: center; }
  .utility-btn { padding: 8px 11px; font-size: .82rem; }
  .game-frame { min-height: 390px; border-radius: 16px; border-width: 4px; }
  .mobile-controls { display: flex; }
  .help-text { font-size: .82rem; }
}
