.line-height12 {
  line-height: 1.2 !important;
}

.custom-text-red {
  color: #cf2e2e;
  font-style: italic;
  font-weight: 700;
}

/* ランキング一覧表 */
.atari-ranking-table th {
  height: 30px;
  font-weight: bold;
  background-color: #dee4f1 !important;
  text-align: center;
  padding: 0.5em;
}

.atari-ranking-table td {
  line-height: 1.5;
  vertical-align: middle;
  padding: 0.5em;
}

.atari-ranking-table td:first-child:not(.kaitori) {
  text-align: center;
}

.atari-ranking-table td:nth-child(3) img {
  width: 70px !important;
  display: block;
  margin: 0 auto;
}

.atari-ranking-table tbody tr:nth-of-type(4n + 1),
.atari-ranking-table tbody tr:nth-of-type(4n + 2) {
  background-color: #ffffff;
}

.atari-ranking-table tbody tr:nth-of-type(4n + 3),
.atari-ranking-table tbody tr:nth-of-type(4n + 4) {
  background-color: #f5f7fa;
}

/* 1～10位は最初から表示するクラス */
.row-visible {
  display: table-row;
}

/* 11～20位は最初は非表示（続きを見るで表示） */
.row-hidden,
.row-hidden-2,
.row-hidden-3 {
  display: none;
}

/* 続きを見るボタンのスタイル例 */
/* ボタンを中央に配置 */
.show-more-button {
  width: 100%;
  margin: 0px auto;
  margin-bottom: 20px;
  padding: 8px 60px;
  border: 2px solid #a3c4f3;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    #e0f0ff,
    #a8d0f0
  ); /* 縦方向のグラデーションに変更 */
  font-size: 14px;
  font-weight: bold;
  font-family: "Segoe UI", sans-serif;
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.show-more-button:hover {
  background: linear-gradient(180deg, #d0e8ff, #90c0e0);
  box-shadow: 0 6px 14px rgba(80, 130, 180, 0.4);
}

@media only screen and (max-width: 782px) {
  .atari-ranking-table td,
  .atari-ranking-table th {
    font-size: 12px;
  }
  .atari-ranking-table td:first-child {
    width: 40px;
  }

  .atari-ranking-table td:nth-child(3) {
    width: 70px;
  }

  .atari-ranking-table td:nth-child(4) {
    width: 90px;
  }
  .atari-ranking-table td:nth-child(4),
  .kaitori {
    line-height: 1.2 !important;
    font-size: 13px !important;
  }
}

/* 基本情報テーブル */
.summary-table td:first-child {
  width: 75px;
  background-color: #fffdf9;
}

/* 当たりカード詳細 */
.card-detail-container {
  position: relative;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #dddddd;
  border-radius: 5px;
  box-shadow: 2px 2px 2px #dddddd;
}

.card-detail-container p {
  margin-bottom: 0px !important;
  line-height: 1.5 !important;
}

.card-detail-container .image-card-value-container {
  display: flex;
  gap: 20px;
}

.card-detail-container .card-info-table {
  margin-top: 5px;
  margin-bottom: 0;
}

.card-detail-container .card-info-table td {
  font-size: 10px;
  padding: 0.5em;
}

.card-detail-container .card-info-table td:first-child {
  background-color: #fffdf9;
  width: 100px;
}

.card-detail-container .ark-block-accordion {
  margin-top: 20px;
}

.card-detail-container .price-trend {
  margin-bottom: 0 !important;
}

.card-detail-container .price-trend th,
.card-detail-container .price-trend td {
  text-align: center;
  padding-right: 0;
  padding-left: 0;
}

.card-detail-container .-point {
  margin-top: 20px;
  margin-bottom: 0;
}

.ark-block-accordion__title {
  background: #fafff4 !important;
  border: 1px solid #dff9cc;
}

.ark-block-accordion__body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.ark-block-accordion__body th {
  line-height: 1.5;
  background-color: #dee4f1 !important;
}

.sp-display {
  display: none !important;
}

.atari-ranking-icon {
  position: absolute;
  top: -20px;
  left: -10px;
  width: 50px !important;
  z-index: 10;
}

@media (max-width: 768px) {
  .card-detail-container {
    padding: 10px !important;
  }

  .card-detail-container .image-card-value-container {
    gap: 10px;
  }

  .pc-display {
    display: none !important;
  }
  .sp-display {
    display: block !important;
  }
}

/* レアリティ目次 */
.sticky-container {
  display: flex;
  position: -webkit-sticky; /* Safari用 */
  position: sticky;
  top: 39px; /* 固定したい位置 */
  z-index: 100; /* 重なり順を調整 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 軽い影を追加して強調 */
  background-color: white;
  overflow-x: auto; /* 横スクロールを許可 */
  -webkit-overflow-scrolling: touch; /* スクロールのスムーズな感覚を追加（特にモバイル用） */
  scrollbar-width: none; /* Firefox用: スクロールバーを非表示にする */
  white-space: nowrap;
  padding: 5px;
  padding-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Chrome, Safari, Edge, Opera用: スクロールバーを非表示にする */
.sticky-container::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .sticky-container {
    width: 100vw;
    transform: translateX(-20px);
  }

  .oripa-tab-buttons {
    font-size: 11px;
  }
}

/* レアリティ目次ボタンCSS */
.atari-rarity-section {
  display: inline-block;
  margin-right: 10px;
  padding: 0px 10px;
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  font-size: 110%;
}

/* レアリティごとの当たりカード表 */
.rarity-table tr:first-child td {
  width: 33%;
  padding: 5px;
  line-height: 1.2;
  background-color: #fffdf9;
}

.rarity-table tr:nth-child(2) td {
  padding: 5px 40px;
}

.rarity-table img {
  display: block;
  margin: 0 auto;
  border-radius: 5px;
  cursor: pointer;
}

/* 3, 4, 5行目の1列目を指定 */
.rarity-table tr:nth-child(n + 3):nth-child(-n + 5) td:nth-child(odd) {
  background-color: #dcecf4;
  width: 15%;
  text-align: center;
  padding: 0;
  padding-right: 3px;
  padding-left: 3px;
}

/* 3, 4, 5行目の2列目を指定 */
.rarity-table tr:nth-child(n + 3):nth-child(-n + 5) td:nth-child(even) {
  text-align: right;
  padding: 0;
  padding-right: 5px;
}

@media (max-width: 768px) {
  .rarity-table {
    font-size: 10px;
  }

  .rarity-table img {
    max-width: 80px !important;
  }

  .rarity-table tr:nth-child(2) td {
    padding: 5px;
  }
}

/* 画像拡大モーダルのスタイル */
.img-modal {
  display: none; /* 初期状態で非表示 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease forwards; /* フェードインのアニメーション */
}

.img-modal-content {
  display: block;
  margin: auto;
  width: 80% !important;
  max-width: 500px !important;
  margin-top: 80px;
  opacity: 0; /* 初期状態で透明 */
  transform: scale(0.8); /* 初期状態で小さめ */
  animation: zoomIn 0.3s ease forwards; /* 拡大のアニメーション */
  border-radius: 15px;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* BOX詳細ブロック：最新価格（シュリンクあり／なしラベル） */
.card-detail-container .box-price-summary-line {
  margin: 0.35em 0;
  line-height: 1.4;
}

.card-detail-container .box-price-summary-value {
  font-size: 1.5em;
  color: #cf2e2e;
  font-weight: bold;
}

/* フェードインのアニメーション */
@keyframes fadeIn {
  from {
    background-color: rgba(0, 0, 0, 0);
  }
  to {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

/* 画像が拡大されるアニメーション */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
