.book-covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
  gap: 15px;
  margin-block: 16px;
}
.book-cover {
  position: relative;
  appearance: none;
  font: inherit;
  color: #244334;
  padding: 15px 13px 12px 19px;
  min-height: 132px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 8px;
  text-align: left;
  border: 2px solid #859b78;
  border-left-width: 8px;
  border-radius: 6px 13px 13px 6px;
  background: #e4efd5;
  box-shadow: 3px 4px #d9dfc7;
  cursor: pointer;
}
.book-cover[data-cover="clover"] { background: #cce6bd; }
.book-cover[data-cover="sky"] { background: #d4e9f3; border-color: #84a7b1; }
.book-cover[aria-pressed="true"] { outline: 3px solid #3d694b; outline-offset: 2px; }
.book-cover:focus-visible { outline: 3px solid #70652c; outline-offset: 4px; }
.book-cover strong { font-size: 17px; }
.book-cover span { font-size: 14px; }
.book-cover progress { width: 100%; height: 8px; accent-color: #54845c; }
#book-detail { scroll-margin-top: var(--header-clearance); }
.open-books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.open-book {
  min-width: 0;
  min-height: 150px;
  padding: 12px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: #f7f9ee;
}
.open-book h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.open-book-empty { background: #fafbf6; color: var(--muted); }
.book-slot-badge {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 50%;
  background: #356a4a;
  color: #fffdf2;
  font: 16px Jua, sans-serif;
}
.book-slot-badge[data-slot="2"] { background: #38688e; }
.book-cover .book-slot-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  font-size: 16px;
}
.book-cover .book-slot-badge::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 7px;
  width: 8px;
  height: 8px;
  rotate: 45deg;
  border-radius: 1px;
  background: inherit;
}
.open-book.is-drop-target { border-color: #54845c; background: #e2f0d9; }
.open-book .drawn-sticker {
  width: 76px;
  max-width: 100%;
  padding: 6px;
  gap: 4px;
  border-radius: 10px;
  font-size: 12px;
}
.open-book .drawn-sticker > img { width: min(100%, 51px); }
.open-book .sticker-origin { font-size: 11px; padding-inline: 4px; }
.open-book .drawn-sticker:has(details[open]) { width: 128px; }
.open-book .drawn-sticker[draggable="true"] { cursor: grab; }
.open-book .is-dragging { opacity: .48; }
.move-sticker-button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font: inherit;
  cursor: pointer;
}
.move-sticker-button:disabled { opacity: .55; cursor: not-allowed; }
#shelf-status:not(:empty) { margin-block: 6px; }
.move-notice:has(#move-status:not(:empty)) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid #a0b89a;
  border-radius: 12px;
  background: #edf3e8;
  color: #31583c;
  font-weight: 600;
}
.move-notice:has(#move-status:empty) .move-notice-icon { display: none; }
.move-notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border-radius: 50%;
  background: #38664a;
  color: #fffaf0;
}
.move-notice-icon::before { content: "…"; }
.move-notice[data-state="success"] .move-notice-icon::before { content: "✓"; }
.move-notice[data-state="error"]:has(#move-status:not(:empty)) {
  background: #fff3e6;
  border-color: #d19c71;
  color: #764322;
}
.move-notice[data-state="error"] .move-notice-icon { background: #9b532b; }
.move-notice[data-state="error"] .move-notice-icon::before { content: "!"; }
@media (max-width: 560px) {
  .open-books { grid-template-columns: 1fr; }
}

.book-illustration {
  position: relative;
  display: block;
  width: 60px;
  height: 71px;
  border: 1px solid #628155;
  border-left: 7px solid #628155;
  border-radius: 5px 9px 9px 5px;
  background: #dceac4;
  box-shadow: inset 0 -5px #fff7df, 2px 3px #53664c2f;
}
.book-illustration::before,
.book-illustration::after {
  content: "";
  position: absolute;
}
.book-illustration[data-cover="sprout"]::before {
  inset: 23px 11px 19px;
  background:
    radial-gradient(ellipse at 27% 25%, #79aa53 0 28%, transparent 30%),
    radial-gradient(ellipse at 73% 29%, #608f45 0 28%, transparent 30%),
    linear-gradient(#62894a, #62894a) center bottom / 2px 75% no-repeat;
}
.book-illustration[data-cover="clover"] { background: #cce6a4; }
.book-illustration[data-cover="clover"]::before {
  width: 12px;
  height: 12px;
  top: 20px;
  left: 15px;
  border-radius: 60% 60% 36% 60%;
  background: #46884c;
  box-shadow: 10px 0 #589f57, 0 10px #60a756, 10px 10px #46884c;
  transform: rotate(-15deg);
}
.book-illustration[data-cover="clover"]::after {
  top: 38px;
  left: 23px;
  width: 2px;
  height: 10px;
  border-radius: 2px;
  background: #46884c;
  transform: rotate(18deg);
}
.book-illustration[data-cover="sky"] {
  background: linear-gradient(#73b6e8, #c4eafa);
  border-color: #447eab;
}
.book-illustration[data-cover="sky"]::before {
  top: 24px;
  left: 9px;
  width: 30px;
  height: 11px;
  border-radius: 12px;
  background: #fffdf4;
  box-shadow: 6px 15px 0 -2px #fffdf4;
}
.book-illustration[data-cover="sky"]::after {
  top: 18px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fffdf4;
  box-shadow: 8px 3px #fffdf4, 12px 18px 0 -3px #fffdf4;
}
