@charset "UTF-8";

/* ===== CSS Variables ===== */
:root {
  --bg: #fff4f5;
  --primary: #e75b18;
  --dot-active: #ff5789;
  --dot-border: #ff5789;
  --scrollbar-width: 15px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: "Noto Sans JP", sans-serif;
}

/* モバイル: スクロール無効 */
@media (max-width: 767px) {
  html, body {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* デスクトップ: スクロール有効 */
@media (min-width: 768px) {
  html, body {
    overflow: auto;
  }
}

/* ===== Outer wrapper ===== */
.adlp-outer {
  position: relative;
}

.adlp-wrapper {
  width: 100%;
  background: var(--bg);
}

/* ===== Desktop side panels ===== */
.adlp-bg {
  position: fixed;
  width: calc((100vw - var(--scrollbar-width) - 450px) / 2);
  height: 100vh;
  top: 0;
  z-index: 0;
  background: var(--bg);
}

.adlp-bg.--l { left: 0; }
.adlp-bg.--r { right: 0; }

/* 中央コンテンツの影 */
.adlp-bg.--c {
  left: calc(50% - var(--scrollbar-width) / 2);
  transform: translateX(-50%);
  box-shadow: 0px 4px 30px 0px rgba(0,0,0,0.25);
  width: 450px;
  background: var(--bg);
}

/* 左パネル：キャッチ + CTA */
.adlp-bg.--l {
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  width: min(280px, 90%);
  gap: 20px;
}

.side-panel__logo {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.side-panel__catch {
  margin: 0;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: #f0f0f0;
  white-space: pre-line;
}

.side-panel__btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: clamp(12px, 1.1vw, 15px);
  text-decoration: none;
  border-radius: 50px;
  transition: filter 0.25s;
  line-height: 1.4;
}

.side-panel__btn:hover {
  filter: brightness(1.15);
}

.side-panel__note {
  margin: 0;
  font-size: clamp(10px, 0.9vw, 12px);
  color: #aaaaaa;
}

/* 右パネル */
.adlp-bg.--r {
  display: flex;
  align-items: center;
  justify-content: center;
}

.right-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  width: min(280px, 90%);
  gap: 16px;
}

.right-panel__avatar {
  width: min(320px, 92%);
  height: auto;
  display: block;
  border-radius: 12px;
}

.right-panel__text {
  margin: 0;
  font-size: clamp(14px, 1.3vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: #f0f0f0;
}

.right-panel__sub {
  margin: 0;
  font-size: clamp(10px, 0.9vw, 13px);
  color: #aaaaaa;
}

@media (max-width: 1080px) {
  .right-panel__text,
  .right-panel__sub { display: none; }
}

/* モバイルではパネル非表示 */
.is-mobile .adlp-bg { display: none; }

/* 幅が狭いデスクトップではサイドパネルのテキスト隠す */
@media (max-width: 1080px) {
  .side-panel__catch,
  .side-panel__btn,
  .side-panel__note { display: none; }
  .side-panel__logo { font-size: 14px; }
}

/* ===== Swipe container ===== */
main.--swipe-container {
  position: relative;
  display: block;
  width: 100%;
  z-index: 1;
  overflow: hidden;
}

@media (min-width: 768px) {
  main.--swipe-container {
    max-width: 450px;
    margin: 0 auto;
    padding-bottom: 102px;
  }
}

/* スワイプ内部ラッパー */
.--swipe-inner {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* デスクトップでは縦積み */
@media (min-width: 768px) {
  .--swipe-inner {
    flex-direction: column;
    transform: none !important;
  }
}

/* ===== Sections ===== */
.js-section {
  flex: 0 0 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

@media (max-width: 767px) {
  .js-section {
    height: 100vh;
    height: 100dvh;
  }
}

/* 画像未生成時のプレースホルダー */
.content__img[src=""] ,
.content__img:not([src]) {
  min-height: 400px;
  background: #1a1a1a;
}
.js-section {
  position: relative;
}
.js-section .section__inner::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 14px;
  pointer-events: none;
}

/* セクション内部 */
.section__inner {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.content__img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ===== HTML sections ===== */
.js-section--html {
  align-items: stretch;
}

@media (max-width: 767px) {
  .js-section--html {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.section__inner--html {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 0;
}

@media (max-width: 767px) {
  .section__inner--html {
    height: 100dvh;
    overflow-y: auto;
  }
}

@media (min-width: 768px) {
  .section__inner--html {
    height: auto;
    overflow-y: visible;
  }
}

/* ===== Floating CTA ===== */
.adlp-floating {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

@media (min-width: 768px) {
  .adlp-floating {
    max-width: 450px;
    left: 50%;
    transform: translateX(calc(-50% - var(--scrollbar-width) / 2));
    right: auto;
    width: 450px;
  }
}

.adlp-floating__bg {
  width: 100%;
  display: block;
}

.adlp-floating__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4% 4% 4% 30%;
}

.btn-floating {
  display: block;
  width: 100%;
  transition: filter 0.3s;
}

.btn-floating:hover {
  filter: brightness(1.1);
}

.btn-floating img {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA画像がない場合のフォールバックボタン */
.btn-floating-fallback {
  display: block;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 50px;
  text-decoration: none;
  width: 88%;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.3s;
}

.btn-floating-fallback:hover {
  filter: brightness(1.1);
}

/* CTAがない場合のフローティングなし */
.adlp-floating--text-only {
  background: rgba(0,0,0,0.75);
  padding: 8px 16px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

/* ===== Dot navigation ===== */
.swipe-nav {
  position: fixed;
  bottom: min(calc(40 / 1080 * 100vw), 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

/* フローティングがある場合 */
.has-floating .swipe-nav {
  bottom: calc(80px + env(safe-area-inset-bottom));
}

.swipe-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--dot-border);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  outline: none;
}

.swipe-nav-dot.active {
  background: var(--dot-active);
  border-color: var(--dot-active);
}

/* デスクトップでは非表示 */
.is-desktop .swipe-nav { display: none; }

/* 最初のセクションでは非表示 */
.is-sec01 .swipe-nav { display: none; }

@media (max-width: 767px) {
  .swipe-nav {
    bottom: calc(40 / 750 * 100vw);
  }
  .swipe-nav-dot {
    width: calc(16 / 750 * 100vw);
    height: calc(16 / 750 * 100vw);
  }
  .has-floating .swipe-nav {
    bottom: calc(120 / 750 * 100vw);
  }
}

/* ===== Swipe guide overlay ===== */
.adlp-swipe-guide {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(167, 84, 109, 0.85);
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.adlp-swipe-guide.--hidden {
  opacity: 0;
  visibility: hidden;
}

.adlp-swipe-guide.--initial-hidden {
  opacity: 0;
  visibility: hidden;
}

.adlp-swipe-guide__text {
  color: #fff;
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: clamp(24px, 9.87vw, 48px);
  font-style: italic;
  font-weight: 400;
  margin-bottom: 40px;
  letter-spacing: 0.1em;
}

.adlp-swipe-guide__hand {
  width: 48px;
  height: 64px;
  background: url(../img/icon_swipe.svg) no-repeat center/contain;
  animation: handSwipe 1.75s ease-in-out infinite;
}

/* アイコンがない場合のフォールバック（CSS矢印） */
.adlp-swipe-guide__hand--fallback {
  width: 60px;
  height: 60px;
  border: 3px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: handSwipe 1.75s ease-in-out infinite;
}

.adlp-swipe-guide__hand--fallback::after {
  content: "→";
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

@keyframes handSwipe {
  0%   { transform: translateX(0);    opacity: 1; }
  30%  { transform: translateX(0);    opacity: 1; }
  60%  { transform: translateX(-50px); opacity: 0; }
  61%  { transform: translateX(30px);  opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}

/* ===== Scroll mode (mobile vertical scroll) ===== */
@media (max-width: 767px) {
  html[data-scroll-mode="scroll"],
  html[data-scroll-mode="scroll"] body {
    overflow: auto;
    overscroll-behavior: initial;
  }

  html[data-scroll-mode="scroll"] main.--swipe-container {
    overflow: visible;
  }

  html[data-scroll-mode="scroll"] .--swipe-inner {
    flex-direction: column;
    transform: none !important;
  }

  html[data-scroll-mode="scroll"] .js-section {
    height: auto;
  }

  html[data-scroll-mode="scroll"] .adlp-swipe-guide { display: none; }
  html[data-scroll-mode="scroll"] .swipe-nav { display: none; }
}
