* { box-sizing: border-box; }
html { min-height: 100%; background: #dce9de; color: #253f39; }
body { margin: 0; min-height: 100vh; font: 15px system-ui, sans-serif; }
button, a { color: inherit; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #594c30; outline-offset: 4px; }
.pixel-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.pixel-header { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 12px) 5vw 8px; }
.pixel-header span { font: 29px Georgia, serif; letter-spacing: -.045em; }
.pixel-header a { min-height: 44px; display: grid; place-items: center; background: #eff2e1; border-radius: 24px; padding: 0 13px; font-size: 13px; }
.pixel-unit { align-self: center; justify-self: center; width: min(91vw, 370px); padding: 10px 0 25px; }
.pixel-housing {
  border: 3px solid #4a6f66; border-radius: 44% 44% 31% 31% / 23% 23% 23% 23%;
  background: linear-gradient(140deg,#c0e0d0,#87b3a7); padding: 27px 28px 32px;
  box-shadow: inset 8px 7px #f1f4da91, inset -7px -9px #41797157, 0 17px 0 -6px #304f4939, 0 30px 68px #2f635b36;
}
.pixel-housing h1 { font: 650 18px/1.1 monospace; text-transform: lowercase; text-align: center; letter-spacing: .1em; margin: 2px 0 17px; }
.pixel-display {
  background: #cbd2a6; border: 5px solid #4b6557; border-radius: 19px;
  min-height: 215px; padding: 6px 9px 9px; overflow: hidden;
  box-shadow: inset 2px 4px #7181625c, 0 2px #dce6ca; color: #293c30;
  font: 700 12px/1.35 monospace;
}
#pixelHud { height: 19px; display: flex; justify-content: space-between; gap: 7px; font-size: 10px; }
#pixelName { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#pixelSea { width: 100%; display: block; image-rendering: pixelated; }
#pixelMessage { margin: 6px 0 0; min-height: 27px; font-size: 11px; }
#pixelMenu { margin: 0 0 5px; padding: 5px 7px; color: #e0e7be; background: #435440; }
.pixel-keys { display: flex; justify-content: center; gap: 19px; padding-top: 23px; }
.pixel-keys button {
  width: 47px; height: 47px; border: 2px solid #375e58; border-radius: 50%; font: 700 16px monospace;
  color: #25403a; background: #e3efcd; box-shadow: 0 5px #396c61, inset 2px 3px #fff3;
}
.pixel-keys button:active { transform: translateY(3px); box-shadow: 0 2px #396c61; }
#pixelHelp { margin-top: 24px; text-align: center; color: #4c655d; font: 11px monospace; }
@media (max-height: 590px) {
  .pixel-unit { width: min(87vw, 310px); }
  .pixel-housing { padding: 19px 20px 22px; }
  .pixel-display { min-height: 172px; }
  .pixel-keys { padding-top: 16px; }
}
