/* RODEO Works Gallery — 黒ベース / HDオレンジ・白・茶系 */
.rwg {
  --rwg-bg: #0e0c0b;
  --rwg-card: #171311;
  --rwg-photo: #241c17;
  --rwg-line: #2e2520;
  --rwg-line2: #4a3a2f;
  --rwg-text: #f3ede6;
  --rwg-sub: #c9b9a8;
  --rwg-brown: #c9a27e;
  --rwg-tag: #3a2b21;
  --rwg-orange: #F37021;
  --rwg-ink: #120d0a;
  background: var(--rwg-bg);
  color: var(--rwg-text);
  font-family: "DFP平成ゴシック体W5", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.rwg *, .rwg *::before, .rwg *::after { box-sizing: border-box; }
.rwg img { max-width: 100%; height: auto; }
.rwg a { text-decoration: none; }
.rwg button { font-family: inherit; }

/* 横幅いっぱい（テーマの枠を超える） */
body.rwg-full { overflow-x: clip; }
/* --rwg-vw はスクロールバーを除いた画面幅（rwg.js が設定）。未設定なら 100vw */
body.rwg-full .rwg { width: var(--rwg-vw, 100vw); margin-left: calc(50% - var(--rwg-vw, 100vw) / 2); margin-right: calc(50% - var(--rwg-vw, 100vw) / 2); }
/* Lightning テーマの2カラム（本文＋サイドバー）のままだと本文欄が左に寄り、
   横いっぱいに広げた黒背景も左にずれて右に白い余白が出るため、このページだけ1カラムにする */
body.rwg-full .main-section--col--two { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
body.rwg-full .sub-section--col--two { display: none !important; }
/* パンくずと黒背景の間・フッターとの間の白い余白をなくす
   （テーマの上下の余白と、ショートコードの前後に WordPress が入れる空の段落） */
body.rwg-full .site-body { padding-top: 0 !important; padding-bottom: 0 !important; }
body.rwg-full .entry-body > p:empty { display: none !important; }

.rwg-wrap { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.rwg-eyebrow { font-family: "Oswald", sans-serif; font-size: 14px; letter-spacing: .3em; color: var(--rwg-orange); }
.rwg-eyebrow--sub { color: var(--rwg-brown); font-size: 13px; letter-spacing: .15em; }

/* ヒーロー */
.rwg-hero { display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: flex-end; justify-content: space-between; padding-top: 64px; padding-bottom: 40px; }
.rwg-hero__text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 14px; }
.rwg .rwg-hero__title { margin: 0; padding: 0; border: 0; background: none; font-family: "Oswald", sans-serif; font-weight: 600; font-size: clamp(44px, 7vw, 72px); line-height: 1; letter-spacing: .02em; color: var(--rwg-text); }
.rwg .rwg-hero__title::before, .rwg .rwg-hero__title::after { display: none; }
.rwg-hero__lead { margin: 0; font-size: 16px; line-height: 1.8; color: #d8ccbf; max-width: 640px; }
.rwg-logo-a { width: 280px; flex: none; }

/* 絞り込み */
.rwg-filters { display: flex; flex-direction: column; gap: 18px; padding-bottom: 28px; }
.rwg-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--rwg-line); }
.rwg-tab { min-height: 48px; padding: 0 22px; border: 1px solid #3a2e26; border-radius: 4px; background: transparent; color: #d8ccbf; font-family: "Oswald", sans-serif !important; font-size: 16px; letter-spacing: .08em; cursor: pointer; }
.rwg-tab.is-on { background: var(--rwg-text); border-color: var(--rwg-text); color: var(--rwg-ink); }
.rwg-chips { display: flex; align-items: center; gap: 8px; }
.rwg-chips__label { width: 96px; flex: none; font-family: "Oswald", sans-serif; font-size: 13px; letter-spacing: .15em; color: var(--rwg-brown); }
.rwg-chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.rwg-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rwg-line2); background: transparent; color: #e8e0d8; font-size: 14px; cursor: pointer; white-space: nowrap; }
.rwg-chip:hover, .rwg-tab:hover { border-color: var(--rwg-orange); }
.rwg-chip.is-on { background: var(--rwg-orange); border-color: var(--rwg-orange); color: var(--rwg-ink); font-weight: 700; }
.rwg-chips[hidden] { display: none; }
.rwg-chip__n { margin-left: 6px; font-size: 12px; opacity: .7; }
.rwg-chip.is-empty { opacity: .35; cursor: default; }
.rwg-chip.is-empty:hover { border-color: var(--rwg-line2); }
.rwg-status { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--rwg-sub); }
.rwg-count { font-family: "Oswald", sans-serif; font-size: 24px; color: var(--rwg-text); }
.rwg-reset { background: none; border: 0; color: var(--rwg-orange); font-size: 14px; cursor: pointer; min-height: 44px; padding: 0; }
.rwg button:focus-visible, .rwg a:focus-visible, .rwg-viewer__main:focus-visible { outline: 2px solid var(--rwg-orange); outline-offset: 2px; }

/* カード */
.rwg-results { padding-bottom: 72px; }
.rwg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.rwg-card { display: flex; flex-direction: column; background: var(--rwg-card); border: 1px solid var(--rwg-line); border-radius: 8px; overflow: hidden; color: var(--rwg-text) !important; transition: border-color .15s, transform .15s; }
.rwg-card:hover { border-color: var(--rwg-orange); transform: translateY(-2px); }
.rwg-card[hidden] { display: none; }
.rwg-card__img { position: relative; aspect-ratio: 3 / 2; background: var(--rwg-photo); overflow: hidden; }
.rwg-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rwg-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rwg-card__title { font-family: "Oswald", sans-serif; font-size: 20px; letter-spacing: .03em; line-height: 1.25; }
.rwg-card__note { font-size: 13px; line-height: 1.6; color: var(--rwg-sub); }
.rwg-badge { position: absolute; top: 12px; left: 12px; font-family: "Oswald", sans-serif; font-size: 11px; letter-spacing: .12em; padding: 4px 8px; border-radius: 2px; color: var(--rwg-ink); background: var(--rwg-orange); }
.rwg-badge--tune { background: #fff; }
.rwg-badge--maint { background: var(--rwg-brown); }
.rwg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rwg-tag { font-size: 12px; color: #e6d3bf; background: var(--rwg-tag); border-radius: 3px; padding: 3px 8px; }
.rwg-empty { border: 1px solid var(--rwg-line); border-radius: 8px; padding: 48px 24px; text-align: center; color: var(--rwg-sub); line-height: 1.8; margin-bottom: 24px; }
.rwg-empty[hidden] { display: none; }

/* 詳細 */
.rwg-detail { padding-top: 32px; padding-bottom: 64px; }
.rwg-detail__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.rwg-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--rwg-sub) !important; font-size: 14px; }
.rwg-back:hover { color: var(--rwg-orange) !important; }
.rwg-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.rwg-viewer__main { position: relative; background: var(--rwg-photo); border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.rwg-viewer__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rwg-viewer__nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid var(--rwg-line2); background: rgba(14, 12, 11, .8); color: var(--rwg-text); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.rwg-viewer__nav:hover { border-color: var(--rwg-orange); }
.rwg-viewer__prev { left: 14px; }
.rwg-viewer__next { right: 14px; }
.rwg-viewer__count { position: absolute; left: 16px; bottom: 12px; font-family: "Oswald", sans-serif; font-size: 14px; color: var(--rwg-text); background: rgba(14, 12, 11, .7); padding: 2px 10px; border-radius: 3px; }
.rwg-logo-c { position: absolute; right: 14px; bottom: 14px; width: 84px; border-radius: 3px; pointer-events: none; }
.rwg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 12px; }
.rwg-thumb { padding: 0; border: 0; background: var(--rwg-photo); border-radius: 3px; overflow: hidden; aspect-ratio: 1 / 1; cursor: pointer; opacity: .6; }
.rwg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rwg-thumb.is-on, .rwg-thumb:hover { opacity: 1; outline: 2px solid var(--rwg-orange); outline-offset: 1px; }

.rwg-info { display: flex; flex-direction: column; gap: 20px; }
.rwg .rwg-info__title { margin: 0; padding: 0; border: 0; background: none; font-family: "Oswald", sans-serif; font-weight: 600; font-size: 36px; line-height: 1.15; color: var(--rwg-text); }
.rwg .rwg-info__title::before, .rwg .rwg-info__title::after { display: none; }
.rwg-specs { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; line-height: 1.6; }
.rwg-specs dt { color: var(--rwg-brown); font-weight: normal; margin: 0; }
.rwg-specs dd { margin: 0; }
.rwg-info__note { margin: 0; font-size: 14px; line-height: 1.8; color: #d8ccbf; }
.rwg-info__cta { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--rwg-line); padding-top: 20px; }
.rwg-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.rwg-related__item { display: flex; flex-direction: column; gap: 6px; color: var(--rwg-sub) !important; font-size: 12px; line-height: 1.4; }
.rwg-related__item img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 3px; background: var(--rwg-photo); }
.rwg-related__item:hover { color: var(--rwg-orange) !important; }

/* ボタン */
.rwg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 4px; font-size: 15px; font-weight: 700; text-align: center; line-height: 1.3; }
.rwg-btn--orange { background: var(--rwg-orange); color: var(--rwg-ink) !important; }
.rwg-btn--white { background: #fff; color: var(--rwg-ink) !important; }
.rwg-btn--black { background: var(--rwg-ink); color: #fff !important; }
.rwg-btn--outline { border: 2px solid var(--rwg-ink); color: var(--rwg-ink) !important; }
.rwg-btn--line { border: 1px solid var(--rwg-line2); color: #e8e0d8 !important; font-weight: normal; font-size: 14px; }
.rwg-btn:hover { filter: brightness(1.08); }

/* 相談エリア */
.rwg-cta { background: var(--rwg-orange); color: var(--rwg-ink); }
.rwg-cta__inner { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; padding-top: 56px; padding-bottom: 56px; }
.rwg-cta__text { flex: 1 1 460px; }
.rwg-cta__title { font-family: "Oswald", sans-serif; font-size: 40px; font-weight: 600; line-height: 1.1; margin-bottom: 10px; }
.rwg-cta__text p { margin: 0; font-size: 15px; line-height: 1.8; }
.rwg-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* クレジット */
.rwg-foot { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 56px; padding-bottom: 72px; }
.rwg-logo-b { width: 180px; }
.rwg-credit { font-size: 14px; color: #d8ccbf; text-align: center; letter-spacing: .04em; font-weight: normal; }

/* スマホ下部の固定ボタン */
.rwg-sticky-cta { display: none; }

@media (max-width: 900px) {
  .rwg-detail__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rwg-wrap { padding-left: 16px; padding-right: 16px; }
  .rwg-hero { padding-top: 32px; padding-bottom: 20px; }
  .rwg-hero__lead { font-size: 14px; }
  .rwg-logo-a { width: 200px; }
  .rwg-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rwg-tab { padding: 0 8px; font-size: 14px; }
  /* 分類ボタン：横スクロールにせず折り返して全部見せる */
  .rwg-chips { flex-direction: column; align-items: stretch; gap: 6px; }
  .rwg-chips__label { width: auto; }
  .rwg-chips__list { flex-wrap: wrap; gap: 6px; }
  .rwg-chip { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .rwg-chip__n { margin-left: 4px; font-size: 11px; }

  /* 一覧：横に2台ずつ */
  .rwg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rwg-card { border-radius: 6px; }
  .rwg-card__body { padding: 10px 10px 12px; gap: 6px; }
  .rwg-card__title { font-size: 15px; line-height: 1.3; }
  .rwg-card__note { font-size: 12px; line-height: 1.5; }
  .rwg-badge { top: 6px; left: 6px; font-size: 9px; letter-spacing: .08em; padding: 3px 6px; }
  .rwg-tag { font-size: 11px; padding: 2px 6px; }
  .rwg-info__title { font-size: 28px; }
  .rwg-cta__title { font-size: 30px; }
  .rwg-cta__btns { width: 100%; flex-direction: column; }
  .rwg-viewer__nav { width: 44px; height: 44px; margin-top: -22px; }
  body.rwg-sticky .rwg-sticky-cta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: var(--rwg-bg); border-top: 1px solid var(--rwg-line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  body.rwg-sticky .rwg-sticky-cta .rwg-btn { min-height: 48px; padding: 0 6px; font-size: 13px; }
  body.rwg-sticky .rwg-foot { padding-bottom: 120px; }
}

/* ===== スマホの絞り込みパネル（v1.9.0） ===== */
.rwg-mbar-wrap, .rwg-sheet__head, .rwg-sheet__foot, .rwg-backdrop { display: none; }

@media (max-width: 640px) {
  /* 上部に固定する細いバー。左上のテーマのメニューボタン（34px）と重ならないよう左を空ける */
  .rwg-mbar-wrap { display: block; position: sticky; top: 0; z-index: 900; background: var(--rwg-bg); padding: 6px 12px 8px 50px; border-bottom: 1px solid var(--rwg-line); }
  .rwg-mbar { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--rwg-card); border: 1px solid var(--rwg-line2); border-radius: 6px; color: var(--rwg-text); font-size: 14px; cursor: pointer; text-align: left; }
  .rwg-mbar svg { color: var(--rwg-orange); flex: none; }
  .rwg-mbar__label { flex: none; }
  .rwg-mbar__sel { flex: 1; min-width: 0; color: var(--rwg-brown); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rwg-mbar__n { flex: none; color: var(--rwg-sub); font-size: 13px; }
  .rwg-mbar__n .rwg-count-m { font-family: "Oswald", sans-serif; font-size: 17px; color: var(--rwg-text); margin-right: 2px; }

  /* 絞り込みはパネルにして下に隠す */
  .rwg-filters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; margin: 0; max-width: none; max-height: 82vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: #1d1714; border-top: 1px solid var(--rwg-line2); border-radius: 14px 14px 0 0;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom)); gap: 14px;
    transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .rwg-filters.is-open { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .rwg-filters .rwg-status { display: none; }
  .rwg-filters .rwg-tabs { padding-bottom: 0; border-bottom: 0; }

  .rwg-sheet__head { display: flex; align-items: center; justify-content: center; position: sticky; top: 0; z-index: 1; background: #1d1714; padding: 18px 0 8px; }
  .rwg-sheet__handle { position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--rwg-line2); }
  .rwg-sheet__title { font-size: 15px; font-weight: 700; }
  .rwg-sheet__close { position: absolute; right: -6px; top: 6px; width: 44px; height: 44px; background: none; border: 0; color: var(--rwg-sub); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .rwg-sheet__foot { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; position: sticky; bottom: 0; background: #1d1714; padding-top: 10px; }
  .rwg-sheet__foot .rwg-btn { min-height: 48px; cursor: pointer; border: 0; font-family: inherit; }
  .rwg-sheet__foot .rwg-btn--line { border: 1px solid var(--rwg-line2); background: transparent; }
  .rwg-sheet__apply .rwg-count-a { font-family: "Oswald", sans-serif; font-size: 18px; margin-right: 2px; }

  .rwg-backdrop { display: block; position: fixed; inset: 0; z-index: 1400; background: rgba(0, 0, 0, .6); }
  .rwg-backdrop[hidden] { display: none; }
  body.rwg-sheet-open { overflow: hidden; }
  body.rwg-sheet-open .rwg-sticky-cta { display: none !important; }
}
