body{
  margin: 0;
  padding: 0;
}

/* mv.html 単体ページ用 */
body.mv-standalone {
  background: #fff;
}

.mv {
  position: relative;
  width: 100%;
  overflow: visible;
  --mv-height: clamp(220px, 38vw, 500px);
  --mv-woman-overhang: calc(var(--mv-height) * 0.14);
  --mv-bg-duration: 150s;
  --mv-shoes-duration: 40s;
  padding-bottom: var(--mv-woman-overhang);
}

.mv--index {
  --mv-height: clamp(280px, 42vw, 600px);
  z-index: 1;
}

/* 背景：右→左にループ */
.mv-bg {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.mv-bg-track {
  display: flex;
  width: max-content;
  animation: mv-scroll var(--mv-bg-duration) linear infinite;
  will-change: transform;
}

.mv-bg-track img {
  display: block;
  height: var(--mv-height);
  width: auto;
  flex-shrink: 0;
}

@keyframes mv-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* 靴画像：縦カプセル（上下半円・左右直線）・右→左ループ */
.mv-shoes {
  position: absolute;
  top: 2.4rem;
  left: 0;
  width: 100%;
  height: calc(var(--mv-height) * 0.72);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.mv-shoes-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: mv-shoes-scroll var(--mv-shoes-duration) linear infinite;
  will-change: transform;
}

.mv-shoes-set {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 3.5vw, 3rem);
  flex-shrink: 0;
  height: 100%;
  padding-top: calc(var(--mv-height) * 0.04);
  padding-right: clamp(1.25rem, 3.5vw, 3rem);
}

/* PC: 行ラッパーを透過して従来の1行スクロールに */
.mv-shoes-row {
  display: contents;
}

.mv-shoe {
  --shoe-w: clamp(68px, 8.5vw, 120px);
  --shoe-h: calc(var(--shoe-w) * 1.5);
  display: block;
  flex-shrink: 0;
  width: var(--shoe-w);
  height: var(--shoe-h);
  /* 上下は半円・左右は直線（縦カプセル） */
  border-radius: calc(var(--shoe-w) / 2);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.mv-shoe--flip {
  perspective: 900px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.mv-shoe-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  border-radius: inherit;
}

.mv-shoe--flip:hover .mv-shoe-inner,
.mv-shoe--flip:focus-visible .mv-shoe-inner {
  transform: rotateY(180deg);
}

.mv-shoe:focus-visible {
  outline: 2px solid #1a2a40;
  outline-offset: 3px;
}

.mv-shoe-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.mv-shoe-face--back {
  transform: rotateY(180deg);
}

.mv-shoe--s {
  --shoe-w: clamp(52px, 6.5vw, 92px);
}

.mv-shoe--m {
  --shoe-w: clamp(68px, 8.5vw, 120px);
}

.mv-shoe--l {
  --shoe-w: clamp(84px, 10.5vw, 148px);
}

.mv-shoe--xl {
  --shoe-w: clamp(96px, 12vw, 168px);
}

.mv-shoe img,
.mv-shoe-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mv-shoe-face--back {
  background: #f4f4f4;
}

.mv-shoe-face__tone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
  filter: grayscale(0.15) brightness(1.08) contrast(0.92);
}

.mv-shoe-face__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.mv-shoe-face__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: auto;
  height: auto;
  max-width: 68%;
  max-height: 42%;
  padding: 0 !important;
  object-fit: contain !important;
  transform: translate(-50%, -50%);
  background: transparent !important;
}

.mv-shoe-face__logo-text {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  max-width: 78%;
  transform: translate(-50%, -50%);
  font-family: var(--font-en, "Bodoni Moda", serif);
  font-size: clamp(0.55rem, 1.4vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  color: #111;
  text-transform: uppercase;
  word-break: break-word;
}

.mv-shoe-stagger-1 { margin-top: calc(var(--mv-height) * 0.1); }
.mv-shoe-stagger-2 { margin-top: calc(var(--mv-height) * 0.02); }
.mv-shoe-stagger-3 { margin-top: calc(var(--mv-height) * 0.14); }
.mv-shoe-stagger-4 { margin-top: calc(var(--mv-height) * 0.05); }
.mv-shoe-stagger-5 { margin-top: calc(var(--mv-height) * 0.12); }
.mv-shoe-stagger-6 { margin-top: 0; }
.mv-shoe-stagger-7 { margin-top: calc(var(--mv-height) * 0.08); }
.mv-shoe-stagger-8 { margin-top: calc(var(--mv-height) * 0.04); }

@keyframes mv-shoes-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% / 3));
  }
}

/* 人物：夫婦＋子供（下揃え） */
.mv-people {
  position: absolute;
  left: 26%;
  bottom: calc(var(--mv-woman-overhang) * 0);
  transform: translateX(-42%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: clamp(0.15rem, 0.8vw, 0.6rem);
  pointer-events: none;
  line-height: 0;
}

.mv-woman,
.mv-child {
  flex-shrink: 0;
  line-height: 0;
}

.mv-woman video {
  display: block;
  height: calc(var(--mv-height) * 0.45);
  width: auto;
}

.mv-child img {
  display: block;
  height: calc(var(--mv-height) * 0.28);
  width: auto;
}

/* キャッチコピー：中央・明朝体 */
.mv-copy {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-family: var(--font-base);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: var(--font-ja-weight);
  color: #1a1a1a;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* テスト用：昼夜切り替え */
.mv-theme-test {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 10;
  display: flex;
  gap: 0.35rem;
  pointer-events: auto;
}

.mv-theme-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-family: var(--font-base);
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  cursor: pointer;
}

.mv-theme-btn:hover {
  background: #fff;
}

.mv-theme-btn.is-active {
  background: #1a2a40;
  border-color: #1a2a40;
  color: #fff;
}

.mv--night .mv-theme-btn {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.mv--night .mv-theme-btn.is-active {
  background: #1a2a40;
  border-color: #1a2a40;
  color: #fff;
}

.mv--night .mv-copy {
  color: #fff;
}

/* =========================================================
   SPメインビジュアル（〜767px）
   ・縦幅を広げる
   ・ブランド画像を2行スクロール
   ・コピーを人物の右に
   ========================================================= */
@media (max-width: 767px) {
  .mv--index {
    --mv-height: clamp(520px, 148vw, 640px);
    --mv-woman-overhang: 0px;
    padding-bottom: 0;
  }

  .mv-shoes {
    top: 5.2rem;
    height: auto;
    max-height: none;
    /* #1 の上端が overflow で欠けないよう余白を確保 */
    padding-top: clamp(0.4rem, 1.8vw, 0.75rem);
  }

  .mv-shoes-track {
    height: auto;
    align-items: flex-start;
  }

  .mv-shoes-set {
    flex-direction: column;
    gap: clamp(0.45rem, 6vw, 1rem);
    height: auto;
    padding-top: 0;
    padding-right: 0;
    justify-content: flex-start;
  }

  .mv-shoes-row {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.45rem, 8vw, 6rem);
    padding-right: clamp(0.45rem, 5vw, 4rem);
  }

  /* 下段も4列（わずかにずらしてジグザグ） */
  .mv-shoes-row--2 {
    padding-left: clamp(0.35rem, 2vw, 0.55rem);
  }

  /* 基準サイズ（いまの大きさ）＋小さい方は約85％ */
  .mv-shoe,
  .mv-shoe--m {
    --shoe-w: clamp(70px, 21vw, 96px);
  }

  .mv-shoe--s {
    --shoe-w: clamp(60px, 18vw, 82px); /* ≈ いまの85% */
  }

  .mv-shoe--l {
    --shoe-w: clamp(74px, 22.5vw, 102px);
  }

  .mv-shoe--xl {
    --shoe-w: clamp(78px, 24vw, 108px);
  }

  .mv-shoe-stagger-1,
  .mv-shoe-stagger-2,
  .mv-shoe-stagger-3,
  .mv-shoe-stagger-4,
  .mv-shoe-stagger-5,
  .mv-shoe-stagger-6,
  .mv-shoe-stagger-7,
  .mv-shoe-stagger-8 {
    margin-top: 0;
  }

  /* 縦・横・サイズの個別調整（番号バッジ対応） */
  .mv-shoes-row--1 .mv-shoe:nth-child(1) {
    /* #1: 少し上・110%（上端が欠けないよう負マージンは使わない） */
    --shoe-w: clamp(81px, 24.75vw, 112px);
    margin-top: 0;
  }
  .mv-shoes-row--1 .mv-shoe:nth-child(2) {
    /* #2: 115%・少し左 */
    --shoe-w: clamp(69px, 20.7vw, 94px);
    margin-top: clamp(1rem, 6vw, 1.6rem);
    transform: translateX(clamp(-0.55rem, -2vw, -0.3rem));
  }
  .mv-shoes-row--1 .mv-shoe:nth-child(3) {
    /* #3: このまま */
    margin-top: clamp(0.2rem, 1.2vw, 0.5rem);
  }
  .mv-shoes-row--1 .mv-shoe:nth-child(4) {
    /* #4: 少し左下 */
    margin-top: clamp(0.35rem, 5.2vw, 1.7rem);
    transform: translateX(clamp(-0.5rem, -1.8vw, -0.25rem));
  }
  .mv-shoes-row--2 .mv-shoe:nth-child(1) {
    /* #5: 少し右 */
    margin-top: clamp(-0.3rem, 0.2vw, 1.15rem);
    transform: translateX(clamp(0.25rem, 1.6vw, 0.5rem));
  }
  .mv-shoes-row--2 .mv-shoe:nth-child(2) {
    /* #6: 少し下 */
    margin-top: clamp(0.45rem, 2.4vw, 0.85rem);
  }
  .mv-shoes-row--2 .mv-shoe:nth-child(3) {
    /* #7: このまま */
    margin-top: clamp(1.05rem, 4.8vw, 1.7rem);
  }
  .mv-shoes-row--2 .mv-shoe:nth-child(4) {
    /* #8: このまま */
    margin-top: clamp(0.35rem, 3.6vw, 0.6rem);
  }

  .mv-people {
    left: 3%;
    bottom: -3em;
    transform: none;
    z-index: 2;
    gap: 0.15rem;
  }

  .mv-woman video {
    height: clamp(170px, 50vw, 230px);
  }

  .mv-child img {
    height: clamp(105px, 31vw, 145px);
  }

  .mv-copy {
    left: auto;
    right: 4%;
    top: auto;
    bottom: 18%;
    transform: none;
    width: auto;
    max-width: 65%;
    text-align: left;
    white-space: normal;
    font-size: clamp(0.8125rem, 4vw, 0.95rem);
    letter-spacing: 0.08em;
    line-height: 1.75;
  }

  .mv-theme-test {
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

