/* メルカリアンバサダーの購入ボタン */
.single-post a[href^="https://jp.mercari.com/"][href*="afid=4443462303"] {
  background-color: #d92d37 !important;
}


/* Artist equipment rows: hide empty media and align the desktop text column. */
body.single-post .gdb-standard .gdb-gear > .gdb-image:not(:has(img)),
body.single-post .gdb-native .gdb-gear-row > .gdb-gear-media:not(:has(img)) {
  display: none !important;
}

@media (min-width: 768px) {
  body.single-post .gdb-standard .gdb-gear:is(:has(> .gdb-image:empty), :not(:has(> .gdb-image img))),
  body.single-post .gdb-native .gdb-gear-row:not(:has(img)) {
    grid-template-columns: minmax(0, 33%) minmax(0, 1fr) !important;
  }

  body.single-post .gdb-standard .gdb-gear:not(:has(> .gdb-image img)) > :not(.gdb-image),
  body.single-post .gdb-native .gdb-gear-row:not(:has(img)) > .gdb-gear-copy {
    grid-column: 2;
  }
}


/* 共通機材欄：画像の有無にかかわらずPCの本文を同じ列に揃える。 */
@media (min-width: 768px) {
  body.single-post .gdb-unified-artist section.gdb-unified-gear.gdb-no-image {
    grid-template-columns: minmax(0, 33%) minmax(0, 1fr) !important;
  }
  body.single-post .gdb-unified-artist section.gdb-unified-gear > .gdb-gear-copy {
    grid-column: 2;
  }
}

@media (max-width: 767px) {
  body.single-post .gdb-unified-artist section.gdb-unified-gear.gdb-no-image {
    row-gap: 0 !important;
  }
}

/* 機材欄の購入ボタン。既存リンクの行き先は保持する。 */
body.single-post .gdb-unified-artist section.gdb-unified-gear .gdb-gear-copy a[rel~="sponsored"]:is([href^="https://www.amazon.co.jp/s?"], [href^="https://jp.mercari.com/search?"]) {
  display: inline-flex !important;
  box-sizing: border-box !important;
  width: min(100%, 280px) !important;
  min-height: 46px !important;
  align-items: center;
  justify-content: center;
  padding: 11px 14px !important;
  font-size: 14px !important;
  line-height: 24px !important;
  text-align: center;
}
body.single-post .gdb-unified-artist section.gdb-unified-gear .gdb-gear-copy p:has(> a:only-child[rel~="sponsored"]:is([href^="https://www.amazon.co.jp/s?"], [href^="https://jp.mercari.com/search?"])) {
  margin-block: 8px 0 !important;
}

/* スマホの記事本文から外へはみ出す要素で、ページ全体が横に動くのを防ぐ。 */
@media (max-width: 767px) {
  body.single-post main:has(.gdb-unified-artist) {
    overflow-x: clip;
  }
}

/* バンド一覧では実際の選択肢がある場合だけジャンル欄を表示する。 */
#gdbb-main .gdb-filter-row-v1:has(> .gdbb-chips):not(:has(> .gdbb-chips > button[data-filter]:not([data-filter=""]))) {
  display: none !important;
}

/* 機材一覧と機材詳細の製品写真は元画像の色で表示する。 */
.gdbgl-image img,
.gd44-photo img {
  filter: none !important;
}

/* Frankenstratの既存写真を縦置きで表示。画像の左右反転は行わない。 */
.gdbgl-image:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]) { --gdb-frankenstrat-length: 146px; }
.gd44-photo:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]) { --gdb-frankenstrat-length: 248px; }
.gdb-gear-media:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]) { --gdb-frankenstrat-length: 220px; }
.gdbgl-image:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]),
.gd44-photo:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]),
body.single-post .gdb-unified-artist .gdb-unified-gear > .gdb-image:has(> img[src*="gdb-4323-light-background-Z9vfqBja"]) {
  min-height: var(--gdb-frankenstrat-length) !important;
}
.gdbgl-image > img[src*="gdb-4323-light-background-Z9vfqBja"],
.gd44-photo > img[src*="gdb-4323-light-background-Z9vfqBja"],
body.single-post .gdb-unified-artist .gdb-unified-gear .gdb-image > img[src*="gdb-4323-light-background-Z9vfqBja"] {
  width: min(100%, var(--gdb-frankenstrat-length)) !important;
  height: auto !important;
  max-height: none !important;
  rotate: 90deg;
}
