/* =========================================================================
   idx-v2.css – トップページ・アーカイブ共通レイアウト
   元 index.php の <style> ブロックを抽出。複数テンプレートで再利用するため。
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=JetBrains+Mono:wght@500;700&family=DotGothic16&display=swap');

.idx-v2 {
  --idx-bg: var(--bg-body);
  --idx-bg-2: var(--bg-white);
  --idx-card: var(--bg-card);
  --idx-card-hi: var(--bg-card-hi);
  --idx-line: rgba(245, 184, 0, 0.16);
  --idx-line-2: rgba(245, 184, 0, 0.36);
  --idx-line-mag: rgba(255, 46, 126, 0.32);
  --idx-line-cy: rgba(69, 226, 255, 0.32);
  --idx-ink: var(--text-main);
  --idx-ink-mute: var(--text-light);
  --idx-ink-dim: #5a564a;
  --idx-gold: #f5b800;
  --idx-gold-soft: #ffd96b;
  --idx-gold-deep: #c08600;
  --idx-magenta: #ff2e7e;
  --idx-cyan: #45e2ff;

  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 0;
  background: var(--idx-bg);
  color: var(--idx-ink);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Background atmosphere */
.idx-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 800px at 78% -8%, rgba(245, 184, 0, 0.08), transparent 55%),
    radial-gradient(circle 700px at 18% 65%, rgba(255, 46, 126, 0.045), transparent 60%),
    linear-gradient(180deg, var(--idx-bg) 0%, var(--idx-bg-2) 100%);
  z-index: 0;
}

.idx-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.97 0 0 0 0 0.91 0 0 0 0 0.81 0 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  mix-blend-mode: overlay;
  z-index: 1;
}

.idx-v2 > * {
  position: relative;
  z-index: 2;
}

/* === Section block === */
.idx-section {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(14px);
  animation: idxFadeUp 0.6s ease forwards;
}
.idx-section:nth-of-type(1) { animation-delay: 0.12s; }
.idx-section:nth-of-type(2) { animation-delay: 0.22s; }
.idx-section:nth-of-type(3) { animation-delay: 0.32s; }
.idx-section:nth-of-type(4) { animation-delay: 0.42s; }
.idx-section:nth-of-type(5) { animation-delay: 0.52s; }
.idx-section:nth-of-type(6) { animation-delay: 0.62s; }
@keyframes idxFadeUp {
  to { opacity: 1; transform: none; }
}

/* === Section header === */
.idx-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 26px;
  padding-bottom: 16px;
  position: relative;
}
.idx-section-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--idx-gold) 0%, var(--idx-line) 28%, transparent 100%);
}
.idx-section--mag .idx-section-head::after {
  background: linear-gradient(90deg, var(--idx-magenta) 0%, var(--idx-line-mag) 28%, transparent 100%);
}
.idx-section--cy .idx-section-head::after {
  background: linear-gradient(90deg, var(--idx-cyan) 0%, var(--idx-line-cy) 28%, transparent 100%);
}

.idx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--idx-gold);
  background: rgba(245, 184, 0, 0.09);
  border: 1px solid var(--idx-line-2);
  border-radius: 2px;
  text-transform: uppercase;
  line-height: 1;
}
.idx-tag::before {
  content: "▶";
  font-size: 0.6rem;
}
.idx-section--mag .idx-tag {
  color: var(--idx-magenta);
  background: rgba(255, 46, 126, 0.09);
  border-color: var(--idx-line-mag);
}
.idx-section--cy .idx-tag {
  color: var(--idx-cyan);
  background: rgba(69, 226, 255, 0.09);
  border-color: var(--idx-line-cy);
}

.idx-v2 h1,
.idx-v2 h2 {
  background-image: none;
  background: transparent;
  border-left: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.idx-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.idx-title-en {
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  line-height: 0.92;
  color: var(--idx-ink);
}
.idx-title-jp {
  font-family: 'DotGothic16', monospace;
  font-size: 0.72rem;
  color: var(--idx-gold);
  letter-spacing: 0.12em;
}
.idx-section--mag .idx-title-jp { color: var(--idx-magenta); }
.idx-section--cy  .idx-title-jp { color: var(--idx-cyan); }

.idx-section-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--idx-ink-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  align-self: end;
  padding-bottom: 5px;
}
.idx-section-meta a {
  color: var(--idx-ink-mute);
  text-decoration: none;
  border-bottom: 1px solid var(--idx-line);
  padding-bottom: 1px;
  transition: all 0.2s;
}
.idx-section-meta a:hover {
  color: var(--idx-gold);
  border-color: var(--idx-gold);
}

.idx-section-link {
  color: var(--idx-gold) !important;
  border-bottom: 1px solid var(--idx-line-2) !important;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.idx-section-link:hover {
  color: var(--idx-gold-soft) !important;
  border-color: var(--idx-gold) !important;
}

/* === News (Quest Log) === */
.idx-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--idx-line);
  background:
    linear-gradient(180deg, rgba(245, 184, 0, 0.025), transparent 30%),
    var(--idx-bg-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.idx-news-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22px;
  width: 1px;
  background: linear-gradient(180deg, var(--idx-line-2), transparent);
  opacity: 0.6;
}
.idx-news-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 8px 16px;
  border-bottom: 1px dashed var(--idx-line);
  align-items: center;
  transition: background 0.2s ease;
  position: relative;
}
.idx-news-item:last-child { border-bottom: none; }
.idx-news-item:hover { background: rgba(245, 184, 0, 0.04); }
.idx-news-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--idx-gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--idx-bg-2);
  padding: 1px 5px;
  margin-left: -6px;
  z-index: 1;
}
.idx-news-title {
  color: var(--idx-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.35;
  transition: color 0.2s;
}
.idx-news-item:hover .idx-news-title { color: var(--idx-gold-soft); }
.idx-news-arrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--idx-ink-dim);
  transition: all 0.2s;
  font-size: 0.95rem;
}
.idx-news-item:hover .idx-news-arrow {
  color: var(--idx-gold);
  transform: translateX(4px);
}

/* === Machine grid === */
.idx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  /* カードは正方形サムネ＋下のタイトル/タブ行に高さを合わせる。
     stretch だと行が正方形に固定されタブ行が溢れて切れるため start にする */
  align-items: start;
}

/* 横スクロール版グリッド（NEW ARRIVALS / PAST MACHINES） */
.idx-scroll-wrap {
  position: relative;
}
.idx-scroll-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 8px;
  width: 56px;
  background: linear-gradient(to right, transparent, var(--overlay-fade));
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 1;
}
.idx-scroll-wrap .idx-scroll-arrow {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-60%);
  width: 28px;
  height: 28px;
  background: rgba(245, 184, 0, 0.18);
  border: 1px solid rgba(245, 184, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--idx-gold);
  font-size: 0.95rem;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 2;
}
.idx-scroll-wrap.is-end::after,
.idx-scroll-wrap.is-end .idx-scroll-arrow {
  opacity: 0;
}
.idx-grid--scroll {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.idx-grid--scroll::-webkit-scrollbar { display: none; }
.idx-grid--scroll .new-slot-item {
  flex: 0 0 130px;
  width: 130px;
  scroll-snap-align: start;
}
@media (max-width: 600px) {
  .idx-grid--scroll .new-slot-item {
    flex: 0 0 110px;
    width: 110px;
  }
  .idx-scroll-wrap .idx-scroll-arrow {
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
  }
}

/* Card overrides (preserves original classes for JS) */
.idx-v2 .new-slot-item {
  position: relative;
  background: var(--idx-card);
  border: 1px solid var(--idx-line);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  margin: 0;
  padding: 0;
}
.idx-v2 .new-slot-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 184, 0, 0.18);
  border-color: var(--idx-line-2);
}
.idx-v2 .new-slot-item .thumbnail-container {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--idx-bg);
  border: 0;
  margin: 0;
}
.idx-v2 .new-slot-item .thumbnail-container > a {
  display: block;
  width: 100%;
  height: 100%;
}
.idx-v2 .new-slot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.4s ease;
  filter: saturate(0.92) contrast(1.04);
}
.idx-v2 .new-slot-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.1) contrast(1.1);
}
/* タイトル内の絵文字(🆕等→ img.emoji)が cover ルールで巨大化するのを防ぐ。
   machine-grid.css の .thumbnail-container img{width/height:100%!important} を打ち消す */
.idx-v2 .new-slot-item .thumbnail-container img.emoji,
.idx-v2 .new-slot-item img.emoji {
  width: 1em !important;
  height: 1em !important;
  object-fit: initial !important;
  display: inline-block !important;
  vertical-align: -0.1em;
  margin: 0 1px;
  filter: none !important;
  transform: none !important;
}
  /* タイトルは画像(thumbnail-container)の底部にオーバーレイ（埋め込み表示）。
     position:absolute/bottom:0 は machine-grid.css 由来。タブジャンプ行は画像の下に別途出す */
  margin: 0;
  padding: 30px 14px 10px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  border-top: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  line-height: 1.4;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.idx-v2 .new-slot-item .nsi-title {
  text-decoration: none;
}
.idx-v2 .new-slot-item:hover .nsi-title > p {
  color: var(--idx-gold-soft);
}

/* Bookmark pill */
.idx-v2 .favorite-btn-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}
/* === トップページ お気に入り = ハート単体（影/枠/背景なし） === */
.idx-v2 .fitted-switch-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 0;
  min-height: 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease;
  flex-direction: row;
  gap: 0;
  overflow: visible;
}
.idx-v2 .fitted-switch-btn .fav-heart {
  width: 20px !important;
  height: 18px !important;
  display: block !important;
  margin: 0 !important;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.idx-v2 .fitted-switch-btn .fav-heart-path {
  fill: transparent;
  stroke: var(--idx-gold);
  stroke-width: 2;
  transition: fill 0.25s ease, stroke 0.25s ease, transform 0.2s ease;
  transform-origin: center;
}

.idx-v2 .fitted-switch-btn .label-text,
.idx-v2 .fitted-switch-btn .toggle-switch {
  display: none !important;
}

/* hover: わずか拡大 + ハート内側にうっすらゴールド */
.idx-v2 .fitted-switch-btn:hover {
  transform: scale(1.1) !important;
}
.idx-v2 .fitted-switch-btn:hover .fav-heart-path {
  stroke: #ffd966;
  fill: rgba(245, 184, 0, 0.18);
}

/* ON: 赤塗り＋金枠＋ほんのり発光 */
.idx-v2 .fitted-switch-btn.is-active .fav-heart {
  filter:
    drop-shadow(0 0 5px rgba(220, 50, 50, 0.5))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.idx-v2 .fitted-switch-btn.is-active .fav-heart-path {
  fill: #d9261b;
  stroke: #ffd966;
}
/* ON 時の鼓動アニメ */
.idx-v2 .fitted-switch-btn.is-active .fav-heart-path {
  animation: favHeartBeat 1.6s ease-in-out infinite;
}
@keyframes favHeartBeat {
  0%, 100% { transform: scale(1); }
  18%      { transform: scale(1.18); }
  36%      { transform: scale(1); }
  54%      { transform: scale(1.12); }
  72%      { transform: scale(1); }
}

/* クリック時の押印アニメ（既存 .animate-pop） */
.idx-v2 .fitted-switch-btn.animate-pop .fav-heart {
  animation: favHeartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes favHeartPop {
  0%   { transform: scale(0.7); }
  35%  { transform: scale(1.4); }
  65%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .idx-v2 .fitted-switch-btn.is-active .fav-heart-path,
  .idx-v2 .fitted-switch-btn.animate-pop .fav-heart {
    animation: none;
  }
}
/* 機種ページと統一: ハンコ押印アニメ */
.idx-v2 .fitted-switch-btn.animate-pop {
  animation: idxHankoPunch 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes idxHankoPunch {
  0%   { transform: scale(0.7) rotate(-18deg); }
  30%  { transform: scale(1.35) rotate(8deg); }
  60%  { transform: scale(0.95) rotate(-3deg); }
  100% { transform: scale(1) rotate(-8deg); }
}

/* Per-section badges */
/* NEW バッジは投稿が is-new クラスを持つときのみ表示（14日以内） */
.idx-grid--new .new-slot-item.is-new .thumbnail-container::before {
  content: "NEW";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #000;
  background: var(--idx-gold);
  padding: 3px 9px;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(245, 184, 0, 0.55), inset 0 0 0 1px rgba(255,255,255,0.18);
  line-height: 1;
}

.idx-grid--rec .thumbnail-container::before {
  content: "★ PICK";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--idx-magenta);
  padding: 3px 9px;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(255, 46, 126, 0.55), inset 0 0 0 1px rgba(255,255,255,0.2);
  line-height: 1;
}

.idx-grid--pop { counter-reset: rank; }
.idx-grid--pop .new-slot-item { counter-increment: rank; }
.idx-grid--pop .thumbnail-container::before {
  content: "#" counter(rank, decimal-leading-zero);
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--idx-cyan);
  background: rgba(0, 0, 0, 0.86);
  padding: 4px 10px;
  border: 1px solid var(--idx-line-cy);
  border-radius: 2px;
  text-shadow: 0 0 8px rgba(69, 226, 255, 0.45);
  line-height: 1;
}
/* Top 3 in popular get gold treatment */
.idx-grid--pop .new-slot-item:nth-of-type(-n+3) .thumbnail-container::before {
  color: var(--idx-gold);
  border-color: var(--idx-gold);
  text-shadow: 0 0 9px rgba(245, 184, 0, 0.55);
}

/* === Tools === */
.idx-section:last-of-type { margin-bottom: 0; }
.idx-section .suro-tool-list-wrapper { margin: 0; }
.idx-section .suro-tool-section-heading { color: var(--idx-gold) !important; border-color: var(--idx-line) !important; }
.idx-section .suro-tool-item { background: var(--idx-card) !important; border-color: var(--idx-line) !important; }
.idx-section .suro-tool-item:hover { border-color: var(--idx-gold) !important; }


/* Empty fallback */
.idx-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--idx-ink-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border: 1px dashed var(--idx-line);
  border-radius: 4px;
  margin: 0;
  text-transform: uppercase;
}

/* === Responsive === */
@media (max-width: 920px) {
  .idx-title-en { font-size: 1.95rem; }
}
@media (max-width: 768px) {
  .idx-v2 {
    padding: 16px 12px 0;
  }
  .idx-section { margin-bottom: 56px; }
  .idx-section-head {
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }
  .idx-tag {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    padding: 4px 9px;
    font-size: 0.62rem;
  }
  .idx-section-meta {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    font-size: 0.62rem;
    padding-bottom: 0;
  }
  .idx-title {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .idx-title-en { font-size: 1.55rem; }
  .idx-title-jp { font-size: 0.65rem; }
  .idx-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .idx-news-list::before { left: 12px; }
  .idx-news-item {
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 6px 12px;
  }
  .idx-news-arrow { display: none; }
  .idx-news-date  { font-size: 0.68rem; padding: 1px 4px; margin-left: -5px; }
  .idx-news-title { font-size: 0.8rem; line-height: 1.3; }
  .idx-grid--new .new-slot-item.is-new .thumbnail-container::before,
  .idx-grid--rec .thumbnail-container::before {
    font-size: 0.68rem;
    padding: 2px 7px;
  }
  .idx-grid--pop .thumbnail-container::before {
    font-size: 0.85rem;
    padding: 3px 8px;
  }
  .idx-v2 .fitted-switch-btn { padding: 4px 7px; }
  .idx-v2 .fitted-switch-btn .label-text { font-size: 0.55rem; }
  .idx-v2 .fitted-switch-btn .bookmark-icon { width: 11px; height: 11px; }
  .idx-v2 .new-slot-item .nsi-title > p {
    padding: 22px 7px 7px;
    font-size: 0.68rem;
    line-height: 1.35;
  }
  .idx-tools-list li a {
    padding: 13px 18px;
    font-size: 0.88rem;
    gap: 10px;
  }
  #favorites-list .favorite-item { width: 64px; }
  #favorites-list .favorite-item img { height: 64px; }
}

@media (max-width: 420px) {
  .idx-strip-meta { display: none; }
  .idx-title-en { font-size: 1.35rem; }
}

/* ============ 機種タイル: 画像内オーバーレイ タブジャンプアイコン3つ ============ */
.idx-v2 .machine-jump-row {
  /* サムネ＋タイトルの下に横並びの操作ストリップとして配置（画像に重ねない） */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  padding: 8px 6px;
  background: rgba(10, 10, 16, 0.5);
  border-top: 1px solid var(--idx-line);
}
.idx-v2 .mj-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 4px;
  color: var(--idx-gold);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}
.idx-v2 .mj-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.idx-v2 .mj-icon:hover {
  color: #ffd966;
  background: rgba(245, 184, 0, 0.12);
  transform: scale(1.15);
}
.idx-v2 .mj-icon.is-disabled {
  color: rgba(180, 170, 140, 0.35);
  pointer-events: none;
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}
/* KEEP OUT: 黄×黒のハザードテープを斜めに被せる */
.idx-v2 .mj-icon.is-disabled::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: repeating-linear-gradient(
    -45deg,
    #f5b800 0,
    #f5b800 3px,
    #1a1a1a 3px,
    #1a1a1a 6px
  );
  opacity: 0.85;
  mix-blend-mode: normal;
  pointer-events: none;
  /* テープ風に上下だけ見せて中央のアイコンも少し透ける感 */
  clip-path: polygon(0 30%, 100% 10%, 100% 70%, 0 90%);
}
@media (max-width: 600px) {
  .idx-v2 .machine-jump-row {
    gap: 6px;
    padding: 7px 4px;
  }
  .idx-v2 .mj-icon {
    width: 24px;
    height: 24px;
    padding: 2px;
  }
}

/* ============ 横長リストタイル (検索結果 / 50音検索結果) ============ */
/* 外側の .container パディングを打ち消してフルブリード表示 */
.container .idx-v2 .machine-row-list {
  margin-left: -30px;
  margin-right: -30px;
}
.idx-v2 .machine-row-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--idx-line);
  border-radius: 0;
  margin-bottom: 0;
  transition: background 0.15s ease;
}
.idx-v2 .machine-row-tile:hover {
  background: rgba(245, 184, 0, 0.04);
}
.idx-v2 .machine-row-tile:last-child {
  border-bottom: none;
}
.idx-v2 .mrt-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--idx-bg);
  display: block;
}
.idx-v2 .mrt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.idx-v2 .mrt-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.idx-v2 .mrt-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--idx-fg, #fff);
  text-decoration: none;
  line-height: 1.3;
  word-break: break-word;
}
.idx-v2 .mrt-title:hover { color: var(--idx-gold); }

.idx-v2 .mrt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}
.idx-v2 .mrt-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 184, 0, 0.08);
  border: 1px solid rgba(245, 184, 0, 0.35);
  border-radius: 6px;
  color: var(--idx-gold);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.idx-v2 .mrt-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ハートも同列に同サイズで並べる */
.idx-v2 .mrt-fav.fitted-switch-btn {
  flex-shrink: 0;
  width: 36px !important;
  height: 36px !important;
  margin-left: auto; /* ハートは右端に寄せる */
  padding: 0 !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.idx-v2 .mrt-fav .label-text,
.idx-v2 .mrt-fav .toggle-switch { display: none; }
.idx-v2 .mrt-fav .fav-heart { width: 22px; height: 20px; display: block; }
.idx-v2 .mrt-fav .fav-heart-path { fill: transparent; stroke: var(--idx-gold); stroke-width: 2; }
.idx-v2 .mrt-fav:hover .fav-heart-path { stroke: #ffd966; fill: rgba(245,184,0,0.18); }
.idx-v2 .mrt-fav.is-active .fav-heart-path { fill: #d9261b; stroke: #ffd966; }
.idx-v2 .mrt-btn:hover {
  background: rgba(245, 184, 0, 0.18);
  border-color: #ffd966;
  color: #ffd966;
}
.idx-v2 .mrt-btn.is-disabled {
  color: rgba(180, 170, 140, 0.35);
  border-color: rgba(180, 170, 140, 0.25);
  background: transparent;
  pointer-events: none;
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}
.idx-v2 .mrt-btn.is-disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(245,184,0,0.5) 0,
    rgba(245,184,0,0.5) 3px,
    rgba(26,26,26,0.5) 3px,
    rgba(26,26,26,0.5) 6px
  );
  opacity: 0.4;
  pointer-events: none;
}

/* スマホ */
@media (max-width: 600px) {
  .container .idx-v2 .machine-row-list {
    /* スマホでは .container padding=20px に合わせる */
    margin-left: -20px;
    margin-right: -20px;
  }
  .idx-v2 .machine-row-tile { padding: 8px 12px; gap: 10px; }
  .idx-v2 .mrt-thumb { width: 60px; height: 60px; }
  .idx-v2 .mrt-title { font-size: 0.88rem; }
  .idx-v2 .mrt-btn { width: 34px; height: 34px; }
  .idx-v2 .mrt-btn svg { width: 16px; height: 16px; }
}
