/* ==============================
   素材ページ共通スタイル
   既存の monster.css の d- 命名規則に準拠
   ============================== */

/* パンくずナビ */
.d-breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #555;
}
.d-breadcrumb a {
  color: #555;
  text-decoration: none;
}
.d-breadcrumb a:hover {
  text-decoration: underline;
}

/* ==============================
   素材詳細ページ
   ============================== */

/* 画像 + テーブルの横並びレイアウト */
.item-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.item-image-box {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.item-image-placeholder {
  width: 100%;
  height: 100%;
  background: #e0e0e0;
}

/* 素材情報テーブル */
.item-info-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  flex: 1;
}
.item-info-table th,
.item-info-table td {
  border: 1px solid #ccc;
  padding: 0.4rem 0.75rem;
  text-align: left;
}
.item-info-table th {
  background: #f0f0f0;
  white-space: nowrap;
  width: 6em;
}

/* モンスター逆引きリスト */
.item-monster-list {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.8;
}
.item-monster-list li a {
  color: #0066cc;
  text-decoration: none;
}
.item-monster-list li a:hover {
  text-decoration: underline;
}

/* ==============================
   素材一覧ページ
   ============================== */

.item-list-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.item-list-card {
  width: 90px;
  text-align: center;
}

.item-list-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: #0066cc;
  font-size: 0.8rem;
}
.item-list-card a:hover {
  text-decoration: underline;
}

.item-list-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid #ccc;
  background: #f5f5f5;
  padding: 2px;
}

.item-thumb-placeholder {
  width: 60px;
  height: 60px;
  background: #e0e0e0;
  border: 1px solid #ccc;
  display: block;
}

/* レスポンシブ：スマホでは3列固定 */
@media (max-width: 480px) {
  .item-layout {
    flex-direction: column;
  }
  .item-image-box {
    width: 100px;
    height: 100px;
  }
  .item-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .item-list-card {
    width: auto;
  }
}
