:root{
  --bg: #18372e;
  --bg2: #22453b;
  --bg3: #102720;
  --ink: #111;
  --chalk: rgba(245,247,244,.92);
  --chalkSoft: rgba(245,247,244,.55);
  --line: rgba(255,255,255,.14);
  --shadow: 0 18px 48px rgba(0,0,0,.24);
  --r: 18px;
  --gap: 14px;
  --safeX: max(8px, env(safe-area-inset-left));
  --startPad: 24px; /* 1枚目を少し右から開始 */

  /* 画像は「高さ基準」で表示（横長でも途中で切れない） */
  --imgH: min(86vh, 900px);
  --arrowW: 80px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
html{
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.06), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(255,255,255,.05), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(255,255,255,.04), transparent 34%),
    linear-gradient(180deg, var(--bg2), var(--bg) 38%, var(--bg3));
}
body{
  position: relative;
  margin:0;
  overflow-x: hidden;
  background: transparent;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
}

body::before,
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* 黒板のムラ・粉感 */
body::before{
  opacity: .5;
  background:
    radial-gradient(circle at 14% 28%, rgba(255,255,255,.08), transparent 18%),
    radial-gradient(circle at 74% 16%, rgba(255,255,255,.06), transparent 16%),
    radial-gradient(circle at 28% 82%, rgba(255,255,255,.05), transparent 20%),
    radial-gradient(circle at 86% 76%, rgba(255,255,255,.06), transparent 22%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.018) 0px,
      rgba(255,255,255,.018) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0,0,0,.03) 0px,
      rgba(0,0,0,.03) 2px,
      transparent 2px,
      transparent 6px
    );
  mix-blend-mode: screen;
}

/* 周辺の落ち影 */
body::after{
  background:
    radial-gradient(circle at center, transparent 52%, rgba(0,0,0,.22) 100%);
}

/* フルブリード（画面いっぱい） */
.flow{
  position: relative;
  z-index: 1;
  width: 100vw;
  min-height: 100%;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 22px 0;
}

.scroller{
  display:flex;
  align-items:center;
  overflow-x:auto;
  gap: var(--gap);
  padding: 10px var(--safeX) 18px;
  padding-left: calc(var(--safeX) + var(--startPad));
  scroll-snap-type: x mandatory;
  scroll-padding-left: calc(var(--safeX) + var(--startPad));
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar{ display:none; }

/* 1枚 = 1画像（02が2回出ない） */
.slide{
  flex: 0 0 auto;
  scroll-snap-align: center;
}

/* 画像フレーム */
.frame{
  border-radius: var(--r);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  background:#fff;

  height: var(--imgH);
  width: auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* 重要：切らない（縦を揃えて横は比率で伸びる） */
.frame img{
  display:block;
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* 画像間の矢印 */
.sep{
  flex: 0 0 var(--arrowW);
  display:grid;
  place-items:center;
  font-size: 52px;
  color: var(--chalk);
  text-shadow: 0 0 10px rgba(255,255,255,.08);
  user-select:none;
}

.note{
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.note-next-hint{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: clamp(320px, 30vw, 460px);
  padding-left: 4px;
  animation: noteHintNudge 1.3s ease-in-out infinite;
}

.note-next-arrow{
  display: inline-block;
  align-self: center;
  color: var(--chalk);
  font-size: clamp(26px, 2vw, 34px);
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0 1px rgba(255,255,255,.22);
  flex: 0 0 auto;
}

.note-next-text{
  margin: 0;
  color: var(--chalk);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.8;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255,255,255,.18);
}

@keyframes noteHintNudge {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(8px);
  }
}

.addon-gap{
  flex: 0 0 56px;
}

.addon-badge{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 54px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--chalk);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
  user-select: none;
}

.note-card{
  width: clamp(320px, 30vw, 460px);
  min-height: 220px;
  max-height: var(--imgH);
  padding: 28px 30px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: calc(var(--r) + 2px);
  background:
    linear-gradient(180deg, rgba(39,73,62,.96), rgba(23,52,44,.98));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.note-card::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.07), transparent 24%),
    radial-gradient(circle at 82% 76%, rgba(255,255,255,.05), transparent 28%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 1px,
      transparent 1px,
      transparent 5px
    );
  pointer-events: none;
}

.note-card p{
  position: relative;
  margin: 0;
  color: var(--chalk);
  font-size: clamp(20px, 1.55vw, 28px);
  line-height: 1.85;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 0 1px rgba(255,255,255,.22);
}

.extra-slide{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.slide-caption{
  margin: 0;
  width: 100%;
  color: var(--chalk);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 0 1px rgba(255,255,255,.18);
}

@media (max-width: 900px){
  .slide,
  .note{
    width: min(calc(100vw - (var(--safeX) * 2) - var(--startPad) - 12px), 560px);
  }

  .frame{
    width: 100%;
    height: auto;
    max-height: min(74dvh, 820px);
  }

  .frame img{
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: min(74dvh, 820px);
    object-fit: contain;
  }

  .sep{
    flex-basis: 48px;
    font-size: 40px;
  }

  .addon-gap{
    flex-basis: 34px;
  }

  .addon-badge{
    min-width: min(calc(100vw - 48px), 420px);
    height: auto;
    padding: 14px 18px;
    font-size: 16px;
    line-height: 1.65;
    text-align: center;
    white-space: normal;
    letter-spacing: .02em;
  }

  .slide-caption{
    font-size: clamp(13px, 3.6vw, 17px);
    line-height: 1.75;
    padding: 0 8px 2px;
  }

  .note-card{
    width: 100%;
    min-height: 180px;
    padding: 22px 20px;
  }

  .note-card p{
    font-size: clamp(16px, 4.2vw, 21px);
    line-height: 1.75;
  }

  .note-next-hint{
    width: 100%;
    padding-left: 0;
    gap: 6px;
  }

  .note-next-arrow{
    font-size: clamp(22px, 6vw, 28px);
  }

  .note-next-text{
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.7;
  }
}

.scroller{
  cursor: grab;
  user-select: none;
}

.scroller.dragging{
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.scroller.dragging img{
  pointer-events: none;
}


.back-button{
  position: fixed;
  top: max(2px, env(safe-area-inset-top));
  left: max(2px, env(safe-area-inset-left));
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(11,40,33,.90), rgba(8,28,23,.93));
  color: var(--chalk);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}

.back-button:hover{
  transform: translateY(-1px);
}

.back-button:active{
  transform: translateY(0);
}

.back-button:focus-visible{
  outline: 2px solid rgba(255,255,255,.42);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .flow {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 24px;
    box-sizing: border-box;
  }

  /* ここは中央寄せしない。横スライドの開始位置を左に固定 */
  .scroller {
    width: 100%;
    justify-content: flex-start !important;
  }

  /* 1枚ごとのスライドは画面幅ぶん確保 */
  .slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* 白枠をモバイルで大きく */
  .frame {
    width: 94vw !important;
    max-width: 94vw !important;
    margin: 0 auto !important;
  }

  .frame img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  /* 全体の塊を少し上に寄せる */
  .flow {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 72px;
    box-sizing: border-box;
    position: relative;
    transform: translateY(-24px);
  }

  /* 横スライドの開始位置は左固定 */
  .scroller {
    width: 100%;
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .scroller::-webkit-scrollbar {
    display: none;
  }

  .slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .frame {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 auto !important;
  }

  .frame img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* モバイルでだけ、右スワイプ誘導を下に表示 */
  .flow::after {
    content: "→ 右にスライド";
    position: fixed;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 10px 14px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    animation: rlSwipeHint 1.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 30;
  }

  @keyframes rlSwipeHint {
    0%, 100% {
      transform: translateX(-50%) translateX(0);
      opacity: 0.6;
    }
    50% {
      transform: translateX(-50%) translateX(8px);
      opacity: 1;
    }
  }
}



@media (max-width: 768px) {
  .frame {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 95vw !important;
    max-width: 95vw !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    margin: 0 auto !important;
  }

  .frame img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: inherit !important;
    cursor: zoom-in;
    -webkit-user-select: none;
    user-select: none;
  }

  .slide {
    background: transparent !important;
    box-shadow: none !important;
  }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.94);
  overflow: hidden;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  object-fit: contain !important;
}

@media (max-width: 768px) {
  .image-lightbox {
    padding: 12px !important;
    background: rgba(0, 0, 0, 0.96) !important;
    overflow: hidden !important;
  }

  .image-lightbox img {
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    object-fit: contain !important;
  }
}



@media (min-width: 769px) {
  .flow{
    padding-top: 40px;
  }
}
.feature-badges{
  position: fixed;
  left: 50%;
  top: max(4px, env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 31;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(calc(100vw - 120px), 860px);
  pointer-events: none;
}

.feature-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.16);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,.88);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
}


@media (min-width: 769px) {
  .feature-badge{
    border: 1px solid rgba(196,255,231,.62);
    background: linear-gradient(180deg, rgba(18,53,45,.52), rgba(8,27,22,.42));
    box-shadow:
      0 10px 28px rgba(0,0,0,.18),
      inset 0 0 0 1px rgba(255,255,255,.05),
      0 0 18px rgba(120,255,214,.12);
    color: rgba(255,255,255,.96);
  }
}

@media (max-width: 768px) {
  .feature-badges{
    top: 72px;
    width: min(calc(100vw - 24px), 390px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .feature-badge{
    min-height: 40px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
  }
}

.live-ui-cta{
  position: fixed;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 31;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(180deg, rgba(19,52,43,.92), rgba(11,35,29,.96));
  box-shadow: 0 12px 32px rgba(0,0,0,.26);
  backdrop-filter: blur(6px);
  color: rgba(245,247,244,.96);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.live-ui-cta:hover{
  transform: translateX(-50%) translateY(-1px);
  border-color: rgba(255,255,255,.34);
  box-shadow: 0 16px 36px rgba(0,0,0,.30);
}

.live-ui-cta:active{
  transform: translateX(-50%);
}

.live-ui-cta:focus-visible{
  outline: 2px solid rgba(255,255,255,.42);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .live-ui-cta{
    bottom: 82px;
    width: min(calc(100vw - 32px), 360px);
    padding: 0 16px;
    font-size: 13px;
  }
}

@media (min-width: 769px) {
  .live-ui-cta{
    bottom: max(0px, env(safe-area-inset-bottom));
  }
}


/* ===== anywhere horizontal drag fix ===== */
html,
body {
  overscroll-behavior-x: none;
}

body,
.flow,
.scroller,
.slide,
.note,
.note-card {
  -webkit-user-select: none;
  user-select: none;
}

body,
.flow,
.scroller {
  cursor: grab;
}

body.is-dragging,
body.is-dragging .flow,
body.is-dragging .scroller,
body.is-dragging .slide,
body.is-dragging .note,
body.is-dragging .note-card {
  cursor: grabbing !important;
}

.scroller {
  min-height: 100svh;
}

@media (pointer: coarse) {
  html,
  body,
  .flow,
  .scroller {
    touch-action: none;
  }
}


/* ===== mobile first-swipe responsiveness fix ===== */
@media (pointer: coarse) {
  html,
  body,
  .flow,
  .scroller {
    touch-action: pan-x !important;
  }
}
