/* 青松阅览室：竖长书卡。封面本身 3:4，简介在左最多三列竖排。 */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 204px));
  justify-content: start;
  align-items: start;
  gap: 22px 14px;
}

.book-card {
  --book-font: var(--font-heiti);
  --book-green: #3d5c4a;
  --book-blurb-size: 11px;
  --book-blurb-leading: 1.28;
  --book-blurb-cols: 3;
  min-width: 0;
  border: 1px solid var(--line-dark);
  background: #fff;
  overflow: hidden;
  font-family: var(--book-font);
}

.book-card-main {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.book-card-main:hover {
  color: inherit;
  text-decoration: none;
}

.book-card-stage {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: 0;
}

.book-card-blurb-slot {
  position: relative;
  flex: 0 0 calc(var(--book-blurb-size) * var(--book-blurb-leading) * var(--book-blurb-cols));
  width: calc(var(--book-blurb-size) * var(--book-blurb-leading) * var(--book-blurb-cols));
}

.book-card-blurb {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--book-font);
  font-size: var(--book-blurb-size);
  font-weight: 600;

  paint-order: stroke fill;
  line-height: var(--book-blurb-leading);
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  word-break: break-all;
}

.book-card-cover {
  flex: 1 1 auto;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8eee9;
}

.book-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-title {
  margin: 0;
  padding: 5px 8px 6px;
  overflow: hidden;
  background: var(--book-green);
  color: #f4f7f1;
  font-family: var(--book-font);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-card-title-text {
  display: inline-block;
  white-space: nowrap;
  transform-origin: center center;
}

.book-card-tags {
  margin: 0;
  padding: 4px 8px 6px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--book-font);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.book-card-tags-label {
  margin-right: 4px;
}

.book-card-tag {
  color: var(--muted);
  font-size: 11px;
}

.book-card-tag:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 620px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
