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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Courier New', Courier, monospace;
  color: #fff;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  /* Lock to the layout viewport so Firefox Android's URL bar show/hide
     can't reflow the canvas (which desynced Phaser's input mapping). */
  position: fixed;
  inset: 0;
}

#game-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  /* Horizontal centering is handled by Phaser's ScaleManager (autoCenter:
     CENTER_BOTH), which writes an explicit margin-left onto the canvas.
     Adding justify-content:center on top of that double-counts the offset --
     flex centres the canvas's *margin box*, so the one-sided margin Phaser
     sets shifts the canvas off-centre on wide (desktop) viewports. Leaving
     the main axis at its default (flex-start) lets Phaser's left margin seat
     the canvas dead-centre. This is a no-op on phones, where the canvas
     already fills the viewport width, so mobile layout is unchanged. Vertical
     centring via align-items is kept as-is for the same reason. */
}

#game-container canvas {
  display: block;
  touch-action: none;
}

/* Native DOM control overlay (see js/domui.js). Container never blocks
   pointer events; only its child controls do. */
#dom-overlay {
  pointer-events: none;
}

/* In-app-browser install hint (see js/inapp.js).
   Shown only when the page is opened inside a messaging/social app browser,
   which hides the normal "Add to Home Screen" / "Install app" path. */
#ll-inapp-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #000;
  border-bottom: 2px solid #fff;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  pointer-events: auto;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
#ll-inapp-banner > div {
  flex: 1 1 auto;
  min-width: 0;
}
#ll-inapp-banner > div > div:first-child {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.1;
}
#ll-inapp-banner > div > div:last-child {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
  line-height: 1.2;
}
#ll-inapp-banner button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
#ll-inapp-banner button:active {
  background: #fff;
  color: #000;
}
