/* 購入候補の一覧の行（2026-10-21 ユーザー承認のモック _mocks/wish-refresh-20261021 の A＋B）。
   列のそろった詰めた行: 画像・名前とデッキの札・レアリティ・価格・枚数・⋯。行は面（--bg-card）で区切る。
   描くのは static/js/index-wish.js の renderWishlist。⋯ メニューはマイデッキのカードの右クリック（deck.css の .deck-card-menu）と同じ見た目。
   古い行（.wish-card-row。deferred.css・site-theme.css・index.html のスマホ用 grid）とはクラス名を分けて、ぶつからないようにしている。 */
#wishList .wl-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 156px 120px 104px 32px;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-card);
}
/* 値下がり（判定は今と同じ: 5%以上かつ50円以上） */
#wishList .wl-row.wish-drop { background: linear-gradient(90deg, rgba(99, 211, 174, .10), var(--bg-card) 40%); }
/* メニューを開いている行（金の実線＝選択中。マイデッキ・シミュレーターと同じ印） */
#wishList .wl-row.is-menu { box-shadow: inset 0 0 0 1px #f3ce46; }
#wishList .wl-img { width: 40px; height: 58px; border-radius: 3px; overflow: hidden; background: var(--bg-hover); }
#wishList .wl-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
#wishList .wl-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* カード名を押すとカードの価格ページ（行ごとの「価格を見る」は無くした） */
#wishList .wl-name { overflow: hidden; color: var(--text); font-size: .88rem; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
#wishList .wl-name:hover { text-decoration: underline; }
#wishList .wl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
#wishList .wl-tags .wish-deck-tag { margin: 0; border: 0; background: var(--bg-hover); color: var(--accent-l); font-size: .68rem; font-weight: 700; }
/* レアリティの札（E）。押すと小窓（.wl-menu-scroll）で選ぶ */
#wishList .wl-rar {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text);
  font: 600 .74rem var(--font);
  white-space: nowrap;
  cursor: pointer;
}
#wishList .wl-rar span { overflow: hidden; color: inherit; text-overflow: ellipsis; }
#wishList .wl-rar svg { flex: none; color: var(--text-m); }
#wishList .wl-rar:hover { background: #2b3549; }
#wishList .wl-rar.is-open { box-shadow: inset 0 0 0 1px var(--accent-l); }
#wishList .wl-rar:focus-visible { outline: 2px solid #f3ce46; outline-offset: 2px; }
#wishList .wl-price { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
#wishList .wl-price .wish-price-info { font: 700 .92rem var(--mono); color: var(--text); }
/* 価格が無いとき（まだ集めていない・読み込めなかった）は小さな控えめの文字 */
#wishList .wl-price .wl-noprice { font: .72rem var(--font); color: var(--text-m); white-space: normal; }
/* 読み込み中の印（D。以前は「相場データ収集中」の文字） */
#wishList .wl-skel { display: block; width: 64px; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--bg-hover), #2b3549, var(--bg-hover)); background-size: 200% 100%; animation: wl-skel 1.2s linear infinite; }
@keyframes wl-skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #wishList .wl-skel { animation: none; } }
/* 値下がり（D）: 緑の ↓ 札（判定は今までと同じ: 5%以上かつ50円以上） */
#wishList .wl-drop { padding: 1px 6px; border-radius: 4px; background: var(--green); color: #101626; font: 700 .68rem var(--mono); white-space: nowrap; }
/* 枚数: 押しやすい大きさの − N ＋（溝の中） */
#wishList .wl-step { justify-self: end; display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 6px; background: var(--bg); }
#wishList .wl-step button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--text); font: 700 1rem var(--font); line-height: 1; cursor: pointer; }
#wishList .wl-step button:hover { background: var(--bg-hover); }
#wishList .wl-step b { min-width: 28px; text-align: center; font: 700 .88rem var(--mono); color: var(--text); }
#wishList .wl-more { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-m); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#wishList .wl-more:hover, #wishList .wl-row.is-menu .wl-more { background: var(--bg-hover); color: var(--text); }
/* ⋯ メニューの「購入候補から外す」（危ない操作は赤い文字） */
.wl-menu .deck-more-item.is-danger { color: #ff8f94; }
.wl-menu .wl-menu-label { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.wl-menu .wl-ck { display: inline-flex; width: 12px; color: var(--accent-l); }
/* 端までスクロールしてもページへ伝えない（伝わるとページのスクロールで小窓が閉じる） */
.wl-menu.wl-menu-scroll { max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; }

/* 見出し（C）: 数と主操作だけ。ほかは ⋯ */
#wishActions.wl-head { align-items: center; gap: 10px; margin-bottom: 14px; }
#wishActions .wl-title { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
#wishActions .wl-title h2 { margin: 0; color: var(--text); font-size: 1.05rem; font-weight: 700; }
#wishActions .wl-count { color: var(--text-m); font-size: .8rem; }
#wishActions .wl-count b { color: var(--text); font: 700 .8rem var(--mono); }
#wishActions .wish-action-btn.primary { height: 36px; padding: 0 16px; }
#wishActions .wl-head-more { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: var(--bg-hover); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#wishActions .wl-head-more:hover { background: #2b3549; }

/* スマホ〜小型タブレット: 3段（名前と価格／デッキの札／レアリティ・枚数・⋯） */
@media (max-width: 767px) {
  #wishList .wl-row {
    /* 枚数と ⋯ の列は幅を決めて、行ごとに位置がずれないようにする（価格は2列ぶんの右寄せ） */
    grid-template-columns: 40px minmax(0, 1fr) 92px 32px;
    grid-template-areas: "img main price price" "img rar step more";
    column-gap: 8px;
    row-gap: 8px;
    padding: 10px;
  }
  #wishList .wl-img { grid-area: img; align-self: start; }
  #wishList .wl-main { grid-area: main; }
  #wishList .wl-rar { grid-area: rar; align-self: center; }
  #wishList .wl-price { grid-area: price; align-self: start; white-space: nowrap; }
  #wishList .wl-step { grid-area: step; align-self: center; }
  #wishList .wl-more { grid-area: more; align-self: center; }
  #wishActions .wl-title { flex: 1 1 100%; }
  #wishActions .wish-action-btn.primary { flex: 1 1 auto; }
}
