:root {
  color-scheme: dark;
  font-family:
    Inter, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  background: #08131b;
  color: #f4f7fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 24% 10%, rgba(55, 184, 212, 0.18), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(222, 76, 96, 0.18), transparent 24%),
    linear-gradient(180deg, #0a121b, #101720 52%, #080b10);
  overflow: hidden;
}

.shell {
  width: min(100%, calc((100vh - 84px) * 16 / 9), 1500px);
  display: grid;
  gap: 12px;
}

.game-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border: 1px solid rgba(221, 232, 239, 0.28);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
  background: #071019;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.manual {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: rgba(244, 247, 251, 0.84);
  font-size: clamp(12px, 1.2vw, 15px);
}

.manual strong {
  color: #ffffff;
}

.touch {
  position: absolute;
  inset: auto 14px 14px;
  display: none;
  align-items: end;
  justify-content: space-between;
  pointer-events: none;
}

.touch button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(8, 15, 24, 0.54);
  font-weight: 800;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.touch-pad,
.touch-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 760px), (pointer: coarse) {
  body {
    padding: 8px;
  }

  .touch {
    display: flex;
  }

  .manual {
    justify-content: start;
  }
}
