:root {
  color-scheme: dark;
  --phone-scale: 1;
  background: #080d12;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #080d12;
}

body {
  position: fixed;
  top:0;right:0;bottom:0;left:0;inset: 0;
}

/* 556 × (1026 − 38) in the Android reference is the 9:16 game area.
   The host sets --phone-scale = min(viewport.width / 720, viewport.height / 1280).
   Keeping the entry in this logical 720 × 1280 frame preserves v24 typography. */
#phone-frame {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 720px;
  height: 1280px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  transform: translate(-50%, -50%) scale(var(--phone-scale));
  transform-origin: center;
  background: #111a21;
  border: 0;
  border-radius: 0;
}

#entry-frame {
  position: absolute;
  top:0;right:0;bottom:0;left:0;inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  display: block;
  background: #111a21;
}

#entry-frame[hidden] { display: none; }
