* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: white;
  background: radial-gradient(ellipse at center, #381263, #0e091c 75%);
  font:
    600 15px system-ui,
    sans-serif;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
main {
  width: min(96vw, calc((100svh - 88px) * 0.57143), 520px);
  padding: 6px 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
h1 {
  font: italic 1000 clamp(16px, 4vw, 23px)/1 system-ui;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin: 0;
}
button,
a {
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  padding: 6px 2px;
  touch-action: manipulation;
}
section {
  position: relative;
  overflow: hidden;
  border-radius: 19px;
  box-shadow:
    0 0 0 2px #ad72ff75,
    0 18px 60px #07061970;
  isolation: isolate;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
}
#score,
#hint,
#notice {
  position: absolute;
  text-align: center;
  left: 0;
  width: 100%;
  pointer-events: none;
  text-shadow:
    0 2px 6px #0b0526,
    0 0 3px #0b0526;
}
#score {
  top: 2%;
}
#score b {
  display: block;
  font-size: clamp(24px, 5vh, 38px);
  letter-spacing: -1px;
}
#score span,
footer {
  color: #dacafa;
  font-size: 12px;
}
#pause {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  background: #301850;
  border: 1px solid #9573d5;
}
#hint {
  top: 45%;
  line-height: 1.5;
  color: #e8ddff;
}
#hint strong {
  font-size: 24px;
  color: white;
}
#notice {
  top: 24%;
  color: #83ffda;
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
}
#panel:not([hidden]) {
  position: absolute;
  inset: 0;
  background: #100623c9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
#panel p {
  color: #e9beff;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
}
h2 {
  font-size: 44px;
  margin: 0 0 10px;
}
#again {
  margin-top: 22px;
  background: #83ffda;
  color: #150933;
  border-radius: 40px;
  padding: 13px 40px;
  font-size: 18px;
}
footer {
  text-align: center;
  margin-top: 10px;
}
@media (max-height: 520px) and (orientation: landscape) {
  main {
    width: calc((100svh - 14px) * 0.57143);
  }
  header {
    position: absolute;
    left: 2vw;
    top: 30%;
    flex-direction: column;
    height: auto;
    gap: 12px;
    width: 20vw;
  }
  h1 {
    font-size: 15px;
  }
  footer {
    position: absolute;
    right: 2vw;
    top: 36%;
    width: 19vw;
  }
  #hint {
    font-size: 11px;
  }
  #hint strong {
    font-size: 15px;
  }
}
#hint span,
#hint em {
  font-size: clamp(11px, 3.6vw, 17px);
  font-weight: 850;
  font-style: normal;
  color: #83ffda;
}
#hint em {
  color: #ffda56;
}
#copy {
  color: #c7baff;
  font-size: 15px;
  min-height: 44px;
  margin-top: 8px;
}
#link {
  width: 88%;
  border-radius: 8px;
  font-size: 16px;
  padding: 8px;
  user-select: text;
  -webkit-user-select: text;
}
@media (orientation: portrait) and (max-height: 620px) {
  footer { margin-top: 4px; font-size: 11px; }
}
