:root {
  color-scheme: light;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  background: #d8c69e;
}

.celest-shell {
  position: relative;
  width: min(100vw, 1536px);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f5edd7;
  box-shadow: 0 18px 55px rgb(40 45 62 / 34%);
}

.celest-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.celest-shell::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 65.1%;
  top: 38.15%;
  width: 6.7%;
  height: 5.65%;
  background: #fffdf6;
  pointer-events: none;
}

.theme-display {
  position: absolute;
  z-index: 3;
  left: 27.45%;
  top: 38.25%;
  width: 37.7%;
  height: 5.4%;
  border: 0;
  outline: 0;
  padding: 0 1.4%;
  color: #253149;
  background: rgb(255 253 246 / 88%);
  font: 500 clamp(10px, 1.35vw, 21px) Georgia, "Yu Mincho", serif;
}

.theme-display:focus {
  box-shadow: inset 0 0 0 2px rgb(190 135 35 / 70%);
}

.hotspot {
  position: absolute;
  z-index: 4;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  color: transparent;
  background: transparent;
}

.hotspot:hover,
.hotspot:focus-visible {
  outline: 2px solid rgb(255 221 137 / 90%);
  outline-offset: -3px;
  box-shadow: 0 0 18px rgb(255 224 138 / 75%);
}

.hotspot:disabled {
  cursor: wait;
}

.dice-button {
  left: 72.45%;
  top: 36.75%;
  width: 7.0%;
  height: 10.4%;
  border-radius: 18%;
}

.dice-button.rolling {
  animation: dice-pulse 0.48s ease-out;
}

.revelation-area {
  position: absolute;
  z-index: 2;
  left: 20.55%;
  top: 55.2%;
  width: 58.15%;
  height: 25.35%;
}

#revelation {
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: 0;
  padding: 2.8% 2.6% 2.3%;
  color: #263149;
  background: rgb(255 253 247 / 92%);
  font: 500 clamp(10px, 1.1vw, 17px) / 1.75 Georgia, "Yu Mincho", serif;
  scrollbar-color: #b98a35 #f3ead8;
}

.metadata {
  position: absolute;
  z-index: 2;
  right: 2.2%;
  top: 1.5%;
  color: #9a6a1d;
  font: 600 clamp(6px, 0.72vw, 11px) Georgia, serif;
  letter-spacing: 0.08em;
}

.clear-button {
  left: 20.4%;
  top: 84.45%;
  width: 11.6%;
  height: 5.3%;
}

.save-button {
  left: 56.3%;
  top: 84.45%;
  width: 10.9%;
  height: 5.3%;
}

.copy-button {
  left: 67.75%;
  top: 84.45%;
  width: 10.9%;
  height: 5.3%;
}

.notice {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 77%;
  transform: translateX(-50%);
  padding: 0.45em 1.3em;
  border: 1px solid #bd8730;
  border-radius: 999px;
  color: #fff8e8;
  background: rgb(28 48 78 / 92%);
  font-size: clamp(8px, 0.9vw, 14px);
  letter-spacing: 0.12em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-aspect-ratio: 3 / 2) {
  body {
    align-content: start;
  }
}

@keyframes dice-pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.13) rotate(7deg);
    filter: brightness(1.35);
    box-shadow: 0 0 30px rgb(255 214 105 / 95%);
  }
  70% {
    transform: scale(0.96) rotate(-4deg);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}
