.bookma-book-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 28px;
  align-items: center;
  box-sizing: border-box;
  max-width: 100%;
  margin: 32px 0;
  padding: 32px 40px;
  border-radius: 15px;
  background: #fff;
  color: #333;
  box-shadow: 0 6px 30px rgba(84, 88, 92, 0.06);
}

.bookma-book-card__cover img {
  display: block;
  width: 140px;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 6px 30px rgba(84, 88, 92, 0.1);
}

.bookma-book-card__no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 200px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
  border-radius: 6px;
}

/* デスクトップ: content + actions をまとめて縦並びにし、書影と中央揃え */
.bookma-book-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* タイトル */
.bookma-book-card__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.bookma-book-card__title a {
  color: inherit;
  text-decoration: none;
}

.bookma-book-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 著者 */
.bookma-book-card__contributors {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 10px;
}

.bookma-book-card__contributor-link {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  text-decoration: none;
}

a.bookma-book-card__contributor-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 出版社・出版年月日（横並び） */
.bookma-book-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

/* アクション */
.bookma-book-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.bookma-book-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 200px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}

.bookma-book-card__button--bookma {
  background: #ff7300;
}

.bookma-book-card__button--rakuten {
  background: #5b8ad2;
}

.bookma-book-card__button:hover {
  opacity: 0.86;
}

/* 本棚登録ボタンの ⊕ アイコン */
.bookma-book-card__add-icon {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.bookma-book-card__add-icon::before,
.bookma-book-card__add-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  border-radius: 1px;
}

.bookma-book-card__add-icon::before {
  width: 10px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.bookma-book-card__add-icon::after {
  width: 1.5px;
  height: 10px;
  transform: translate(-50%, -50%);
}

/* エラー表示 */
.bookma-book-card--error {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 14px;
}

/* タブレット */
@media (max-width: 768px) {
  .bookma-book-card {
    grid-template-columns: 110px 1fr;
    column-gap: 20px;
    padding: 24px;
  }

  .bookma-book-card__cover img,
  .bookma-book-card__no-image {
    width: 110px;
  }

  .bookma-book-card__no-image {
    height: 160px;
  }

  .bookma-book-card__title {
    font-size: 17px;
  }

  .bookma-book-card__button {
    min-width: 160px;
    height: 44px;
    font-size: 13px;
  }
}

/* モバイル: __body を display:contents で透過し、actions をフル幅に展開 */
@media (max-width: 560px) {
  .bookma-book-card {
    grid-template-columns: 100px 1fr;
    column-gap: 16px;
    padding: 20px;
    align-items: center;
  }

  .bookma-book-card__body {
    display: contents;
  }

  .bookma-book-card__content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .bookma-book-card__cover img,
  .bookma-book-card__no-image {
    width: 100px;
  }

  .bookma-book-card__no-image {
    height: 148px;
  }

  .bookma-book-card__meta-row {
    gap: 3px;
  }

  .bookma-book-card__meta-label {
    display: none;
  }

  .bookma-book-card__meta-row span + span::before {
    content: '| ';
  }

  .bookma-book-card__actions {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 16px;
    gap: 10px;
  }

  .bookma-book-card__button {
    width: 100%;
    min-width: 0;
  }
}

