html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

#wrap {
  position: fixed;
  inset: 0;
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#hit {
  position: absolute;
  inset: 0;
  display: grid;
  justify-content: center;
  align-content: center;
  touch-action: manipulation;
}

.cell {
  background: transparent;
}

#tip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-9999px, -9999px);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(30, 30, 30, .92);
  color: rgba(255, 255, 255, .92);
  font: 13px/1.2 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  pointer-events: none;
  white-space: nowrap;
}

#copyright {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font: 11px/1.4 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#copyright:active {
  color: rgba(255, 255, 255, 0.72);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 360ms ease;
  will-change: opacity;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.modal__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(680px, calc(100% - 40px));
  margin: 0 auto;
  padding: max(48px, env(safe-area-inset-top)) 0 max(48px, env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.86);
  font: 14px/1.9 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  letter-spacing: 0.02em;
}

.modal__close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 30;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  color: rgba(255, 255, 255, 0.82);
  font: 32px/1 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 200;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modal__close:focus {
  outline: none;
}

.modal__label {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.modal h2 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(30px, 7vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.modal__lead {
  margin: 0 0 32px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 15px;
}

.modal__section {
  margin-top: 24px;
  max-width: 580px;
}

.modal__section h3 {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modal__section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.modal__links {
  margin-top: 32px;
}

.modal__links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

@media (max-width: 600px) {
  #copyright {
    bottom: max(14px, env(safe-area-inset-bottom));
    font-size: 10px;
  }

  .modal__panel {
    justify-content: flex-start;
    overflow-y: auto;
    width: calc(100% - 36px);
    padding-top: max(72px, env(safe-area-inset-top));
    padding-bottom: max(42px, env(safe-area-inset-bottom));
  }

  .modal__lead {
    font-size: 14px;
  }
}
