/* 390px ベースを、LP幅（最大600px・画面いっぱいまで）に比例スケール */
:root {
  --lp-max: 600px;
  /* 実効LP幅（body 全幅想定。100vw の横スクロール対策は html overflow-x: clip） */
  --lp-inner: min(100vw, var(--lp-max));
  --scale: calc(var(--lp-inner) / 390px);
  --space-8: calc(8px * var(--scale));
  --space-12: calc(12px * var(--scale));
  --space-16: calc(16px * var(--scale));
  --space-24: calc(24px * var(--scale));
  --space-32: calc(32px * var(--scale));
  --color-pink-deep: #4f0706;
  --color-pink-hot: #ff4d8b;
  --color-blue-header: #6496e4;
  --color-cream: #fffdd2;
  --color-border-red: #e02508;
  --font-ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: #ffdfea;
  font-family: var(--font-ui);
  color: var(--color-pink-deep);
  position: relative;
  min-height: 100vh;
}

.lp {
  width: 100%;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  background: #ffcbdf;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
}

/* 桜：body 全体の背後（固定・ビューポート） */
.sakura-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sakura-petal {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  opacity: 0.2;
  pointer-events: none;
  will-change: transform;
  animation-name: sakura-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform-origin: 50% 50%;
}

@keyframes sakura-fall {
  0% {
    transform: translate3d(0, var(--y0, -80px), 0) rotate(var(--r0, 0deg));
  }

  100% {
    transform: translate3d(var(--drift, 0px), var(--sakura-fall, 4000px), 0) rotate(var(--r1, 360deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sakura-bg {
    display: none;
  }
}

/* ----- Hero（Figma section_title: タイトル画像の下に nav を並べ、画像上に重ねない） ----- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  line-height: 0;
  background: #cbcff3;
}

.hero__bg {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  flex-shrink: 0;
}

.hero__nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  justify-content: center;
  align-items: center;
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  min-height: calc(80px * var(--scale));
  padding: calc(12px * var(--scale)) var(--space-16);
  margin: 0 0 16px;
  line-height: normal;
}

.btn-nav {
  flex: 1;
  max-width: calc(114px * var(--scale));
  display: block;
  line-height: 0;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-nav img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.btn-nav:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-nav:active {
  transform: translateY(0);
}

/* ----- Wave（Figma: 各セクション下端から約9px上に重なる 390×18.096） ----- */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  position: relative;
  z-index: 2;
  /* 上セクションに約9px食い込み、下セクションとも重ねて境目に乗せる */
  margin-top: calc(-9px * var(--scale));
  margin-bottom: calc(-9px * var(--scale));
  pointer-events: none;
}

.wave-divider img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.lp .wave-divider {
  z-index: 2;
}

/* ----- Section: Overview ----- */
.section--overview {
  background: linear-gradient(180deg, #ffcce7 0%, #ffcbdf 100%);
  padding: var(--space-24) var(--space-16) var(--space-32);
}

.section--overview .intro {
  text-align: center;
  margin-bottom: var(--space-24);
}

.title-graphic {
  width: 100%;
  margin: 0 auto var(--space-12);
}

.title-graphic img {
  width: 100%;
  height: auto;
  display: block;
}

.headline {
  margin: 0;
  font-size: calc(21px * var(--scale));
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  /* ストロークを先に描き、塗りで内側を覆う → 縁が外側に見える（幅に応じて薄く） */
  -webkit-text-stroke: calc(10px * var(--lp-inner) / var(--lp-max)) #ff4d8b;
  paint-order: stroke fill;
  text-shadow: 0 calc(2px * var(--scale) * 0.35) 0 rgba(79, 7, 6, 0.18);
}

.headline .accent {
  color: #FFFDD2;
  font-size: calc(21px * var(--scale) * 1.02);
}

.note-small {
  margin: var(--space-12) 0 0;
  font-size: calc(12px * var(--scale));
  font-weight: 500;
  color: var(--color-pink-deep);
}

/* Table */
.points-table-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid var(--color-pink-deep);
  background: var(--color-border-red);
  margin-bottom: var(--space-24);
}

.points-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  width: 100%;
}

.points-table__head {
  display: contents;
}

.points-table__head-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  font-size: calc(16px * var(--scale) * 0.92);
  font-weight: 700;
  color: #fff;
}

.points-table__head-cell--buy {
  background: var(--color-blue-header);
}

.points-table__head-cell--pts {
  background: var(--color-pink-hot);
  color: #fffcc2;
}

.points-table__row {
  display: contents;
}

.points-table__amount {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  font-size: calc(13px * var(--scale) * 0.95);
  font-weight: 700;
  color: #202020;
}

.points-table__detail {
  background: var(--color-cream);
  padding: 8px max(6px, 10px) 8px max(6px, calc(22px * var(--scale) * 0.9));
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.points-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: calc(13px * var(--scale) * 0.95);
  font-weight: 700;
  color: #0f0f10;
  flex-wrap: wrap;
  min-width: 0;
}

.points-line__val--total {
  color: var(--color-pink-hot);
}

.point-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.point-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.points-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.footnote-block {
  font-size: calc(12px * var(--scale) * 0.98);
  font-weight: 500;
  line-height: 1.55;
  color: var(--color-pink-deep);
  overflow-wrap: anywhere;
}

.footnote-block p {
  margin: 0 0 0.4em;
}

.footnote-block a {
  color: inherit;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.section--overview .btn-more + .footnote-block {
  margin-top: 16px;
}

/* ----- Featured ----- */
.section--featured {
  background: linear-gradient(1deg, rgb(181, 205, 246) 0.13%, rgb(255, 203, 231) 37%);
  padding: var(--space-32) var(--space-16);
}

.section--featured .title-graphic--narrow {
  max-width: calc(238px * var(--scale));
  margin: 0 auto 16px;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16) var(--space-8);
  width: 100%;
  max-width: min(100%, calc(355px * var(--scale)));
  margin: 0 auto var(--space-24);
}

.comic-grid .comic-link {
  display: block;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.comic-grid .comic-link:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.comic-grid .comic-link:focus-visible {
  outline: 2px solid var(--color-pink-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

.comic-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 111 / 160;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.btn-more {
  display: flex;
  justify-content: center;
  width: 100%;
  line-height: 0;
}

.btn-more a {
  display: block;
  width: 100%;
  max-width: 520px;
  text-decoration: none;
  line-height: 0;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-more img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.btn-more a:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* ----- Detail ----- */
.section--detail {
  background: #ffcbdf;
  padding: var(--space-24) var(--space-16) var(--space-32);
}

.detail-inner {
  width: 100%;
  max-width: calc(358px * var(--scale));
  margin: 0 auto;
}

.detail-block {
  margin-bottom: var(--space-16);
  color: var(--color-pink-deep);
}

.detail-block h2 {
  margin: 0 0 8px;
  font-size: calc(15px * var(--scale) * 0.98);
  font-weight: 700;
}

.detail-block p,
.detail-block li {
  margin: 0;
  font-size: calc(12px * var(--scale) * 0.98);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.detail-block ul {
  margin: 0;
  padding-left: 1.2em;
}

.detail-block a {
  color: inherit;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.detail-meta {
  width: 100%;
  max-width: calc(298px * var(--scale));
}

.u-underline {
  text-decoration: underline;
}

/* ----- Scroll reveal（ビューポート進入でフェードイン） ----- */
.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.hero__nav.scroll-reveal {
  transition-delay: 0.14s;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__nav.scroll-reveal {
    transition-delay: 0s;
  }
}

/* ----- レスポンシブ補正 ----- */
@media (max-width: 380px) {
  .comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    gap: var(--space-12) var(--space-8);
  }
}

@media (max-width: 340px) {
  .points-table__head-cell,
  .points-table__amount,
  .points-line {
    font-size: max(11px, calc(11px * var(--scale)));
  }

  .points-table__amount,
  .points-table__head-cell {
    min-height: 60px;
  }

  .points-table__detail {
    min-height: 60px;
  }
}

.lp img {
  max-width: 100%;
  height: auto;
}

.point-icon img {
  max-width: none;
}
