#book-panel {
  --catalog-paper: #eee4cd;
  --catalog-ink: #35291f;
  --catalog-muted: #66543f;
  --catalog-rule: #b5a080;
  position: absolute;
  top: 100px;
  right: 38px;
  bottom: auto;
  width: 454px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 230px);
  overflow-y: auto;
  padding: 22px 28px 24px;
  border: 1px solid #bba47e;
  border-radius: 2px;
  background: var(--catalog-paper);
  color: var(--catalog-ink);
  box-shadow: 0 18px 48px #0007;
  backdrop-filter: none;
  scrollbar-color: #8b7355 var(--catalog-paper);
  scrollbar-width: thin;
  color-scheme: light;
}
#book-panel::selection,
#book-panel *::selection {
  background: #d4c29d;
  color: #211b15;
}
#book-panel :focus-visible {
  outline: 2px solid #6d3c2b;
  outline-offset: 3px;
}
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--catalog-rule);
  padding-bottom: 12px;
  margin-bottom: 24px;
}
#book-section {
  font: 21px/1.1 var(--serif);
  color: var(--catalog-muted);
}
.catalog-close {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 2px;
  color: var(--catalog-ink);
}
.catalog-close:hover {
  background: #dfd0af;
}
.catalog-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.catalog-volume {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
#book-cover {
  width: 142px;
  height: 212px;
  padding: 16px;
  margin: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 20px/1.2 var(--serif);
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #f6eedf;
  border: 0;
  border-radius: 1px 3px 3px 1px;
  box-shadow: 3px 8px 18px #36281940;
}
#book-cover.has-image {
  padding: 0;
  background: transparent !important;
  box-shadow: 3px 8px 18px #36281940;
}
#book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#book-title {
  font: 40px/1.03 var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
#book-title[data-long="true"] {
  font-size: 30px;
  line-height: 1.1;
}
#book-author {
  font: italic 20px/1.3 var(--serif);
  color: var(--catalog-muted);
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
#book-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}
#book-meta div {
  display: grid;
  gap: 2px;
}
#book-meta dt {
  font:
    12px/1.2 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--catalog-muted);
}
#book-meta dd {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}
.catalog-shelf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 25px 0 20px;
  padding: 12px 0;
  border-top: 1px solid var(--catalog-rule);
  border-bottom: 1px solid var(--catalog-rule);
}
.catalog-shelf > span {
  font-size: 12px;
  color: var(--catalog-muted);
}
#book-location {
  margin: 0;
  font: 17px/1.25 var(--serif);
  color: #74402f;
  text-align: right;
}
.catalog-actions {
  display: flex;
  flex-direction: column;
}
.catalog-read {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 13px 16px;
  background: #513e2d;
  color: #fff3dc;
  border-radius: 2px;
  font-size: 14px;
  margin-bottom: 10px;
  text-decoration: none;
}
.catalog-read:hover {
  background: #6b4934;
}
.catalog-actions svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex: none;
}
.catalog-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid #cbbb9d;
  color: var(--catalog-ink);
  font-size: 14px;
  text-align: left;
}
.catalog-action:hover {
  color: #7c3f2a;
}
.catalog-description {
  margin: 22px 0 0;
  border-top: 1px solid var(--catalog-rule);
  padding-top: 8px;
}
.catalog-description summary {
  min-height: 44px;
  padding: 12px 0;
  color: var(--catalog-muted);
  cursor: pointer;
  font: 18px/1.2 var(--serif);
}
#book-description {
  font: 17px/1.55 var(--serif);
  white-space: pre-line;
  overflow-wrap: anywhere;
  margin: 8px 0 16px;
}
#book-publisher {
  font-size: 12px;
  color: var(--catalog-muted);
  line-height: 1.4;
  margin: 0;
}
@media (max-width: 760px) {
  #book-panel {
    top: 85px;
    right: 14px;
    padding: 16px 20px 20px;
    width: calc(100% - 28px);
    max-height: calc(100dvh - 205px);
  }
  .catalog-header {
    margin-bottom: 20px;
    padding-bottom: 8px;
  }
  #book-section {
    font-size: 20px;
  }
  .catalog-volume {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 18px;
  }
  #book-cover {
    width: 100px;
    height: 150px;
    padding: 12px;
    font-size: 17px;
  }
  #book-title {
    font-size: 34px;
  }
  #book-title[data-long="true"] {
    font-size: 27px;
  }
  #book-author {
    font-size: 19px;
    margin-bottom: 14px;
  }
  #book-meta {
    gap: 8px;
  }
  .catalog-shelf {
    margin-top: 20px;
    margin-bottom: 16px;
  }
}
@media (max-width: 365px) {
  .catalog-volume {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
  }
  #book-cover {
    width: 84px;
    height: 128px;
  }
  #book-title {
    font-size: 30px;
  }
  #book-title[data-long="true"] {
    font-size: 25px;
  }
}
