/* ========= Tokens ========= */
:root {
  --stage-w: 720; /* 論理幅 (px) */
  --stage-h: 1280; /* 論理高 (px) */
  --cta-h: 60px;

  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.1);
  --bg-page: #fff;
  --panel: #fff;
  --ink: #1c1d1f;
  --line: #ececf1;
  --accent: #7DCCDD;
  --accent-2: #0091B1;
}

/* ====== Reset / Base ====== */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: #fff;
  overflow-x: clip; /* 右側の余白を根こそぎカット */
}
body {
  font-family: 'Yu Mincho Light','YuMincho','Yu Mincho','游明朝体','ＭＳ 明朝', 'MS Mincho','ヒラギノ明朝 ProN','Hiragino Mincho ProN',sans-serif;
  color: var(--ink);
}

/* ====== 画面フィット (中央ステージ＋左右カラム) ======
   720x1280 を高さ100svh基準で縮尺。
   中央幅 = min(100svw, 100svh * 720/1280)
*/
.fit {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns:
    1fr
    minmax(0, min(100svw, calc(100svh * (var(--stage-w) / var(--stage-h)))))
    1fr;
  align-items: start;
  justify-items: center;
  overflow: hidden;
  background: var(--bg-page);
  width: 100svw; /* レイアウト計算をビュー幅に固定 */
}

/* ====== ステージ（中央カラム） ====== */
.stage {
  grid-column: 2;
  height: 100svh;
  width: min(100svw, calc(100svh * (var(--stage-w) / var(--stage-h))));
  aspect-ratio: var(--stage-w) / var(--stage-h);
  max-width: 100svw;
  background: #fff;
  position: relative; /* CTAのabsolute配置用 */
}

/* ====== ステージ内スクロール（等倍のまま） ====== */
.stack {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y mandatory;
  scroll-padding-bottom: 0;
  padding-bottom: 0;
  scrollbar-width: none;
  overscroll-behavior-y: auto; /* 縦は親へチェーン */
}
.stack::-webkit-scrollbar {
  display: none;
}

.vblock {
  height: 100%;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
}

/* 画像は“全体表示” */
.vblock > picture,
.vblock > img {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.vblock > picture > img,
.vblock > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ====== 横スワイプ ====== */
.h-wrap {
  width: 100%;
  margin: 0 auto;
  position: relative;

  /* 縦ジェスチャ開始の“逃げ場”を確保（視覚はズレない） */
  padding-block: 1px;
  margin-block: -1px;
}
.vblock:has(.h-wrap) {
  place-items: start center;
}

.h-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 9;
}
.pdot {
  appearance: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg,
 color-mix(in srgb, var(--accent), white 12%) 0%,
 color-mix(in srgb, var(--accent-2), white 12%) 100%);
  opacity: 0.28;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pdot[aria-selected="true"] {
  opacity: 1;
  transform: translateY(-1px);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ここが重要：
   - touch-action: pan-x pan-y で縦へ抜けるのを許可
   - overscroll-behavior-y: auto で親スクロールへチェーン
*/
.h-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  scrollbar-width: none;

  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}
.h-track::-webkit-scrollbar {
  display: none;
}

.h-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.h-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* スライド上の操作も縦抜け許可 */
.h-slide,
.h-slide img {
  touch-action: pan-x pan-y;
  -webkit-user-drag: none; /* Safariの画像ドラッグ抑止 */
  user-select: none;
}

/* ナビはクリックだけ通す（スクロールは阻害しない） */
.h-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  pointer-events: none;
  z-index: 8;
  bottom: -60px;
}
.h-nav button {
  pointer-events: auto;
  width: 30px;
  height: 30px;
  border: 1px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #2b2b2b;
  background: rgb(200 154 42 / 80%);
  backdrop-filter: blur(1px);
}

/* ====== 追従CTA ====== */
.cta-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: var(--cta-h);
  padding: 8px 24px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(3px);
  border-top: 0;
  box-shadow: none;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
  max-width: 500px;
  width: 100%;
  margin: auto;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(var(--cta-h) - 16px - env(safe-area-inset-bottom));
  padding: 0 24px;
  border-radius: 10px;
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  font-family: serif;
}

/* ====== PC用：左右コンテンツ ====== */
.l-bk,
.r-bk {
  width: 100%;
  height: 100svh;
  background-color: #fff;
  overflow: auto;
  top: 0;
}
.l-bk {
  grid-column: 1;
}
.r-bk {
  grid-column: 3;
  position: relative;
}

.l-bk-box {
  padding: 50px 20px;
  display: grid;
  place-content: center;
  min-height: 100%;
  justify-items: center;
}
.r-nav {
  padding: 50px 20px;
  display: grid;
  place-content: center;
  min-height: 65%;
}
.r-nav ul {
  margin: 0;
  padding: 0;
}
.r-nav ul li {
  list-style: none;
  padding-top: 1em;
  font-size: 10px;
}
.r-nav ul li a {
  font-size: 24px;
  color: var(--accent-2) !important;
  text-decoration: none;
  font-weight: bold;
}
img.l-bk-img-2,
img.r-bk-img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: auto;
  padding: 0 24px;
}

/* タブレット以下は左右非表示（中央だけ） */
@media (max-width: 1024px) {
  .l-bk,
  .r-bk {
    display: none;
  }
}

/* ====== Scroll indicator (任意) ====== */
@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400&display=swap");

.scroll_down {
  position: absolute;
  bottom: 40%;
  right: 50%;
  animation: arrowmove 1s ease-in-out infinite;
}
.scroll_down a {
  position: absolute;
  left: -24px;
  bottom: 17px;
  color: #000;
  font-size: 14px;
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  text-decoration: none;
  text-transform: uppercase;
}
.scroll_down:before {
  content: "";
  position: absolute;
  bottom: 5px;
  right: -6px;
  width: 2px;
  height: 20px;
  background: #000;
  transform: skewX(-31deg);
}
.scroll_down:after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: 0;
  width: 2px;
  height: 85px;
  background: #000;
}
@keyframes arrowmove {
  0% {
    bottom: 35%;
  }
  50% {
    bottom: 40%;
  }
  100% {
    bottom: 35%;
  }
}


/* iPhone: ダブルタップズーム抑制（横スワイプの矢印ボタン） */
.h-prev, .h-next, .pdot {
  touch-action: manipulation;
}