html,
body {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #f2f8ff;
  color: #102942;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#game {
  display: block;
  width: 100vw;
  height: 100dvh;
  background: #fff;
  touch-action: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

#hud {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

#hud .left,
#hud .right {
  pointer-events: auto;
}

#hud .left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  max-width: min(680px, calc(100vw - 140px));
  padding: 7px 10px;
  border: 1px solid rgba(33, 87, 135, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 10px rgba(33, 87, 135, 0.08);
  font-size: 14px;
}

#hud span {
  color: #49667f;
}

#hud strong {
  min-width: 42px;
  color: #0d2c48;
}

button {
  border: 0;
  border-radius: 7px;
  background: #0d2c48;
  color: #fff;
  padding: 8px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #06192a;
}

button:hover {
  filter: brightness(1.12);
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #06192a;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(8, 31, 52, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

#overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  width: min(560px, calc(100vw - 42px));
  box-sizing: border-box;
  border: 2px solid #d3e6f7;
  border-radius: 14px;
  background: #fff;
  color: #102942;
  padding: 26px 30px;
  text-align: center;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.panel h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.04em;
}

.panel p {
  margin: 10px 0;
  line-height: 1.45;
}

.panel button {
  margin-top: 12px;
  margin-right: 6px;
  margin-left: 6px;
  min-width: 96px;
}

.share-status {
  min-height: 1.2em;
  color: #49667f;
  font-size: 13px;
}
