@charset "utf-8";
/* ============================================ */
/* CHRISTMAS FAIR 2026
   PC（897px以上）: セクションごとの背景画像（assets/images/xm/bg_*.webp）の上に、
   デザイン座標（幅1920px基準）で個別パーツ画像とライブテキストを重ねる。
   --x / --y / --w / --h はデザイン上のpx値（--y はセクション上端から）。
   --u はデザイン1pxの実寸（main の幅 ÷ 1920）。文字サイズも --u で指定し、レイアウトと同じ比率で拡縮する。
   SP（896px以下）: 背景画像は使わず、背景色＋ガーランド画像の上にパーツを縦に積む。
   キラキラ（左右）は共通タイル（sparkle_l / sparkle_r）を縦に繰り返して敷く。 */
/* ============================================ */

/* ポップアップ表示中（body の overflow: hidden）にスクロールバーが消えても、
   その幅を確保したままにして、--u（本文幅基準）が変わってレイアウトがずれるのを防ぐ */
html {
  scrollbar-gutter: stable;
}
body.christmas {
  background: #fff;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  overflow-x: hidden;
}
.xm-main {
  container-type: inline-size;
  > * {
    --u: calc(100cqw / 1920);
    @media (width <= 896px) {
      --u: calc(100cqw / 750);
    }
  }
}
:where(.xm-main) img {
  display: block;
  width: 100%;
  height: auto;
}
:where(.xm-main) p,
:where(.xm-main) h2,
:where(.xm-main) h3,
:where(.xm-main) ul {
  margin: 0;
  padding: 0;
}
:where(.xm-main) ul {
  list-style: none;
}
.xm-serif {
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}
.xm-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- セクション共通 ---------- */
.xm-sec {
  position: relative;
  overflow-x: clip;
  background-color: var(--bgc, #0d3420);
  display: flow-root;  /* 先頭のパーツの margin-top がセクションの外へ出ないように */
  aspect-ratio: 1920 / var(--h);
  min-height: 0;  /* 中身がはみ出しても、高さは aspect-ratio のまま */
  @media (width <= 896px) {
    aspect-ratio: auto;
    padding: 0 0 calc(70 * var(--u));
    text-align: center;
  }
}
/* PC：パーツはセクションの中で上から順に並べ、間隔は上の要素との margin-top（--y）で取る。
   --x：左からの位置（横並びでは左隣との間隔）。--x がないパーツは margin-inline: auto で中央。
   --x / --y は子要素に継承させない（横並びのまとまりに付けた値が中のパーツに移らないように） */
@property --x { syntax: "*"; inherits: false; }
@property --y { syntax: "*"; inherits: false; }
/* パーツ＝セクションと、パーツをまとめる要素（横並び・アスリート診断・フッター）の直下にある要素。
   ガーランド・キラキラ・境界の飾り・アーチ・メインビジュアル・見出し・まとまり自体は除く */
:where(.xm-sec, .xm-row, .xm-col, .xm-athlete, .xm-foot) > :not(.xm-garland, .xm-gdeco, .xm-spk, .xm-arc, .xm-mv__fg, .xm-head, .xm-row, .xm-col, .xm-athlete, .xm-foot) {
  position: relative;  /* z-index を効かせるため（配置には使わない） */
  z-index: 2;
  width: calc(var(--w, 1920) * var(--u));
  /* --x がないと --ml は無効値になり、margin-inline の左側も auto（＝中央寄せ）になる */
  --ml: calc(var(--x) * var(--u));
  margin-top: calc(var(--y, 0) * var(--u));
  margin-inline: var(--ml, auto) auto;
  /* SP：既定は中央寄せで、幅はデザイン幅に比例（最大92%） */
  @media (width <= 896px) {
    width: min(92%, calc(var(--w, 1920) / 12 * 1%));
    margin: calc(36 * var(--u)) auto 0;
  }
}
/* 横並びのまとまり（PC）。上の要素との間隔は --y、中の要素は左隣との間隔 --x、上端からの位置 --y */
.xm-row {
  display: flex;
  align-items: flex-start;
  margin-top: calc(var(--y, 0) * var(--u));
  > * {
    flex: none;
    margin-inline: calc(var(--x, 0) * var(--u)) 0;
  }
  /* SP：まとまりをなくし、中の要素をそのまま縦に積む */
  @media (width <= 896px) {
    display: contents;
    > * {
      margin-inline: auto;
    }
  }
}
.xm-col {
  margin-left: calc(var(--x, 0) * var(--u));
  @media (width <= 896px) {
    display: contents;
  }
}
/* PC：セクション境界のガーランド（境界をまたいで重ねる。--y はセクション上端からの位置で、上にはみ出す分はマイナス） */
.xm-gdeco {
  position: absolute;
  z-index: 1;
  left: calc(var(--x, 0) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w, 1920) * var(--u));
  pointer-events: none;
  @media (width <= 896px) {
    display: none;
  }
}
/* SP：セクション上端のガーランド */
.xm-garland {
  display: none;
  @media (width <= 896px) {
    display: block;
    position: relative;
    z-index: 3;
    width: 100%;
    margin-bottom: calc(10 * var(--u));
  }
}

/* キラキラ：左右の縁に縦方向へ繰り返して敷く（背景の上・コンテンツの下）
   --sp はタイル（1017px周期）の位相。デザインどおりに連続させるためセクションごとに指定 */
.xm-spk {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: var(--spb, 0);
  left: 0;
  width: calc(120 * var(--u));
  background: url("../images/xm/sparkle_l.webp") 0 calc(var(--sp, 0) * -1 * var(--u)) / 100% auto repeat-y;
  pointer-events: none;
  &.xm-spk--r {
    left: auto;
    right: 0;
    background-image: url("../images/xm/sparkle_r.webp");
  }
  @media (width <= 896px) {
    width: 16%;
    bottom: 0;
    background-position: 0 0;
  }
}

/* ---------- 共通テキスト ---------- */
.xm-txt {
  color: #fff;
  font-size: max(12px, calc(var(--fs, 26) * var(--u)));
  font-weight: 500;
  line-height: var(--lh, 2.04);
  letter-spacing: 0.08em;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  @media (width <= 896px) {
    padding-inline: 5%;
    font-size: max(13px, calc(var(--fs, 26) * var(--u)));
    line-height: 1.8;
    text-wrap: balance;
  }
}
.xm-note {
  color: #fff;
  font-size: max(10px, calc(16 * var(--u)));
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  @media (width <= 896px) {
    font-size: max(11px, calc(16 * var(--u)));
    padding-inline: 5%;
  }
}
/* 期間（ゴシック）：2026 / 12.5SAT - 20SUN */
.xm-sdate {
  color: #fff;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  .yy {
    display: block;
    font-size: calc(53.3 * var(--u));
  }
  .dd {
    display: block;
    margin-top: calc(4 * var(--u));
    font-size: calc(80 * var(--u));
    letter-spacing: 0.01em;
  }
  small {
    font-size: 0.49em;
  }
  .hy {
    font-size: 0.67em;
    margin: 0 0.25em 0 0.1em;
  }
  @media (width <= 896px) {
    .yy { font-size: calc(53.3 * var(--u)); }
  }
}
/* 期間（明朝）：2026.12.5 SAT − 12.20 SUN */
.xm-date {
  color: #fff;
  font-size: calc(82 * var(--u));
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  .y { font-size: calc(44.8 * var(--u)); }
  .d { font-size: calc(82 * var(--u)); letter-spacing: 0.01em; }
  .w { font-size: calc(40.1 * var(--u)); margin-left: 0.3em; }
  .s { font-size: calc(54.7 * var(--u)); margin: 0 0.3em; }
  @media (width <= 896px) {
    width: auto !important;
    zoom: 0.72;
  }
}
/* 予約などのボタン（こげ茶＋金の縁） */
.xm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: calc(var(--bh, 86) * var(--u));
  border: calc(2 * var(--u)) solid #e9a749;
  border-radius: 999px;
  background: linear-gradient(#2d1100, #0d0400);
  box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgb(0 0 0 / 0.3);
  color: #fff;
  font-size: calc(28 * var(--u));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  @media (hover: hover) {
    &:hover {
      filter: brightness(1.4);
    }
  }
  @media (width <= 896px) {
    /* SP：文字・高さ・幅とも画面幅に合わせて縮小。大きくなりすぎないよう上限あり（文字24px・高さ64px・幅420px） */
    width: min(80%, 420px) !important;
    height: min(calc(100 * var(--u)), 64px);
    font-size: clamp(14px, calc(38 * var(--u)), 24px);
  }
}

/* ---------- ページ内メニュー（スクロールで画面上部に固定） ---------- */
.hero__navbar {
  position: sticky;
  top: 0;
  z-index: 50;
}
.hero__nav {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: calc(160 * var(--u));
  /* 左右の余白はPC・SPとも3%。ボタン列はデザイン幅（1400px）を上限に中央寄せ */
  padding: 0 3%;
  border-bottom: calc(8 * var(--u)) solid #c39a3a;
  background: #8a1e1e;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
  transition: height 0.3s ease-out;
  @media (width <= 896px) {
    height: auto;
    padding: 10px 3% 12px;
    border-bottom-width: 3px;
  }
  ul {
    width: 100%;
    /* 1920px以上は画面幅に比例して広げる（文字も比例して大きくなるため） */
    max-width: max(1400px, calc(1400 * var(--u)));
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    column-gap: calc(10.2 * var(--u));
    @media (width <= 896px) {
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
    }
  }
  li {
    display: flex;
  }
  a {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5em;
    box-sizing: border-box;
    height: calc(53 * var(--u));
    padding: 0 0 0 calc(18 * var(--u));
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 calc(2 * var(--u)) #e6cf9a inset;
    color: #000;
    font-size: max(10px, calc(14 * var(--u)));
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    word-break: keep-all;
    &::before {
      content: "★";
      color: #d9a930;
      font-size: 1.15em;
    }
    @media (width <= 896px) {
      height: auto;
      padding: 7px 4px 7px 8px;
      font-size: 1.1rem;
      gap: 0.3em;
    }
  }
  li:last-child a::before {
    color: #c0141c;
  }
}
.hero__nav--active {
  height: calc(100 * var(--u));
  @media (width <= 896px) {
    height: auto;
  }
}

/* ---------- メインビジュアル ---------- */
.xm-mv {
  --bgc: #c4141b;
  @media (width <= 896px) {
    padding: 0;
    /* SP：中央部分（幅1300px相当）を切り出して表示 */
    aspect-ratio: 1300 / 954;
    background: #c4141b;
  }
  .xm-mv__fg {
    z-index: 2;
    margin: 0;
    /* SP：幅1920の画像の中央1300px分を見せる（左右の310pxずつをはみ出させ、セクションの overflow-x: clip で切る） */
    @media (width <= 896px) {
      position: relative;
      width: calc(1920 / 1300 * 100%);
      margin-left: calc(-310 / 1300 * 100%);
    }
  }
}

/* ---------- 試乗企画 ---------- */
.xm-test {
  --bgc: #0d311c;
  /* PC：背景画像は使わず、デザインの地色をグラデーションで再現 */
  background-image: radial-gradient(ellipse 60% 45% at 50% 28.5%, #234b2d 0%, #234b2d 30%, #1c4327 63%, #153a22 85%, #0d311c 100%);
  background-size: 100% 100%;
  @media (width <= 896px) {
    background: linear-gradient(#173f28, #0b2e1a);
  }
}
.xm-test__body {
  @media (width <= 896px) {
    display: flex;
    flex-direction: column;
    margin-top: 0;
  }
}
.xm-test__flyer {
  @media (width <= 896px) {
    order: 1;
    width: 82% !important;
  }
}
.xm-panel {
  box-sizing: border-box;
  height: calc(var(--ph) * var(--u));
  border: calc(2 * var(--u)) solid #8e7130;
  border-radius: calc(22 * var(--u));
  background: #002d21;
  box-shadow: inset 0 0 0 calc(6 * var(--u)) #002d21, inset 0 0 0 calc(7.5 * var(--u)) #b3913f, 0 0 calc(16 * var(--u)) rgb(0 0 0 / 0.35);
  color: #fff;
  text-align: left;
  @media (width <= 896px) {
    height: auto;
    width: 92% !important;
    padding-bottom: calc(40 * var(--u)) !important;
    border-radius: 12px;
  }
}
.xm-panel__ttl {
  color: #e0b24e;
  font-size: calc(30 * var(--u));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  small {
    margin-left: 1.2em;
    color: #fff;
    font-size: 0.667em;
    letter-spacing: 0.02em;
  }
}
.xm-howto {
  padding: calc(52.5 * var(--u)) calc(40 * var(--u)) 0 calc(65 * var(--u));
  ol {
    margin: calc(30 * var(--u)) 0 0 calc(-1 * var(--u));
    padding: 0;
    list-style: none;
  }
  li {
    display: grid;
    grid-template-columns: calc(40 * var(--u)) 1fr;
    column-gap: calc(16 * var(--u));
    margin-top: calc(24 * var(--u));
  }
  .num {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: calc(40 * var(--u));
    height: calc(40 * var(--u));
    margin-top: calc(-3.5 * var(--u));
    border-radius: 50%;
    background: #820200;
    box-shadow: 0 0 0 calc(2.5 * var(--u)) #fff;
    color: #fff;
    font-size: calc(26 * var(--u));
    font-weight: 700;
    line-height: 1;
  }
  b {
    font-size: calc(30 * var(--u));
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
  }
  span:not(.num) {
    margin-top: calc(12 * var(--u));
    font-size: max(12px, calc(20 * var(--u)));
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.03em;
  }
}
.xm-prize {
  padding: calc(44.5 * var(--u)) 0 0 calc(57 * var(--u));
  .xm-panel__ttl {
    padding-left: calc(2 * var(--u));
  }
  ul {
    width: calc(760 * var(--u));
    margin-top: calc(40.5 * var(--u));
    @media (width <= 896px) {
      width: auto;
      margin-right: calc(57 * var(--u));
    }
  }
  li {
    display: flex;
    align-items: center;
    gap: calc(var(--bl) * var(--u));
    min-height: calc(89 * var(--u));
    margin-bottom: calc(25 * var(--u));
    border-radius: calc(12 * var(--u));
    background: var(--c);
    color: var(--t1);
    @media (width <= 896px) {
      min-height: calc(89 * var(--u));
      padding-block: calc(16 * var(--u));
      flex-wrap: wrap;
    }
    img {
      flex: 0 0 auto;
      width: auto;
      height: calc(var(--ih) * var(--u));
      margin-left: calc(var(--il) * var(--u));
    }
    b {
      flex: 0 0 auto;
      width: calc(var(--bw, 204) * var(--u));
      font-size: calc(35 * var(--u));
      font-weight: 700;
      line-height: 1;
      letter-spacing: var(--ls, 0.04em);
    }
    span {
      color: var(--t2);
      font-size: max(12px, calc(20 * var(--u)));
      font-weight: 700;
      letter-spacing: 0.03em;
      @media (width <= 896px) {
        width: 100%;
        padding-left: calc((var(--il) + 68 + var(--bl)) * var(--u));
      }
    }
  }
  .xm-note {
    margin-top: calc(-6 * var(--u));
    font-size: max(10px, calc(16 * var(--u)));
    text-align: left;
    @media (width <= 896px) {
      padding: 0;
    }
  }
}
.xm-free {
  container-type: inline-size;
  aspect-ratio: 605 / 172;
  background: url("../images/xm/test_free.webp") 0 0 / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  @media (width <= 896px) {
    order: 1;
    width: 70% !important;
  }
  span {
    margin-right: 3.2cqw;
    font-size: 6.3cqw;
    letter-spacing: 0.12em;
  }
  b {
    font-size: 10.7cqw;
    font-weight: 900;
    letter-spacing: 0.08em;
  }
}

/* ---------- 子ども食堂 ---------- */
.xm-kodomo {
  --bgc: #751b17;
  /* PC：背景画像は使わず、デザインの地色をグラデーションで再現 */
  background-image: linear-gradient(#901c28 0%, #901c28 38%, #8a1c23 50%, #7c1c1d 58%, #751b17 66%, #751b17 100%);
  background-size: 100% 100%;
  @media (width <= 896px) {
    background: linear-gradient(#8f1b29 0, #8b1b25 60%, #741a17);
  }
  .xm-deco {
    @media (width <= 896px) {
      position: absolute;
      z-index: 4;
      top: calc(var(--spy) * 1vw);
      width: calc(var(--w) / 19.2 * 1.3vw);
      margin: 0;
    }
  }
}
.xm-kodomo__scarf {
  @media (width <= 896px) {
    left: 1%;
  }
}
.xm-kodomo__mitten {
  @media (width <= 896px) {
    right: 1%;
  }
}
.xm-kodomo__lead {
  @media (width <= 896px) {
    width: 92%;
    padding-inline: 14% !important;
  }
}
/* 枠（パネル）：デザインでは背景画像側にあったものをCSSで作成 */
.xm-box {
  box-sizing: border-box;
  border-radius: calc(26 * var(--u)) calc(26 * var(--u)) calc(22 * var(--u)) calc(22 * var(--u));
  background: #f4eae2;
  overflow: hidden;
  @media (width <= 896px) {
    border-radius: 12px;
  }
}
/* 画像の下の内容（タイトル～注意書き）。上下左右の余白はこの padding で取る */
.xm-box__body {
  padding: calc(45.5 * var(--u)) calc(70 * var(--u)) calc(53.4 * var(--u));
  @media (width <= 896px) {
    padding: calc(45.5 * var(--u)) 6% calc(30 * var(--u));
  }
}
.xm-box__img {
  border-radius: calc(26 * var(--u)) calc(26 * var(--u)) 0 0;
}
.xm-box__ttl {
  color: #146f27;
  font-size: calc(42.8 * var(--u));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
  @media (width <= 896px) {
    font-size: max(14px, calc(38 * var(--u)));
    text-wrap: balance;
  }
}
.xm-yellow {
  display: grid;
  grid-template-columns: repeat(3, calc(476 * var(--u)));
  justify-content: center;
  column-gap: calc(16 * var(--u));
  margin-top: calc(23 * var(--u));
  @media (width <= 896px) {
    grid-template-columns: 1fr;
    row-gap: calc(14 * var(--u));
  }
  li {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.1em;
    padding-block: calc(28 * var(--u)) calc(38 * var(--u));
    border-radius: calc(20 * var(--u));
    background: #ffff2c;
    color: #000;
    font-size: calc(50 * var(--u));
    font-weight: 800;
    line-height: 1;
    @media (width <= 896px) {
      padding-block: calc(18 * var(--u)) calc(7 * var(--u));
    }
  }
  small {
    font-size: 0.6em;
    font-weight: 700;
  }
  .arw {
    font-size: 0.7em;
    margin: 0 0.25em 0 0.15em;
  }
  em {
    color: #c3141b;
    font-family: "Oswald", sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    font-style: normal;
  }
  i {
    color: #c3141b;
    font-style: normal;
    font-weight: 700;
    font-size: 0.7em;
  }
}
.xm-box__note {
  margin-top: calc(14 * var(--u));
  margin-inline: auto;
  inline-size: fit-content;
  color: #231815;
  font-size: max(10px, calc(16 * var(--u)));
  font-weight: 500;
  line-height: 1.5625;
  text-align: left;
  @media (width <= 896px) {
    margin-top: calc(20 * var(--u));
    font-size: max(11px, calc(16 * var(--u)));
  }
}
.xm-donate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(57 * var(--u));
  box-sizing: border-box;
  height: calc(111 * var(--u));
  border: calc(2 * var(--u)) solid #dfb14e;
  border-radius: calc(22 * var(--u));
  color: #fff;
  font-size: calc(30 * var(--u));
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  @media (width <= 896px) {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 4%;
    row-gap: 10px;
    width: 92% !important;
    font-size: max(13px, calc(30 * var(--u)));
  }
  /* 項目名（dt）と内容（dd）を1組にして並べる */
  > div {
    display: flex;
    align-items: center;
    gap: calc(17 * var(--u));
    @media (width <= 896px) {
      gap: 10px;
    }
  }
  dd {
    margin: 0;
  }
  dt {
    display: grid;
    place-items: center;
    width: calc(155 * var(--u));
    height: calc(54 * var(--u));
    border-radius: 999px;
    background: #dfb14e;
    color: #820200;
    letter-spacing: 0.04em;
    @media (width <= 896px) {
      width: auto;
      height: auto;
      padding: 0.35em 1em;
    }
  }
}
/* 現在の募金額（xmas.js が募金額表示サイトから取得できたときだけ表示） */
.xm-bokin {
  box-sizing: border-box;
  padding: calc(34 * var(--u)) calc(40 * var(--u)) calc(44 * var(--u));
  border: calc(2 * var(--u)) solid #dfb14e;
  border-radius: calc(22 * var(--u));
  color: #fff;
  text-align: center;
  &[hidden] {
    display: none;
  }
  @media (width <= 896px) {
    width: 92% !important;
    padding: 18px 4% 22px;
  }
}
.xm-bokin__ttl {
  display: inline-block;
  padding: 0.35em 1.4em;
  border-radius: 999px;
  background: #dfb14e;
  color: #820200;
  font-size: calc(30 * var(--u));
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  @media (width <= 896px) {
    font-size: max(13px, calc(30 * var(--u)));
  }
}
.xm-bokin__amt {
  margin-top: calc(10 * var(--u)) !important;
  font-family: "Oswald", "Noto Sans JP", sans-serif;
  font-size: calc(120 * var(--u));
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  small {
    margin-left: 0.15em;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.4em;
    font-weight: 700;
  }
  &[hidden] {
    display: none;
  }
  @media (width <= 896px) {
    font-size: max(40px, calc(120 * var(--u)));
  }
}
.xm-bokin__upd {
  font-size: calc(22 * var(--u));
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  @media (width <= 896px) {
    margin-top: 8px !important;
    font-size: max(12px, calc(22 * var(--u)));
  }
  /* 募金開始前（金額を出さないとき）は「現在の募金額」のすぐ下に来るので間隔をあける */
  .xm-bokin__amt[hidden] + & {
    margin-top: calc(16 * var(--u)) !important;
    @media (width <= 896px) {
      margin-top: 12px !important;
    }
  }
}
/* 募金額の詳細ページへのボタン（常に表示。高さ分はセクションの --h に含めてある） */
.xm-bokin__btn {
  --bh: 80;
}
/* PC：募金額の枠を表示したぶん、セクションの高さ（--h）を伸ばす */
.xm-kodomo:has(.xm-bokin:not([hidden])) {
  aspect-ratio: 1920 / calc(var(--h) + 360);
  @media (width <= 896px) {
    aspect-ratio: auto;
  }
}
/* 募金開始前（金額を出さず「◯月◯日から集計・掲載します」だけ表示）は枠が低いので、伸ばす量も小さくする */
.xm-kodomo:has(.xm-bokin:not([hidden]) .xm-bokin__amt[hidden]) {
  aspect-ratio: 1920 / calc(var(--h) + 226);
  @media (width <= 896px) {
    aspect-ratio: auto;
  }
}

/* ---------- 新車 ---------- */
.xm-new {
  --bgc: #a16931;
  /* PC：背景画像は使わず、中央のぼんやりした光をグラデーションで再現 */
  background-image: radial-gradient(ellipse calc(680 * var(--u)) calc(820 * var(--u)) at 50% calc(900 * var(--u)), #c09a4c 0%, #b58943 37%, #ab793a 61%, #a26a32 90%, #a16931 100%);
  background-size: 100% 100%;
  @media (width <= 896px) {
    background: radial-gradient(ellipse at 50% 30%, #c19a52, #a46a31 60%);
  }
}
/* 見出し（バッジ＋タイトル） */
/* PC：バッジとタイトルを横に並べる。上の要素との間隔は --y、バッジ・タイトルは左隣との間隔 --x と見出し上端からの位置 --y */
.xm-head {
  display: flex;
  align-items: flex-start;
  margin-top: calc(var(--y, 0) * var(--u));
  @media (width <= 896px) {
    align-items: center;
    justify-content: center;
    gap: 2%;
    width: 94%;
    margin: calc(30 * var(--u)) auto 0;
    .xm-head__hex {
      width: 19%;
      margin: 0;
    }
    .xm-head__ttl {
      width: 74%;
      margin: 0;
    }
  }
}
.xm-head__hex,
.xm-head__ttl {
  position: relative;  /* z-index を効かせるため */
  flex: none;
  z-index: 2;
  width: calc(var(--w) * var(--u));
  margin: calc(var(--y) * var(--u)) 0 0 calc(var(--x) * var(--u));
}
.xm-cars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: calc(27 * var(--u));
  row-gap: calc(21 * var(--u));
  @media (width <= 896px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    width: 92% !important;
  }
  @media (480px < width <= 896px) {
    grid-template-columns: repeat(3, 1fr);
  }
}
.xmcar {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 299 / 430;
  color: #fff;
  > img {
    position: absolute;
    inset: 0;
    height: 100%;
  }
  > :not(img) {
    position: absolute;
  }
}
/* 「限定◯台」の丸（CSS）：赤 #c5001c ＋白フチ */
.xmcar__badge {
  z-index: 1;
  top: 0;
  left: 64.9%;
  width: 27.8%;
  aspect-ratio: 1;
  box-sizing: border-box;
  border: 1cqw solid #fff;
  border-radius: 50%;
  background: #c5001c;
  text-align: center;
  line-height: 1;
  font-weight: 700;
  small {
    display: block;
    margin-top: 3.5cqw;
    font-size: 6.35cqw;
  }
  b {
    display: block;
    margin-top: 0.4cqw;
    font-family: "Noto Serif JP", serif;
    font-weight: 900;
    font-size: 8.3cqw;
    letter-spacing: -0.02em;
    &::first-letter {
      font-size: 12.1cqw;
    }
  }
}
.xmcar__name,
.xmcar__sub {
  left: 0;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}
.xmcar__name {
  top: 70.2%;
  font-size: 8.73cqw;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.xmcar__sub {
  top: 78.4%;
  font-size: 4.35cqw;
  font-weight: 500;
}
/* カード全体をポップアップを開くボタンにし、「詳しくはコチラ」の金色ボタンはCSSで表示 */
.xmcar__btn {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  span {
    position: absolute;
    left: 24.7%;
    top: 84.4%;
    width: 49.8%;
    height: 7.7%;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border: 0.35cqw solid #c58a3a;
    border-radius: 999px;
    background: linear-gradient(90deg, #7f5c00 0%, #966f09 18%, #f2bb47 38%, #e5b042 50%, #c1922f 64%, #8c6614 84%, #694902 100%);
    font-size: 4.98cqw;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-shadow: 0 0 0.4em rgb(80 40 0 / 0.6);
  }
  @media (hover: hover) {
    &:hover span {
      filter: brightness(1.15);
    }
  }
}
/* SOLD OUT（新車カード）: soldout画像を車写真の上に重ね、「詳しくはコチラ」ボタンを無効化して隠す */
.xmcar--sold {
  &::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 12% 10% auto;
    height: 46%;
    background: url("../images/soldout.png") center / contain no-repeat;
    pointer-events: none;
  }
  .xmcar__btn {
    pointer-events: none;
    cursor: default;
    span {
      visibility: hidden;
    }
  }
}

/* ---------- ポップアップ（新車の詳細）※デザインは blackfriday2026 と同じ ---------- */
body:has(dialog.bfpop[open]) {
  overflow: hidden;
}
.bfpop {
  width: min(92vw, 400px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  background: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  color: #150d08;
  &::backdrop {
    background: rgb(0 0 0 / 0.72);
  }
}
.bfpop__in {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 646 / 947;
  background: url("../images/bf/pop_frame.webp") 0 0 / 100% 100% no-repeat;
}
.bfpop__car {
  position: absolute;
  height: auto;
  /* 白背景の写真（クラウンスポーツ）は、デザインどおり乗算で白を消す */
  &.is-multiply {
    mix-blend-mode: multiply;
  }
}
/* 文字の位置・大きさは modal データ（枠 646×947）に合わせる。cqw は枠の幅に対する % */
.bfpop__body {
  position: relative;
  padding: 56.7cqw 5% 8cqw 9.9%;
  font-size: 3.4cqw;
  font-feature-settings: "palt";  /* デザインどおり、かなを詰めて組む */
  font-weight: 500;
  line-height: 1.42;
  /* 「・」の後ろの折り返し行は、少し字下げして揃える */
  ul {
    font-size: 3.3cqw;
  }
  li {
    padding-left: 0.35em;
    &::before {
      content: "・";
      margin-left: -0.35em;
    }
  }
}
.bfpop__name {
  text-align: center;
  font-size: 8.5cqw;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}
.bfpop__sub {
  margin-top: 1cqw;
  text-align: center;
  font-size: 4.8cqw;
  font-weight: 900;
  line-height: 1.2;
}
/* 納期・カラー：「：」の位置を揃え、カラーの2行目は値の頭に揃える */
.bfpop__spec {
  display: grid;
  grid-template-columns: 3.86em 1fr;
  margin-top: 2cqw;
  font-size: 3.95cqw;
  line-height: 1.47;
  dt {
    position: relative;
    &::after {
      content: "：";
      position: absolute;
      left: 2.95em;
    }
  }
}
.bfpop__opt {
  margin-top: 2cqw;
}
.bfpop__close {
  position: absolute;
  top: 3.09%;
  left: 86.45%;
  width: 8.39%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: url("../images/bf/pop_close.svg") center / 100% 100% no-repeat;
  cursor: pointer;
  &:focus:not(:focus-visible) {
    outline: none;
  }
  &:focus-visible {
    outline: 2px solid #ffe68c;
    outline-offset: 2px;
  }
}

/* ---------- 中古車 ---------- */
.xm-used {
  --bgc: #0d311c;
  /* PC：背景画像は使わず、デザインの地色をグラデーションで再現 */
  background-image: radial-gradient(ellipse 75% 77% at 50% 21%, #234b2d 0%, #234b2d 35%, #1c4327 60%, #133820 85%, #0d311c 100%);
  background-size: 100% 100%;
  @media (width <= 896px) {
    background: linear-gradient(#1d4a2c, #0d321b);
  }
}
.xm-catch {
  color: #ffffa6;
  font-size: calc(57.4 * var(--u));
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-align: center;
  @media (width <= 896px) {
    font-size: max(15px, calc(44 * var(--u)));
    line-height: 1.4;
    padding-inline: 4%;
    text-wrap: balance;
  }
}
.xm-useds {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: calc(20.2 * var(--u));
  row-gap: calc(18 * var(--u));
  @media (width <= 896px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    width: 92% !important;
  }
  @media (480px < width <= 896px) {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* 中古車カード：カードごと1枚の画像（used01〜12.webp）。カード全体がリンク */
.xmused {
  position: relative;
  line-height: 0;
}
.xmused__link {
  display: block;
  @media (hover: hover) {
    &:hover {
      opacity: 0.85;
    }
  }
}
/* SOLD OUT（中古車カード）: リンク無効化＋「詳しくはコチラ」を白で覆って非表示＋soldout画像を写真の上に重ねる */
.xmused--sold {
  .xmused__link {
    pointer-events: none;
  }
  &::before {
    content: "";
    position: absolute;
    left: 17%;
    top: 86.5%;
    width: 66%;
    height: 9.5%;
    background: #fff;
  }
  &::after {
    content: "";
    position: absolute;
    inset: 0 8% auto;
    height: 48.9%;
    background: url("../images/soldout.png") center / contain no-repeat;
  }
}
.xm-used__lead {
  color: #fff;
  font-size: calc(40.9 * var(--u));
  font-weight: 700;
  line-height: 1.455;
  letter-spacing: 0.04em;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  @media (width <= 896px) {
    font-size: max(14px, calc(34 * var(--u)));
    padding-inline: 5%;
  }
}
.xm-search {
  display: grid;
  place-items: center;
  height: calc(91 * var(--u));
  border-radius: 999px;
  background: linear-gradient(#e4cf4f, #f1d824);
  box-shadow: calc(8 * var(--u)) calc(8 * var(--u)) 0 #b8960f;
  color: #b90000;
  font-size: calc(34 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  @media (hover: hover) {
    &:hover {
      filter: brightness(1.08);
    }
  }
  @media (width <= 896px) {
    /* SP：文字・高さ・幅とも画面幅に合わせて縮小。大きくなりすぎないよう上限あり（文字24px・高さ64px・幅420px） */
    width: min(80%, 420px) !important;
    height: min(calc(100 * var(--u)), 64px);
    font-size: clamp(14px, calc(38 * var(--u)), 24px);
    box-shadow: min(calc(8 * var(--u)), 5px) min(calc(8 * var(--u)), 5px) 0 #b8960f;
  }
}

/* ---------- 査定価格de宝くじ ---------- */
.xm-lottery {
  --bgc: #0d311c;
  overflow: visible;
  @media (width <= 896px) {
    background: #0d321b;
  }
}
/* 「同時開催」ラベル：幅を固定せず、セクション全幅の中で中央揃え（文字幅が変わっても重ならない） */
.xm-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(32 * var(--u));
  color: #ffed50;
  font-size: calc(60 * var(--u));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  > * {
    flex: 0 0 auto;
    font-weight: inherit;
  }
  .xm-label__box {
    padding: calc(14 * var(--u)) calc(28 * var(--u)) calc(16 * var(--u));
    border: calc(2 * var(--u)) solid #bab641;
  }
  @media (width <= 896px) {
    width: auto !important;
    flex-wrap: wrap;
    row-gap: 8px;
    font-size: max(18px, calc(48 * var(--u)));
    .xm-label__box {
      padding: 0.2em 0.5em;
    }
  }
}
.xm-label--red {
  color: #b90000;
  .xm-label__box {
    border-color: #b90000;
  }
}

/* ---------- サービス季節商品 ---------- */
.xm-service {
  --bgc: #fff8e6;
  /* PC：背景画像は使わず、デザインの地色（左上・右下がクリーム黄、中央が白）をグラデーションで再現 */
  background-image: linear-gradient(135deg, #ffe690 0%, #fff0bb 19.7%, #fff7dc 29.6%, #fffcf5 39.4%, #fffefe 49.7%, #fff9e7 69.9%, #fff3c8 80.1%, #ffe898 90.4%, #ffe28a 100%);
  background-size: 100% 100%;
  @media (width <= 896px) {
    background: linear-gradient(170deg, #fff3cf, #fffdf8 40%, #fde59a);
  }
}
.xm-svcs {
  display: grid;
  grid-template-columns: repeat(4, calc(380 * var(--u)));
  column-gap: calc(24 * var(--u));
  @media (width <= 896px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 4%;
    width: 92% !important;
  }
}
.xmsvc {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 380 / 865;
  color: #000;
  text-align: left;
  line-height: 1;
  /* 列の区切り線 */
  &:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: -3.3cqw;
    width: 1px;
    height: 97.7%;
    background: #efb885;
    @media (width <= 896px) {
      display: none;
    }
  }
  > * {
    position: absolute;
  }
}
.xmsvc__head {
  top: 0;
  left: 0;
  width: 100%;
  height: 19.2%;
  display: grid;
  place-content: center;
  border-radius: 1.6cqw;
  background: #dd711a;
  color: #fff;
  text-align: center;
  font-weight: 700;
  span {
    font-size: 9.18cqw;
    line-height: 1.3;
    letter-spacing: 0.02em;
  }
  b {
    font-size: 11.84cqw;
    line-height: 1.25;
    letter-spacing: 0.02em;
  }
}
/* 見出しより下（写真・10%OFF・価格・仕様の文字）は1枚の画像 */
.xmsvc__img {
  top: 20.1%;
  left: 0;
  /* --iw：画像のデザイン幅（カード幅380より広い画像は、右へはみ出して表示） */
  width: calc(var(--iw, 380) / 380 * 100%);
  max-width: none;
}
.xm-service__note {
  color: #231815;
}

/* ---------- アスリート診断 ---------- */
/* 同時開催～注意書きのまとまり */
.xm-athlete {
  position: relative;  /* z-index を効かせるため */
  z-index: 2;
  margin-top: calc(var(--y, 0) * var(--u));  /* 上の「車検・点検のご予約」ボタンとの間隔 */
  /* SP：上との間隔はこのまとまりで取り、中の先頭（同時開催）には付けない */
  @media (width <= 896px) {
    margin-top: calc(80 * var(--u));
    > :first-child {
      margin-top: 0;
    }
  }
}
.xm-athlete__link {
  display: block;
  @media (hover: hover) {
    &:hover {
      opacity: 0.92;
    }
  }
}

/* ---------- MERRY CHRISTMAS ---------- */
.xm-merry {
  --bgc: #0d311c;
  overflow: visible;
  /* PC：背景画像は使わず、上中央のぼんやりした光をグラデーションで再現 */
  background-image: radial-gradient(ellipse 17% 80% at 50% 0, #234b2d 0%, #1a4126 40%, #0d311c 100%);
  background-size: 100% 100%;
  /* 上端の帯（サービス季節商品との境目） */
  &::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: calc(-12 * var(--u));
    height: calc(16 * var(--u));
    min-height: 4px;
    background: linear-gradient(#b81c09 0 50%, #e5b042 50%);
  }
  @media (width <= 896px) {
    background: radial-gradient(ellipse at 50% 0, #1d4a2c, #0d2f1b 70%);
    padding-top: calc(50 * var(--u));
  }
}
.xm-en {
  color: #e7bd78;
  font-size: calc(25 * var(--u));
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-align: center;
  @media (width <= 896px) {
    font-size: max(12px, calc(25 * var(--u)));
  }
}
.xm-merry__glow {
  z-index: 1;
  @media (width <= 896px) {
    display: none;
  }
}
.xm-merry__ttl {
  color: #fff175;
  font-size: calc(87.8 * var(--u));
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  word-break: keep-all;
  text-align: center;
  text-shadow: 0 0 calc(18 * var(--u)) rgb(0 0 0 / 0.45);
  @media (width <= 896px) {
    font-size: max(20px, calc(52 * var(--u)));
  }
}

/* ---------- EVENT / フッターメッセージ ---------- */
.xm-event {
  --bgc: #6d1e1e;
  @media (width <= 896px) {
    padding-top: calc(70 * var(--u));
    padding-bottom: 0;
  }
}
.xm-events {
  display: grid;
  grid-template-columns: 779fr 780fr;
  column-gap: calc(35 * var(--u));
  @media (width <= 896px) {
    gap: 12px;
  }
  @media (width <= 480px) {
    grid-template-columns: 1fr;
  }
}
.xm-foot {
  @media (width <= 896px) {
    position: relative;
    margin-top: calc(70 * var(--u));
    padding: calc(150 * var(--u)) 0 calc(90 * var(--u));
  }
  /* SP：左右のオーナメントと重ならないよう、文字は中央寄りの幅に収める */
  > :not(.xm-arc) {
    @media (width <= 896px) {
      width: 74%;
    }
  }
}
/* 赤いアーチ：上端の円弧は clip-path（デザインは半径約3778px＝幅1920pxで中央と端の差124px）、地は楕円グラデーション。
   オーナメントは左右ごとに 光・影（1枚に合成）／本体 を重ねる */
.xm-arc {
  position: absolute;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse calc(820 * var(--u)) calc(660 * var(--u)) at calc(954 * var(--u)) calc(401 * var(--u)), #e9543f 0%, #d12d24 44%, #be0d0e 80%, #b60004 100%);
  pointer-events: none;
  left: 0;
  top: calc(670 * var(--u));
  width: 100%;
  height: calc(815 * var(--u));
  clip-path: circle(calc(3778 * var(--u)) at 50% calc(3778 * var(--u)));
  /* SP：上部を湾曲。オーナメントの吊り紐が円弧に沿うよう、PCと同じ比率（幅1920に対し半径3778）にする */
  @media (width <= 896px) {
    inset: 0;
    width: auto;
    height: auto;
    clip-path: circle(calc(3778 / 1920 * 100cqw) at 50% calc(3778 / 1920 * 100cqw));
    background: radial-gradient(ellipse 70% 60% at 50% 50%, #e9543f 0%, #d12d24 44%, #be0d0e 80%, #b60004 100%);
  }
  img {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    /* SP：PCと同じく上端（円弧）に合わせ、左右それぞれ幅50% */
    @media (width <= 896px) {
      height: auto;
    }
  }
  .xm-arc__l { left: 0; }
  .xm-arc__r { right: 0; }
}
.xm-foot__ttl {
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: calc(81.9 * var(--u));
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  @media (width <= 896px) {
    font-size: max(22px, calc(56 * var(--u)));
  }
}
.xm-foot__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(22 * var(--u));
  height: calc(101 * var(--u));
  border-radius: 999px;
  background: #0b4a2b;
  color: #fff;
  font-size: calc(29.2 * var(--u));
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  svg {
    width: calc(30 * var(--u));
    height: auto;
  }
  @media (hover: hover) {
    &:hover {
      filter: brightness(1.3);
    }
  }
  @media (width <= 896px) {
    /* SP：文字・高さ・幅とも画面幅に合わせて縮小。大きくなりすぎないよう上限あり（文字24px・高さ64px・幅420px） */
    width: min(76%, 400px) !important;
    height: min(calc(100 * var(--u)), 64px);
    gap: min(calc(19 * var(--u)), 12px);
    font-size: clamp(14px, calc(38 * var(--u)), 24px);
    svg {
      width: min(calc(29 * var(--u)), 18px);
    }
  }
}
