:root:has(.result-book-loading),
body:has(.result-book-loading) {
  background-color: #09080b !important;
  color-scheme: dark;
}

.result-book-loading {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  box-sizing: border-box;
  padding: max(24px, env(safe-area-inset-top, 0px)) 20px max(24px, env(safe-area-inset-bottom, 0px));
  background: radial-gradient(ellipse at 50% 43%, #29202c 0%, #130e19 51%, #09080b 79%);
  color: #f3ebea;
  text-align: center;
}

.result-book-loading[data-appearance="neutral"] {
  background: radial-gradient(ellipse at 50% 44%, #1a161f 0%, #09080b 73%);
}

.result-book-loading__cover {
  display: block;
  flex: none;
  box-sizing: border-box;
  width: min(101px, 28vh);
  height: auto;
  aspect-ratio: 101 / 187;
  border: 1px solid #a49ba1;
  border-radius: 4px 7px 7px 4px;
  object-fit: cover;
  box-shadow: 4px 2px #d7c8b6, 6px 3px #756768, 0 13px 31px #000a;
  transform: rotate(-5deg);
}

.result-book-loading > p {
  margin: 0;
  color: inherit;
  font-size: 17px;
  line-height: 1.5;
  word-break: keep-all;
}

.result-book-loading[data-appearance="book"] > p {
  font-family: SeoulHangang, AppleMyungjo, Batang, serif;
}

.result-book-loading__dots { display: flex; gap: 7px; }

.result-book-loading__dots > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9c6da;
}

.result-book-loading__dots > i:nth-child(2) { background: #9baebc; }
.result-book-loading__dots > i:nth-child(3) { background: #c9ba9e; }

@media (prefers-reduced-motion: no-preference) {
  .result-book-loading__dots > i { animation: result-book-wait 1.4s ease-in-out infinite alternate; }
  .result-book-loading__dots > i:nth-child(2) { animation-delay: 140ms; }
  .result-book-loading__dots > i:nth-child(3) { animation-delay: 280ms; }
}

@keyframes result-book-wait { from { opacity: .46; } to { opacity: 1; } }
