.cube-gacha-wrap {
  max-width: 700px;
  width: 92vw;
  margin: 16px auto 30px;
}

/* ==== タブ（半分ずつ） ==== */
.cube-tabs {
  margin-bottom: 12px;
}
.cube-tabs__bar {
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}
.cube-tabs__switch {
  display: flex;
  width: 100%;
}
.cube-tabs__switch a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-weight: 700;
  color: #444;
  text-decoration: none;
  background: #f3f4f6;
  border-right: 1px solid #d1d5db;
}
.cube-tabs__switch a:last-child {
  border-right: none;
}
.cube-tabs__switch a.is-active {
  background: #fff;
  color: #111;
  box-shadow: inset 0 -2px 0 #3b82f6;
}

/* ==== フィルタ ==== */
.cube-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}
.cube-chip {
  padding: 6px 10px;
  border-radius: 8px;
  background: #eee;
  color: #333;
  font-weight: 700;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid #ddd;
}
.cube-chip.is-active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* ==== グリッド ==== */
/* デフォは2列（ガチャ） */
.cube-gacha-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 共通：スマホは1列 */
@media (max-width: 900px) {
  .cube-gacha-grid {
    grid-template-columns: 1fr;
  }

  /* exchangeのみスマホでも2列に上書き */
  .cube-gacha-grid.cube-grid--exchange {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* exchangeのみPCで4列 */
@media (min-width: 900px) {
  .cube-gacha-grid.cube-grid--exchange {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* ==== 共通カード ==== */
.cube-card {
  border-radius: 10px;
  overflow: hidden;
}
.cube-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.cube-card__link:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.cube-card:not(.cube-card--exchange) .cube-card__title {
  display: none;
}

.cube-card--exchange .cube-card__title {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff; /* ← 白文字に変更 */
}

/* ==== ガチャ用（従来） ==== */
.cube-card:not(.cube-card--exchange) {
  background: #111;
  color: #fff;
  border: 1px solid #2a2a2a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cube-card:not(.cube-card--exchange) img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #333;
}
.cube-card__body {
  padding: 12px;
}
.cube-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 8px;
}
.cube-meta__remain {
  font-size: 13px;
  opacity: 0.9;
}
.cube-meta__pt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.cube-coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffd54f;
  display: inline-block;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}
.cube-bar {
  height: 12px;
  background: #333;
  border-radius: 999px;
  overflow: hidden;
}
.cube-bar > span {
  display: block;
  height: 100%;
  background: #22c55e;
  width: 0;
} /* 緑＝残量 */

/* ==== exchange交換所（新デザイン） ==== */
.cube-card--exchange {
  background: #fff;
  color: #111;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.cube-card--exchange .cube-thumb {
  height: 150px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cube-card--exchange .cube-thumb img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* === exchange交換所：中央寄せ === */
.cube-card--exchange .cube-foot {
  text-align: center;
}
.cube-card--exchange .cube-card__title,
.cube-card--exchange .cube-foot__title {
  text-align: center;
}
.cube-card--exchange .cube-foot__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.95;
}
.cube-card--exchange .cube-foot__price {
  margin-top: 8px;
  display: inline-block;
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  border: 1px solid #ddd;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* ==== 単体ページ：ラインナップ見出し画像 ==== */
.gacha-lineup-head img {
  display: block;
  width: 100%;
  height: auto;
}

/* === 情報エリアは黒背景 === */
.cube-card__body {
  background: #111;
}

/* exchangeの情報エリアも黒背景 */
.cube-card--exchange .cube-foot {
  padding: 5px 0;
  background: #111;
}

/* === exchange：タイトル白表示 === */
.cube-card--exchange .cube-foot__title {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.cube-card--exchange .cube-card__title {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

/* === exchange：残り数は黄色強調 === */
.cube-card--exchange .cube-meta__remain {
  color: #fff;
}
.cube-card--exchange .cube-meta__remain strong {
  color: #facc15;
}
