:root {
    --ink: #14161c;
    --ink-soft: #5b6472;
    --paper: #f5f6f4;
    --card: #ffffff;
    --line: #dadde3;
    --line-soft: #e8eaed;
    --tm-blue: #155eef;
    --tm-blue-ink: #0d3fb0;
    --tm-yellow: #ffc93c;
    --corse-grey: #5b6169;
    --corse-grey-ink: #383c42;
    --tag-mx: #d94f3b;
    --tag-en: #2f8f5b;
    --tag-sm: #155eef;
    --tag-jr: #8a5cf6;
    --tag-other: #6b7280;
    --focus: #0d3fb0;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --ink: #edeef0;
      --ink-soft: #9aa2b1;
      --paper: #0e0f13;
      --card: #17191f;
      --line: #2a2e37;
      --line-soft: #22252c;
      --tm-blue: #4c86ff;
      --tm-blue-ink: #cfe0ff;
      --corse-grey: #aeb4bd;
      --corse-grey-ink: #d7dadf;
      --tag-mx: #ef7a68;
      --tag-en: #58c98a;
      --tag-sm: #4c86ff;
      --tag-jr: #b39dfb;
      --tag-other: #9aa2b1;
      --focus: #9ec1ff;
    }
  }
  :root[data-theme="dark"] {
    --ink: #edeef0; --ink-soft: #9aa2b1; --paper: #0e0f13; --card: #17191f;
    --line: #2a2e37; --line-soft: #22252c; --tm-blue: #4c86ff; --tm-blue-ink: #cfe0ff;
    --corse-grey: #aeb4bd; --corse-grey-ink: #d7dadf;
    --tag-mx: #ef7a68; --tag-en: #58c98a; --tag-sm: #4c86ff; --tag-jr: #b39dfb; --tag-other: #9aa2b1;
    --focus: #9ec1ff;
  }
  :root[data-theme="light"] {
    --ink: #14161c; --ink-soft: #5b6472; --paper: #f5f6f4; --card: #ffffff;
    --line: #dadde3; --line-soft: #e8eaed; --tm-blue: #155eef; --tm-blue-ink: #0d3fb0;
    --corse-grey: #5b6169; --corse-grey-ink: #383c42;
    --tag-mx: #d94f3b; --tag-en: #2f8f5b; --tag-sm: #155eef; --tag-jr: #8a5cf6; --tag-other: #6b7280;
    --focus: #0d3fb0;
  }

  * { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0; background: var(--paper); color: var(--ink);
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  body { overflow-x: hidden; }

  .mono { font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace; font-variant-numeric: tabular-nums; }

  /* ---------- Notice banner (meta note about this artifact, not site chrome) ---------- */

  /* ---------- Diagonal hero band (matches the real site's photo-band treatment) ---------- */

  .eyebrow {
    font-size: 12px; font-weight: 900; letter-spacing: 0.14em;
    text-transform: uppercase; margin: 0 0 10px;
  }
  h1 {
    font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -0.01em;
    margin: 0 0 8px; text-wrap: balance; line-height: 1.2;
  }
  .lede { font-size: 15px; color: var(--ink-soft); max-width: 62ch; line-height: 1.65; margin: 0; }

  .model-title-img { display: block; margin: 28px 0 6px; max-width: 260px; height: auto; }

  /* ---------- Primary tabs (reproduces the live site's pill button: transparent, 1px solid ink border, full radius, Barlow 900) ---------- */
  .tabbar {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    margin-top: 8px;
  }
  .tabs { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  .tab {
    /* --tilt echoes the live site's hand-placed nav: the label tilts, the pill frame stays level */
    --tilt: -2.5deg;
    appearance: none; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
    font-family: 'Barlow', sans-serif; font-weight: 900; font-size: 14.5px; letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 10px 18px; border-radius: 999px; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
  }
  .tab .tab-label { display: inline-block; transform: rotate(var(--tilt)); }
  .tab:nth-child(1) { --tilt: -3deg; }
  .tab:nth-child(2) { --tilt: -1.5deg; }
  .tab:nth-child(3) { --tilt: -3.5deg; }
  .tab:nth-child(4) { --tilt: -2deg; }
  .tab:nth-child(5) { --tilt: -3deg; }
  .tab:hover { border-color: var(--ink-soft); }
  .tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .tab[data-cat="motocross"][aria-pressed="true"] { background: var(--tag-mx); border-color: var(--tag-mx); }
  .tab[data-cat="enduro"][aria-pressed="true"] { background: var(--tag-en); border-color: var(--tag-en); }
  .tab[data-cat="supermoto"][aria-pressed="true"] { background: var(--tag-sm); border-color: var(--tag-sm); }
  .tab[data-cat="junior"][aria-pressed="true"] { background: var(--tag-jr); border-color: var(--tag-jr); }
  .tab[data-cat="other"][aria-pressed="true"] { background: var(--tag-other); border-color: var(--tag-other); }

  /* ---------- Secondary facet filters ---------- */
  .subbar {
    display: flex; align-items: flex-end; flex-wrap: wrap; gap: 20px;
    margin: 18px 0 4px; min-height: 40px;
  }
  .facet-group { display: flex; flex-direction: column; gap: 6px; }
  .facet-group[hidden] { display: none; }
  .facet-label {
    font-family: -apple-system, sans-serif;
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  }
  .segmented { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
  .seg-btn {
    appearance: none; border: 0; background: var(--card); color: var(--ink-soft);
    font-family: 'Barlow', sans-serif; font-weight: 800; font-size: 13.5px; padding: 8px 14px; cursor: pointer;
    border-right: 1.5px solid var(--line); white-space: nowrap;
  }
  .seg-btn:last-child { border-right: 0; }
  .seg-btn[aria-pressed="true"] { background: var(--tm-blue); color: #fff; }
  .seg-btn.grade-corse[aria-pressed="true"] { background: var(--corse-grey); }
  .seg-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

  .result-count { font-family: -apple-system, sans-serif; font-size: 12.5px; color: var(--ink-soft); margin-left: auto; align-self: center; }
  .result-count b.mono { color: var(--ink); font-size: 14px; }

  /* ---------- Compare columns (TM MOTO / TM CORSE side by side) ---------- */
  .compare-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 18px; align-items: start; }
  .compare-grid.two-col { grid-template-columns: 1fr 1fr; }
  @media (max-width: 720px) { .compare-grid.two-col { grid-template-columns: 1fr; } }

  .compare-col { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
  .compare-banner {
    position: relative; aspect-ratio: 16 / 10; background-size: cover; background-position: center 30%;
    display: flex; align-items: flex-end; color: #fff;
  }
  .compare-banner::before {
    content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%);
  }
  .compare-banner .label-row { position: relative; z-index: 1; padding: 14px 16px; width: 100%; }
  .compare-banner .title {
    font-family: 'Barlow', sans-serif; font-weight: 900; font-size: 15px; letter-spacing: .03em;
    display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4);
    backdrop-filter: blur(3px); padding: 3px 10px; border-radius: 999px; margin-bottom: 4px;
  }
  .compare-banner .sub { font-family: -apple-system, sans-serif; font-size: 11px; opacity: .9; }

  .compare-row {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent;
    font: inherit; color: inherit; cursor: pointer;
  }
  .compare-row:last-child { border-bottom: none; }
  .compare-row:hover { background: var(--line-soft); }
  .compare-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
  .compare-row .name { flex: 1; font-family: -apple-system, sans-serif; font-size: 13px; font-weight: 600; }
  .compare-row .chevron { color: var(--ink-soft); font-size: 14px; flex: none; }
  .compare-empty { padding: 18px 16px; text-align: center; color: var(--ink-soft); font-size: 12.5px; font-family: -apple-system, sans-serif; }

  /* ---------- Photo card grid (used only where looks genuinely differ, e.g. その他) ---------- */
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
  .card {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left;
    font: inherit; color: inherit; cursor: pointer; width: 100%;
  }
  .card:hover { border-color: var(--ink-soft); }
  .card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .thumb {
    aspect-ratio: 4 / 3; border-radius: 10px;
    background: repeating-linear-gradient(135deg, var(--line-soft) 0 10px, transparent 10px 20px);
    border: 1px dashed var(--line);
    display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
  }
  .thumb svg { width: 34px; height: 34px; opacity: .55; }
  .card-name { font-family: -apple-system, sans-serif; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
  .card-meta { display: flex; gap: 6px; flex-wrap: wrap; }

  .chip { font-family: -apple-system, sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; color: #fff; }
  .chip.cat-motocross { background: var(--tag-mx); }
  .chip.cat-enduro { background: var(--tag-en); }
  .chip.cat-supermoto { background: var(--tag-sm); }
  .chip.cat-junior { background: var(--tag-jr); }
  .chip.cat-other { background: var(--tag-other); }
  .chip.stroke { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }
  .chip.grade { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }
  .chip.pending { background: transparent; border: 1px dashed var(--line); color: var(--ink-soft); }

  .empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); font-size: 13.5px; font-family: -apple-system, sans-serif; }

  /* ---------- Detail-page spec publish toggle (preview) ---------- */
  .spec-demo-card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 18px 20px; }
  .spec-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .spec-demo-title { font-size: 14.5px; font-weight: 800; }
  .spec-demo-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
  .switch[aria-checked="true"] { background: var(--tm-blue); border-color: var(--tm-blue); }
  .switch[aria-checked="true"]::after { transform: translateX(18px); }
  .switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .spec-table {
    margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px 24px; background: var(--line-soft); border-radius: 10px; padding: 18px 20px;
  }
  .spec-item dt { font-size: 11px; color: var(--ink-soft); margin: 0; }
  .spec-item dd { font-size: 13.5px; font-weight: 700; margin: 2px 0 0; }
  .spec-item.price dd { color: var(--tm-blue-ink); }

  /* ---------- Decisions summary ---------- */

  /* ---------- Diagonal footer band (matches the real site's closing band) ---------- */

  /* ---------- Detail page (real navigation, not a popup) ---------- */
  #detailView[hidden] { display: none; }
  .back-link {
    appearance: none; border: 0; background: transparent; color: var(--ink-soft);
    font-family: -apple-system, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer;
    padding: 20px 0 6px; display: inline-flex; align-items: center; gap: 6px;
  }
  .back-link:hover { color: var(--ink); }
  .detail-title { font-size: clamp(24px, 4vw, 34px); margin: 6px 0 20px; }
  .detail-hero-photo {
    aspect-ratio: 16 / 8; border-radius: 16px; margin-bottom: 22px;
    display: flex; align-items: flex-end; justify-content: center; position: relative; color: #fff;
    background-size: cover; background-position: center 30%; overflow: hidden;
  }
  .detail-hero-photo::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.68) 100%);
  }
  .detail-hero-photo svg { width: 56px; height: 56px; opacity: .7; position: relative; z-index: 1; }
      .detail-hero-photo.neutral {
    background: repeating-linear-gradient(135deg, var(--line-soft) 0 12px, transparent 12px 24px); color: var(--ink-soft);
  }
  .detail-hero-photo .hero-flag {
    position: absolute; top: 14px; left: 16px; z-index: 1; font-weight: 900; font-size: 12px; letter-spacing: .05em;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(3px);
    padding: 4px 10px; border-radius: 999px;
  }

  .detail-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; font-family: -apple-system, sans-serif; }

  /* グレードの説明（詳細ページ）。囲みは付けず本文として流す */
  .grade-text { margin-bottom: 24px; font-family: -apple-system, sans-serif; }
  .grade-text p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.8; color: var(--ink-soft); }
  .grade-text p:last-child { margin-bottom: 0; }

  .detail-spec-card { margin-bottom: 24px; }

  .detail-cta {
    appearance: none; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 14px;
    padding: 14px 20px; border-radius: 10px; cursor: pointer; width: 100%; font-family: -apple-system, sans-serif;
  }
  .detail-cta:hover { opacity: .9; }


/* ================================================================
   本番サイト用の追加スタイル（ワイヤーフレームには無かった要素）
   ================================================================ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* リンクとして機能する行・カード（ワイヤーフレームはbuttonだった） */
a.compare-row, a.card, a.tab, .site-logo, .back-link, .breadcrumb a, .foot-links a,
.site-nav a, .dealer-line a { text-decoration: none; color: inherit; }
a.tab { color: var(--ink); }
a.tab[aria-pressed="true"] { color: var(--paper); }
a.compare-row:hover .name, .dealer-line a:hover { text-decoration: underline; }

/* ---------- サイトヘッダー（現行サイトと同じ黒基調・斜めカット） ---------- */

/* ---------- 一覧ページ ---------- */
/* JSが動いているときだけ、選択中カテゴリ以外を隠す（JS無効なら全カテゴリが見える） */
html.js .cat-section { display: none; }
html.js .cat-section.is-active { display: block; }
html.js .cat-heading { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.is-filtered { display: none !important; }
/* 絞り込みで空になったカラムは列ごと非表示（.is-filtered） */

.compare-row .chips { display: flex; gap: 4px; flex: none; }
.chip.road { background: transparent; border: 1px solid var(--tag-en); color: var(--tag-en); }

/* ---------- 価格表示 ---------- */
.price-block { border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  padding: 16px 20px; margin-bottom: 24px; }
.price-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--ink-soft); }
.price-value { font-family: 'Barlow', sans-serif; font-weight: 900; font-size: 27px;
  letter-spacing: .01em; margin-top: 2px; }
.price-tax { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-left: 4px; }
.price-note { font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); margin: 8px 0 0; }
#results ~ .price-note { margin-top: 28px; }

/* ---------- 詳細ページ ---------- */
.breadcrumb { font-size: 11.5px; color: var(--ink-soft); margin: 26px 0 10px; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-hero-photo.has-photo { overflow: hidden; background: var(--line-soft); }
.detail-hero-photo.has-photo img { width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; display: block; }
/* 背景を抜いた切り抜き写真は、切らずに全体を見せる */
.detail-hero-photo.cutout { background: #fff; aspect-ratio: 16 / 9; }
.detail-hero-photo.cutout img { object-fit: contain; padding: 14px; }
.detail-hero-photo.cutout::before { display: none; }
.thumb.has-photo.cutout { background: #fff; }
.thumb.has-photo.cutout img { object-fit: contain; }
.detail-hero-photo figcaption.hero-flag { position: absolute; top: 14px; left: 16px; right: 16px;
  z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px);
  border-radius: 8px; padding: 6px 10px; }
.detail-lede { font-size: 14.5px; line-height: 1.8; margin-bottom: 24px; max-width: 68ch; }
.detail-note { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 20px; }
.dealer-line { font-size: 12.5px; color: var(--ink-soft); margin: 14px 0 0; }
.dealer-line a { text-decoration: underline; }
.thumb.has-photo { border: 0; background: var(--line-soft); overflow: hidden; }
.thumb.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- フッター ---------- */

@media (max-width: 720px) {
  .compare-grid.two-col { grid-template-columns: 1fr; }
  .price-value { font-size: 23px; }
}


/* ================================================================
   現行サイト（STUDIO）の寸法・書体に合わせる
   BRAND STORY実測: 見出し画像 630x196・下余白60px・中央寄せ /
   内側コンテナ width 1008px(max 70%) / 本文 Noto Sans JP 16px・行間28.48px・#000
   ================================================================ */

.model-lineup { display: flex; justify-content: center;
  margin: 100px 0 150px; font-family: "Noto Sans JP", sans-serif; color: #000; }
.model-inner { width: 1008px; max-width: 70%; display: flex; flex-direction: column;
  align-items: stretch; }

/* MODEL見出しはBRAND STORYと同じ「文字の大きさ」に合わせる＝画像の高さを196pxで揃える */
.model-heading { margin: 0 0 60px; line-height: 0; text-align: center; }
.model-heading img { height: 196px; width: auto; max-width: 100%; }

.model-lineup .lede { font-family: "Noto Sans JP", sans-serif; font-size: 16px; font-weight: 400;
  line-height: 28.48px; color: #000; max-width: 100%; margin: 0 0 14px; }
.model-lineup .lede:last-child { margin-bottom: 0; }

/* STUDIOのヘッダーは position:fixed（高さ80px）。タブバーはその下で固定する */
.tabbar { top: 80px; }
html { scroll-padding-top: 96px; }

/* 絞り込みバー：カテゴリによって出し入れしても位置がズレないよう場所を確保しておく */
.subbar { align-items: flex-end; min-height: 62px; }
/* 元の display と同じ flex のまま見えなくする。display を変えると高さが変わってバーがズレる */
.facet-group[hidden] { display: flex !important; visibility: hidden; }

/* 押しても寸法が変わらないようにする（枠線幅・字送り・太さを状態で変えない） */
.tab, .seg-btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.tab { border-width: 1.5px; }
.seg-btn { border-right-width: 1.5px; }

/* 2カラムの位置を固定する。片方が絞り込みで消えても、残った側は動かない */
.compare-grid { grid-template-columns: 1fr 1fr; }
.compare-col[data-grade="std"] { grid-column: 1; }
.compare-col[data-grade="corse"] { grid-column: 2; }

/* モバイルメニュー（現行サイトのモーダルを自前JSで開閉する） */
#mobileMenu { display: none; }
#mobileMenu.is-open { display: block; position: relative; z-index: 30; }
/* メニューを開いている間はハンバーガーを消す。×ボタンと同じ位置にあり、クリックを奪ってしまうため */
body.menu-open #navToggle { display: none; }
body.menu-open { overflow: hidden; }
#mobileMenu .design-canvas__modal,
#mobileMenu .design-canvas__modal .studio-canvas,
#mobileMenu .design-canvas__modal .studio-canvas > * { pointer-events: auto; }
#navToggle { display: contents; }

@media screen and (max-width: 1166px) {
  .model-inner { max-width: 84%; }
}
@media screen and (max-width: 960px) {
  .model-lineup { margin: 72px 0 110px; }
  .model-inner { width: 100%; max-width: 88%; }
  .model-heading img { height: 150px; }
  .model-heading { margin-bottom: 44px; }
}
@media screen and (max-width: 540px) {
  .model-lineup { margin: 56px 0 88px; }
  .model-heading img { height: 104px; }
  .model-heading { margin-bottom: 32px; }
  .compare-grid, .compare-grid.two-col { grid-template-columns: 1fr; }
  .compare-col[data-grade="std"], .compare-col[data-grade="corse"] { grid-column: 1; }
  .tabbar { top: 64px; }
}

/* ---- フッターの赤帯 ----
   現行サイトでは Column&News セクション（高さ1212px）の背景画像として赤帯＋斜めカットが入っている。
   このページはニュース一覧を載せないため帯が短くなり、斜めの部分がフッター文字に重なってしまう。
   斜めの高さは画像の比率どおり横幅に比例するので、幅に応じた高さを確保する。 */
.sd[data-r-5_2_0d0cbb0f-22ac-493b-aa3d-9c00ec073db2] {
  min-height: calc(15vw + 230px);
  align-items: flex-end;
}
/* STUDIO側の align-self が効いているため、子要素自体を下端へ送る */
.sd[data-r-5_2_0d0cbb0f-22ac-493b-aa3d-9c00ec073db2] > * { margin-top: auto; }

/* 写真の上のグレード名は明るい写真だと白文字が読めないので、濃い下地を敷く */
.compare-banner .title { background: rgba(10, 12, 16, .72) !important;
  border-color: rgba(255, 255, 255, .28) !important; }
.compare-banner .sub { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.compare-banner::before { background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,.62) 100%); }


/* ================================================================
   仕上げ（2026-07-29）
   1) PCでの表示幅を広げる  2) 文字と背景のコントラスト  3) ボタンの角の隙間
   4) 動き（Ferrariのモデルページを参考。位置ズレを起こさないtransform/opacityのみ）
   ================================================================ */

/* --- 1) 表示幅 ---
   親(main)がflexコンテナなので .model-lineup はフレックスアイテム＝中身幅に縮んでいた。
   幅100%を明示し、内側は画面幅に応じて広げる。 */
.model-lineup { width: 100%; }
.model-inner { width: min(1280px, 90%); max-width: none; margin: 0 auto; }

/* --- 2) コントラスト ---
   STUDIOの外枠は白基調なので、こちらも白で揃える（ダークモードは無効化＝外枠と食い違わせない）。
   小さい文字は色を濃くしてサイズを少し上げる。 */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --paper: #ffffff; --card: #ffffff; --ink: #14161c; --ink-soft: #48505d;
  --line: #d3d7de; --line-soft: #eceef1;
  --tm-blue: #155eef; --tm-blue-ink: #0d3fb0;
  --corse-grey: #5b6169; --corse-grey-ink: #383c42;
  --tag-mx: #d94f3b; --tag-en: #2f8f5b; --tag-sm: #155eef; --tag-jr: #8a5cf6; --tag-other: #6b7280;
  --focus: #0d3fb0; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #ffffff; --card: #ffffff; --ink: #14161c; --ink-soft: #48505d;
    --line: #d3d7de; --line-soft: #eceef1;
    --tm-blue: #155eef; --tm-blue-ink: #0d3fb0;
    --corse-grey: #5b6169; --corse-grey-ink: #383c42;
    --tag-mx: #d94f3b; --tag-en: #2f8f5b; --tag-sm: #155eef; --tag-jr: #8a5cf6; --tag-other: #6b7280;
    --focus: #0d3fb0;
  }
  .model-heading img { filter: none; }
}
.facet-label { font-size: 11.5px; color: var(--ink-soft); }
.result-count { font-size: 13px; color: var(--ink-soft); }
.chip.stroke, .chip.grade { color: var(--ink); border-color: var(--line); }
.compare-row .name { color: var(--ink); }
.breadcrumb, .dealer-line, .detail-note, .price-label { color: var(--ink-soft); }

/* --- 3) ボタンの角 ---
   親の角丸に対して中のボタンが直角のままだと、角に背景色の三角が覗く。
   1.5pxの枠の分だけ内側を小さく丸める。 */
.segmented { border-radius: 10px; }
.seg-btn:first-child { border-top-left-radius: 8.5px; border-bottom-left-radius: 8.5px; }
.seg-btn:last-child { border-top-right-radius: 8.5px; border-bottom-right-radius: 8.5px; }

/* --- 4) 動き --- */
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 読み込み時：見出しとリード文がそっと上がってくる */
html.js .model-heading { animation: riseIn .7s cubic-bezier(.16,1,.3,1) both; }
html.js .model-lineup > .model-inner > .lede-block { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .08s both; }
html.js .tabbar { animation: fadeIn .6s ease .16s both; }
html.js .subbar { animation: fadeIn .6s ease .22s both; }

/* タブを切り替えるたびに、中身が下からすっと入る（translateYのみ＝横位置は動かない） */
html.js .cat-section.is-active .compare-col,
html.js .cat-section.is-active .card {
  animation: riseIn .55s cubic-bezier(.16,1,.3,1) both;
}
html.js .cat-section.is-active .compare-col[data-grade="corse"] { animation-delay: .09s; }
html.js .cat-section.is-active .card:nth-child(2) { animation-delay: .05s; }
html.js .cat-section.is-active .card:nth-child(3) { animation-delay: .10s; }
html.js .cat-section.is-active .card:nth-child(4) { animation-delay: .15s; }
html.js .cat-section.is-active .card:nth-child(n+5) { animation-delay: .2s; }

/* 行のホバー：矢印が少し右へ出る */
.compare-row .chevron { transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .25s ease; opacity: .55; }
.compare-row:hover .chevron { transform: translateX(4px); opacity: 1; }
.compare-row { transition: background-color .2s ease; }
.card { transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,22,28,.10); }
.tab .tab-label { transition: transform .25s cubic-bezier(.16,1,.3,1); }

/* 詳細ページ：写真が少しだけ引いてから止まる／各ブロックが順に現れる */
@keyframes heroIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
html.js .detail .detail-hero-photo { animation: heroIn 1s cubic-bezier(.16,1,.3,1) both; }
html.js .detail .detail-title { animation: riseIn .7s cubic-bezier(.16,1,.3,1) both; }
html.js .detail .detail-chips { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .06s both; }
html.js .detail .price-block { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .12s both; }
html.js .detail .detail-lede,
html.js .detail .grade-text { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .18s both; }
html.js .detail .detail-spec-card { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .24s both; }
.detail-cta { transition: transform .25s cubic-bezier(.16,1,.3,1), background-color .25s ease; }
.detail-cta:hover { transform: translateY(-2px); }

/* 動きを抑える設定の方には出さない */
@media (prefers-reduced-motion: reduce) {
  html.js *, html.js *::before, html.js *::after {
    animation: none !important; transition: none !important;
  }
}

/* 幅を広げたので、内側の余白も画面サイズに応じて調整 */
@media screen and (max-width: 1166px) { .model-inner { width: min(1080px, 92%); } }
@media screen and (max-width: 960px)  { .model-inner { width: 92%; } }
@media screen and (max-width: 540px)  { .model-inner { width: 90%; } }


/* --- 文字色の上書き対策（2026-07-29）---
   STUDIOのCSSが .title / .sub などに色を当てているため、こちらの指定が負けて
   「濃い背景の上に濃いグレーの文字」になり読めなくなっていた。明示的に指定して直す。 */
.compare-banner .title { color: #fff !important; font-size: 15.5px;
  background: rgba(8, 10, 14, .78) !important; border-color: rgba(255,255,255,.32) !important; }
.compare-banner .sub { color: #fff !important; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.75); }
/* 写真の下側をもう少し暗くして、白文字が必ず乗るようにする */
.compare-banner::before { background: linear-gradient(180deg, rgba(0,0,0,0) 32%, rgba(0,0,0,.70) 100%); }
.card-name, .cat-heading, .detail-title, .spec-demo-title { color: var(--ink) !important; }
.spec-item dd { color: var(--ink) !important; }
.spec-item.price dd { color: var(--tm-blue-ink) !important; }
.price-value { color: var(--ink) !important; }

/* --- 小さい文字のコントラストを基準（4.5:1）以上にする --- */
.chip.road { color: #1c6b40; border-color: #1c6b40; font-weight: 800; }
:root {
  --tag-mx: #c3402d;   /* 白文字とのコントラスト 4.09 → 5.1 */
  --tag-en: #22754a;
  --tag-jr: #6d3fe0;
  --tag-other: #5a616c;
}


/* ================================================================
   ブランドカラーに揃える（2026-07-29）
   ロゴから抽出: ブルー #0078c0（tm MOTOロゴ）／オレンジ #f03c00（UESAKAロゴ）
   白文字が読める濃さに調整して使う（#d63400 / #0070b4 はコントラスト4.8・5.3）
   ================================================================ */
:root {
  --brand-blue: #0070b4;
  --brand-blue-soft: #0078c0;
  --brand-orange: #d63400;
  --brand-orange-soft: #f03c00;
  --tm-blue: var(--brand-blue);
  --tm-blue-ink: #005a91;
}

/* 選択中のタブ＝ブランドオレンジ（カテゴリごとの色分けはやめてサイトの色味に統一） */
.tab[aria-pressed="true"],
.tab[data-cat="motocross"][aria-pressed="true"],
.tab[data-cat="enduro"][aria-pressed="true"],
.tab[data-cat="supermoto"][aria-pressed="true"],
.tab[data-cat="junior"][aria-pressed="true"],
.tab[data-cat="other"][aria-pressed="true"] {
  background: var(--brand-orange); border-color: var(--brand-orange); color: #fff;
}
.tab:hover { border-color: var(--brand-orange); }

/* 絞り込みの選択中＝ブランドブルー */
.seg-btn[aria-pressed="true"] { background: var(--brand-blue); color: #fff; }

/* カテゴリのバッジもブランドブルーに統一 */
.chip.cat-motocross, .chip.cat-enduro, .chip.cat-supermoto,
.chip.cat-junior, .chip.cat-other { background: var(--brand-blue); color: #fff; }

/* リンク色 */
.breadcrumb a:hover, .dealer-line a { color: var(--brand-blue); }
.spec-item.price dd { color: var(--brand-blue) !important; }

/* --- 詳細ページ上部（戻るリンク）を整える --- */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Noto Sans JP", sans-serif; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); margin: 28px 0 18px; padding: 0;
  border: 0; background: none;
}
.back-link .back-arrow { transition: transform .25s cubic-bezier(.16,1,.3,1); }
.back-link:hover { color: var(--brand-blue); }
.back-link:hover .back-arrow { transform: translateX(-4px); }

/* --- 問い合わせボタン: 横に伸びきらないようにする --- */
.detail-cta {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; max-width: 100%; min-width: 260px;
  background: var(--brand-orange); color: #fff; border: 0;
  font-family: "Noto Sans JP", sans-serif; font-weight: 700; font-size: 14.5px;
  padding: 14px 32px; border-radius: 999px; margin-top: 8px;
}
.detail-cta:hover { background: var(--brand-orange-soft); color: #fff; }

/* --- プレースホルダー（白背景＋ブルー×イエローのTM Motoロゴ）---
   写真が無いときに表示する。白地なのでグレード名のチップだけ暗くして読ませる。 */
.compare-banner.is-placeholder { background-size: cover; background-position: center; background-color: #fff; }
.compare-banner.is-placeholder::before { background: none; }
.thumb.is-placeholder { border: 1px solid var(--line); background: #f4f5f7; }
.thumb.is-placeholder img { object-fit: cover; }
.detail-hero-photo.is-placeholder { background: #f4f5f7; }
.detail-hero-photo.is-placeholder::before { display: none; }


/* 縦並びのコンテナ(align-items:stretch)の中では、ボタンや小さなラベルも
   横いっぱいに伸びてしまう。伸ばしたくない要素は自分で左寄せを指定する。 */
.detail-cta, .back-link { align-self: flex-start; }

/* 写真のキャプションは文字の分だけの幅にする（横一杯の帯にしない） */
.detail-hero-photo figcaption.hero-flag {
  right: auto; max-width: calc(100% - 32px); width: auto; display: inline-block;
}


/* 写真が無い列（白いプレースホルダー）ではラベルを暗い文字にする。
   写真の上と同じ白文字だと白地に埋もれて読めないため。 */
.compare-banner.is-placeholder .title {
  background: rgba(20, 22, 28, .88) !important; color: #fff !important;
  border-color: rgba(20,22,28,.9) !important;
}
.compare-banner.is-placeholder .sub {
  color: var(--ink-soft) !important; text-shadow: none !important; font-weight: 600;
}


/* 「その他」タブのカード: 点数が少ないと1枚が小さくなりすぎるので、列数を固定する */
.cat-section .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cat-section .grid .thumb { aspect-ratio: 4 / 3; }
.cat-section .grid .card { padding: 16px; gap: 12px; }
.cat-section .grid .card-name { font-size: 15px; }
@media screen and (max-width: 960px) { .cat-section .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media screen and (max-width: 540px) { .cat-section .grid { grid-template-columns: 1fr; } }


/* ================================================================
   仕上げ（2026-07-29 その2）
   1) MODEL見出しの横幅をBRAND STORYと揃える（実測630px）
   2) 押した状態は黒白反転にする（オレンジは使わない）
   3) 写真の中の文字は出さない
   ================================================================ */

/* 1) BRAND STORY の見出し画像は 630px 幅。MODEL も同じ幅に合わせる
      （高さ基準で揃えると絵柄の比率が違うため横幅が揃わない） */
.model-heading img { width: min(630px, 100%); height: auto; }
@media screen and (max-width: 960px) { .model-heading img { width: min(480px, 100%); } }
@media screen and (max-width: 540px) { .model-heading img { width: min(320px, 100%); } }

/* 2) 選択中のタブ・絞り込みは黒地に白文字（反転）で示す */
.tab[aria-pressed="true"],
.tab[data-cat="motocross"][aria-pressed="true"],
.tab[data-cat="enduro"][aria-pressed="true"],
.tab[data-cat="supermoto"][aria-pressed="true"],
.tab[data-cat="junior"][aria-pressed="true"],
.tab[data-cat="other"][aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.tab:hover { border-color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* 3) 写真の中の文字は出さないので、暗くするグラデーションも弱める */
.compare-banner::before { background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.42) 100%); }
.compare-banner .label-row { padding: 12px 14px; }


/* STUDIOのCSSが子要素(span)に色を当てているため、タブの文字が親の色を継がず黒のままになる。
   タブの中の文字は必ず親の色を継がせる。 */
.tab .tab-label { color: inherit !important; }
.tab[aria-pressed="true"] .tab-label { color: #fff !important; }

/* MODEL見出しは横幅を揃えると大きくなりすぎるので、少し小さくして中央に置く
   （BRAND STORY 630px に対して 430px。絵柄の比率が違うため同寸にはしない） */
.model-heading img { width: min(430px, 100%); }
@media screen and (max-width: 960px) { .model-heading img { width: min(360px, 100%); } }
@media screen and (max-width: 540px) { .model-heading img { width: min(260px, 100%); } }


/* ================================================================
   BRAND STORY と完全に同じ幅・同じ行送りに合わせる（実測値）
     デスクトップ: 画面幅の70% / 540px以下: 80%
     本文: 16px・行送り28.48px・段落間の余白なし（BRAND STORYは<br>で改行しているだけ）
   ================================================================ */
.model-inner { width: 70%; max-width: none; margin: 0 auto; }
@media screen and (max-width: 1166px) { .model-inner { width: 70%; } }
@media screen and (max-width: 960px)  { .model-inner { width: 70%; } }
@media screen and (max-width: 540px)  { .model-inner { width: 80%; } }

/* 段落の間隔をBRAND STORYと同じ（＝間を空けない）にする */
.model-inner .lede, .model-inner .lede p { margin: 0 !important; }

/* MODEL見出しをさらに小さく */
.model-heading img { width: min(330px, 100%); }
@media screen and (max-width: 960px) { .model-heading img { width: min(280px, 100%); } }
@media screen and (max-width: 540px) { .model-heading img { width: min(220px, 100%); } }

/* MODELの上の余白を詰める（BRAND STORY側に下余白150pxが既にあるため） */
.model-lineup { margin-top: 0; }
.model-heading { margin-bottom: 40px; }


/* タブの下の罫線をやめる。区切り線があると「見出し」に見えてボタンだと気づきにくい。
   スクロール追従は残すので、背景は透けない白にして下の内容が透けないようにする。 */
.tabbar {
  border-bottom: 0;
  background: #fff;
  backdrop-filter: none;
  padding: 14px 0 6px;
  margin-top: 0;
}
/* 絞り込みバーとの間隔を少し取り、ボタンの並びとして読めるようにする */
.subbar { margin-top: 14px; }


/* ================================================================
   タブを「押せるボタン」として分かるようにする
   ・間隔を広げる
   ・わずかに塗りと影を入れて浮いて見せる
   ・ホバーで1px持ち上がり、押した瞬間は沈む
   （寸法は変えず transform と影だけで表現するので、位置ズレは起きない）
   ================================================================ */
.tabs { gap: 18px; }
@media screen and (max-width: 540px) { .tabs { gap: 10px; } }

.tab {
  background: #f7f8f9;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(20, 22, 28, .07), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease,
              box-shadow .18s ease, transform .18s cubic-bezier(.16,1,.3,1);
}
.tab:hover {
  background: #eceef1; border-color: var(--ink-soft);
  box-shadow: 0 3px 8px rgba(20, 22, 28, .12);
  transform: translateY(-1px);
}
.tab:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(20,22,28,.10); }

.tab[aria-pressed="true"] {
  box-shadow: 0 2px 6px rgba(20, 22, 28, .22);
  transform: translateY(0);
}
.tab[aria-pressed="true"]:hover {
  background: var(--ink); border-color: var(--ink);
  box-shadow: 0 3px 10px rgba(20, 22, 28, .28); transform: translateY(-1px);
}

/* 絞り込みのボタン群も同じ考え方で少し立体的に */
.segmented { box-shadow: 0 1px 2px rgba(20, 22, 28, .06); }
.seg-btn { transition: background-color .18s ease, color .18s ease; }
.seg-btn:not([aria-pressed="true"]):hover { background: #eceef1; color: var(--ink); }

/* タブの列と絞り込みの間をもう少し空ける */
.subbar { margin-top: 20px; }


/* 見出しと本文の間隔をBRAND STORYと同じ60pxにする（実測: BRAND STORY=60px / MODEL=40px だった） */
.model-heading { margin-bottom: 60px; }

/* 本文とタブの間も同じくらい空ける（詰まってボタンが本文にくっついて見えるため） */
.tabbar { padding-top: 34px; }

/* カテゴリのボタンは中央揃え */
.tabs { justify-content: center; }


/* 文字数に関係なくボタンの枠を同じ大きさに揃える（最も広いMOTOCROSSの145pxに合わせる） */
.tab { min-width: 148px; justify-content: center; }
.tab .tab-label { text-align: center; }
/* スマホでは2つずつ均等に並べて横幅を使い切る */
@media screen and (max-width: 540px) {
  .tab { min-width: 0; flex: 1 1 calc(50% - 5px); }
}


/* 詳細ページはFV写真が無いため、固定ヘッダー（高さ80px）の下に本文が潜ってしまう。
   一覧側は上に余白を作らない代わりに、詳細ページだけ余白を確保する。 */
.model-lineup.detail { margin-top: 118px; }
@media screen and (max-width: 540px) { .model-lineup.detail { margin-top: 92px; } }

/* ---- お問い合わせ（現行サイトの詳細ページと同じ表記・同じ形） ---- */
.contact-cta { margin: 64px 0 8px; text-align: center; }
.contact-cta h2 {
  font-family: "Noto Sans JP", sans-serif; font-size: 19px; font-weight: 700;
  color: var(--ink); margin: 0 0 14px; letter-spacing: .02em;
}
.contact-cta p {
  font-family: "Noto Sans JP", sans-serif; font-size: 14px; line-height: 26px;
  color: var(--ink); margin: 0 auto 26px; max-width: 44em;
}
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 180px; height: 50px; border-radius: 25px;
  background: #000; color: #fff !important;
  font-family: 'Barlow', sans-serif; font-weight: 900; font-size: 15px; letter-spacing: .08em;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .25s ease;
}
.contact-btn:hover { transform: translateY(-2px); opacity: .88; }


/* 諸元の見出しは現行サイトのSPEC画像を使う（文字ではなく画像） */
.spec-heading { margin: 0; line-height: 0; }
.spec-heading img { width: min(180px, 60%); height: auto; }
.detail-spec-card .spec-demo-head { justify-content: flex-start; padding-bottom: 4px; }
@media screen and (max-width: 540px) { .spec-heading img { width: min(140px, 60%); } }


/* 諸元の注記（年式が2026年モデルのものである旨） */
.spec-note {
  font-family: "Noto Sans JP", sans-serif; font-size: 12px; line-height: 1.7;
  color: var(--ink-soft); margin: 14px 0 0;
}


/* 写真の補足（どの車両を写した写真かを示す。諸元の注記と同じ見え方に揃える） */
.photo-note {
  font-family: "Noto Sans JP", sans-serif; font-size: 12px; line-height: 1.7;
  color: var(--ink-soft); margin: -12px 0 22px;
}


/* ================================================================
   文字の傾きを現行サイトに合わせる（実測: Barlow italic。回転ではなく斜体）
     ヘッダーのナビ  … Barlow 700 italic 15px
     CONTACTボタン   … Barlow 900 italic 20px 白
   ================================================================ */
.tab { font-style: italic; }
.tab .tab-label { transform: none; font-style: italic; }
.seg-btn { font-style: italic; }
.chip.stroke.mono { font-style: normal; }   /* 2T/4Tの表記は立てたまま */

.contact-btn {
  font-family: 'Barlow', sans-serif; font-weight: 900; font-style: italic;
  font-size: 20px; letter-spacing: normal;
}


/* ================================================================
   スマホ表示の調整（2026-07-30・iPhone実機の見え方に合わせる）
   1) 諸元のSPEC見出し … スマホだけ小さくして中央に置く（PCは180pxのまま）
   2) 一覧の行        … 名前が2行になってもバッジと矢印を上下中央に置く（全幅）
   3) ストローク絞り込み … スマホだけ中央寄せ（PCは左寄せのまま）
   ================================================================ */

/* 1) SPEC見出しの幅指定に % を混ぜていたが、親のh2はflexの shrink-to-fit で
      幅が確定しないため、% の基準がブラウザによって揺れる。
      pxで決めて max-width だけで溢れを止める（PCは従来と同じ180px）。 */
.spec-heading img { width: 180px; max-width: 100%; height: auto; }
@media screen and (max-width: 540px) {
  /* 諸元カードの内側は約270px。その半分弱（120px）にして中央に置く */
  .spec-heading { text-align: center; }
  .spec-heading img { width: 120px; }
  .detail-spec-card .spec-demo-head { justify-content: center; }
}

/* 2) 行の高さは車名の行数で決まる。中央寄せにしても1行のモデルの行高は変わらない。
      バッジ側・矢印側にも中央寄せを明示して、エンジン差で上寄りにならないようにする。 */
.compare-row { align-items: center; }
.compare-row .chips { align-items: center; }
.compare-row .chevron { display: inline-flex; align-items: center; line-height: 1; }

/* 3) 絞り込みはスマホだけ中央寄せ。
      出し入れは visibility:hidden のままなので、隠れても場所は動かない。 */
@media screen and (max-width: 540px) {
  .subbar { justify-content: center; }
  .facet-group { align-items: center; }   /* 「ストローク」ラベルとボタン列を中央に */
  .subbar .result-count { margin-left: 0; width: 100%; text-align: center; }
}


/* ================================================================
   TM CORSE専用装備セクション（2026-07-30）
   位置: 詳細ページの諸元の下・お問い合わせの上（TM CORSEのモデルだけ）
   ・見出しは英字だけBarlowのitalic（回転は使わない）。日本語は立てたまま
   ・セクション全体を諸元カード（.spec-demo-card）と同じ枠1枚に収める。見出し・リード文・
     装備一覧・写真ギャラリーがすべてカードの中に入る（2026-07-30 レイアウト変更）
   ・見出しの置き方も諸元カードと同じ（.spec-demo-head の中のh2・padding-bottom 4px）
   ・装備一覧は諸元表（.spec-table）と同じ内箱（薄いグレーの面）・1行1装備の行区切り
   ・写真は3:2に統一。width/heightを入れて読み込み中のレイアウトずれを防ぐ
   ・幅は .model-inner のレールに任せる（自分で width を持たない）
   ================================================================ */
.corse-equip { margin: 56px 0 0; }

/* 見出しは諸元カードのSPEC画像と同じ位置（カード内の左上・下に4px） */
.corse-equip .spec-demo-head { justify-content: flex-start; padding-bottom: 4px; }

.corse-equip-heading {
  font-family: "Noto Sans JP", sans-serif; font-weight: 700;
  font-size: clamp(19px, 2.4vw, 24px); line-height: 1.4;
  color: var(--ink); margin: 0; letter-spacing: .02em;
}
.corse-equip-heading .lat {
  font-family: 'Barlow', sans-serif; font-weight: 900; font-style: italic;
  font-size: 1.16em; letter-spacing: normal;
}

/* 見出しからの間隔は諸元表（.spec-table の margin-top）と同じ16px */
.corse-lede { margin: 16px 0 0; }
.corse-lede p {
  font-family: "Noto Sans JP", sans-serif; font-size: 14.5px; line-height: 26px;
  color: var(--ink); margin: 0;
}

/* 装備一覧: 諸元表と同じ内箱（薄いグレーの面）に、1行1装備で罫線を入れる */
.corse-equip-list {
  list-style: none; margin: 18px 0 0; padding: 4px 20px;
  background: var(--line-soft); border-radius: 10px;
}
.corse-equip-list li {
  font-family: "Noto Sans JP", sans-serif; font-size: 13.5px; line-height: 1.7;
  color: var(--ink); padding: 10px 0; border-top: 1px solid rgba(20, 22, 28, .10);
}
.corse-equip-list li:first-child { border-top: 0; }

/* 写真ギャラリー: PCは3列（内箱が狭くなれば2列）・スマホは1列 */
.corse-gallery {
  margin-top: 22px; display: grid; gap: 18px 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.corse-shot { margin: 0; }
.corse-shot img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 10px; background: var(--line-soft);
}
.corse-shot figcaption {
  font-family: "Noto Sans JP", sans-serif; font-size: 11.5px; line-height: 1.6;
  color: var(--ink-soft); margin-top: 7px;
}

@media screen and (max-width: 540px) {
  .corse-equip { margin-top: 44px; }
  /* 諸元カードのSPEC見出しと同じ扱いで中央に置く（親のflexも中央寄せにする） */
  .corse-equip .spec-demo-head { justify-content: center; }
  .corse-equip-heading { text-align: center; }
  .corse-equip-list { padding: 4px 14px; }
  .corse-gallery { grid-template-columns: 1fr; gap: 16px; }
}

/* 諸元カードの次に立ち上がる（transformとopacityだけ）。
   prefers-reduced-motion では上の一括指定（html.js *）で止まる。 */
html.js .detail .corse-equip { animation: riseIn .7s cubic-bezier(.16,1,.3,1) .30s both; }
