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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07080a;
  color: #efe6c4;
  font-family: "DotGothic16", "Noto Sans JP", monospace;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.back {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  color: #efe6c4;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 12px;
  background: rgba(10, 12, 14, 0.72);
  border: 1px solid #c8a44a;
  border-radius: 999px;
}

.back:hover {
  color: #ffe27a;
}

#boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #07080a;
  color: #f0d060;
  letter-spacing: 0.2em;
  z-index: 20;
}

#boot.hidden {
  display: none;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#game {
  display: block;
  background: #102010;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow:
    0 0 0 4px #1a160e,
    0 0 0 6px #c8a44a,
    0 20px 60px rgba(0, 0, 0, 0.55);
}

.toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.toolbar button,
.toolbar-link {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #efe6c4;
  background: #16140f;
  border: 1px solid #8a7038;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}

.toolbar button:hover,
.toolbar-link:hover {
  border-color: #f0d060;
  color: #ffe27a;
}

.pad {
  display: none;
  width: min(420px, 94vw);
  margin-top: 4px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#stick {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 3px solid #8a7038;
  background:
    radial-gradient(circle at 50% 50%, #2a2418 0 22px, transparent 23px),
    #14110c;
  position: relative;
}

#stick::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: #6a5a30;
  box-shadow: inset 0 0 0 2px #c8a44a;
}

.btns {
  display: flex;
  gap: 12px;
  align-items: center;
}

.abtn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid #2a1008;
  color: #1a0804;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

#btn-zap {
  background: radial-gradient(circle at 35% 30%, #ff8a6a, #d03020 55%, #7a1010);
}

#btn-blast {
  background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a020 55%, #8a6010);
}

@media (max-width: 820px), (hover: none) {
  .back {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 5px 10px;
  }

  .pad {
    display: flex;
  }

  body {
    justify-content: flex-start;
    padding-top: 42px;
  }
}
