/* CAMPAIGN・FLOW（トップ SP 用に Figma の設計データから作った部品を共通化。PC 版と動きは末尾で追加） */
/* campaign（Figma node 2938:18177 / 375×751） */
.s-campaign {
  width: 375px;
  height: 751px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 56px;
  padding: 64px 0 64px 20px;
  background: #faf5ee;
  color: #333;
}
.s-campaign p,
.s-campaign h2,
.s-campaign ul {
  margin: 0;
  padding: 0;
}
.s-campaign p,
.s-campaign h2,
.s-campaign__btn span {
  text-box: trim-both cap alphabetic;
}

.s-campaign__contents {
  width: 355px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.s-campaign__heading {
  width: 335px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.s-campaign__display {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.s-campaign__title {
  font-family: "Melodrama", serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  text-transform: uppercase;
  color: #1e429b;
}
.s-campaign__subtitle {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.s-campaign__lead {
  font-size: 13px;
  line-height: 2;
}

/* カード列：横スクロール（JS なし） */
.s-campaign__cards {
  list-style: none;
  width: 355px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.s-campaign__cards::-webkit-scrollbar {
  display: none;
}
.s-campaign__card {
  flex-shrink: 0;
  width: 240px;
  height: 394px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  /* Figma の線は inside stroke のため、border 1px 分を padding から引く */
  padding: 11px 11px 31px;
  border: 1px solid #7089c8;
  border-radius: 8px;
}
.s-campaign__card--tall {
  gap: 26px;
}
.s-campaign__card-contents {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.s-campaign__card--pair .s-campaign__card-contents {
  gap: 4px;
}
.s-campaign__card-head {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.s-campaign__card--pair .s-campaign__card-head {
  gap: 12px;
}
.s-campaign__pict {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 7px;
  border-bottom: 1px solid #d8dff0;
}
.s-campaign__pict img {
  width: 57px;
  height: 57px;
}
.s-campaign__card-title {
  width: 93px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: #1e429b;
}
.s-campaign__card-name {
  flex-shrink: 0;
  font-size: 25px;
  white-space: nowrap;
}
.s-campaign__card-sub {
  width: 100%;
  font-size: 11px;
}
.s-campaign__card-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.s-campaign__card-body {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

/* オファー（青い箱）：数字の組版は Figma の位置を absolute で再現 */
.s-campaign__offer {
  position: relative;
  flex-shrink: 0;
  width: 216px;
  height: 131px;
  background: #1e429b;
  border-radius: 8px;
  color: #fff;
}
.s-campaign__offer--kids,
.s-campaign__offer--referral {
  height: 179px;
}
.s-campaign__offer-text {
  position: absolute;
  white-space: nowrap;
}
.s-campaign__offer-text p,
.s-campaign__offer-text img {
  position: absolute;
}
.s-campaign__offer--student .s-campaign__offer-text {
  left: 56px;
  top: 14px;
  width: 125px;
  height: 102px;
}
.s-campaign__offer--pair .s-campaign__offer-text {
  left: 56px;
  top: 19px;
  width: 125px;
  height: 86px;
}
.s-campaign__o-plan {
  left: 52px;
  top: 0;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}
.s-campaign__o-max {
  left: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.s-campaign__o-num,
.s-campaign__o-pct,
.s-campaign__o-off {
  font-family: "Arapey", serif;
  font-weight: 400;
  line-height: 1.5;
}
.s-campaign__o-num {
  font-size: 79.92px;
}
.s-campaign__o-pct {
  left: 90px;
  font-size: 44.4px;
}
.s-campaign__o-off {
  left: 17px;
  font-size: 44.4px;
}
/* 学割（「全プラン」のぶん下がる） */
.s-campaign__offer--student .s-campaign__o-max { top: 39px; }
.s-campaign__offer--student .s-campaign__o-num { left: 15px; top: 17px; }
.s-campaign__offer--student .s-campaign__o-pct { top: 36px; }
.s-campaign__offer--student .s-campaign__o-off { top: 74px; }
/* ペア割・リベンジ割 */
.s-campaign__offer--pair .s-campaign__o-max { top: 23px; }
.s-campaign__offer--pair .s-campaign__o-num { left: 14.63px; top: 0; }
.s-campaign__offer--pair .s-campaign__o-pct { top: 20px; }
.s-campaign__offer--pair .s-campaign__o-off { top: 58px; }

/* キッズ割 */
.s-campaign__offer--kids .s-campaign__offer-text {
  left: 24px;
  top: 20px;
  width: 167.5px;
  height: 128px;
}
.s-campaign__k-lead {
  left: 84px;
  top: 0;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}
.s-campaign__k-line {
  left: -0.5px;
  top: 47.5px;
  width: 168.5px;
  height: 5.78145px;
}
.s-campaign__k-num {
  left: 27px;
  top: 67px;
  font-family: "Arapey", serif;
  font-size: 96px;
  line-height: 1.5;
}
.s-campaign__k-unit {
  left: 75px;
  top: 76px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.s-campaign__k-ok {
  left: 74px;
  top: 100px;
  font-family: "Arapey", serif;
  font-size: 44px;
  line-height: 1.5;
}

/* 紹介割 */
.s-campaign__offer--referral .s-campaign__offer-text {
  left: 18px;
  top: 20px;
  width: 176px;
  height: 143px;
}
.s-campaign__r-lead {
  left: 90px;
  top: 0;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}
.s-campaign__r-line {
  left: 5.5px;
  top: 47.5px;
  width: 168.5px;
  height: 5.78145px;
}
.s-campaign__r-num {
  left: 0;
  top: 56px;
  font-family: "Arapey", serif;
  font-size: 96px;
  line-height: 1.5;
}
.s-campaign__r-unit,
.s-campaign__r-gift {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.s-campaign__r-unit {
  left: 45px;
  top: 71px;
}
.s-campaign__r-gift {
  left: 44px;
  top: 97px;
}
.s-campaign__r-present {
  left: 48px;
  top: 131px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* 詳しく見るボタン（アコーディオン想定） */
.s-campaign__btn {
  flex-shrink: 0;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 44px;
  margin: 0;
  padding: 7px 15px 7px 68px;
  background: none;
  border: 1px solid #7089c8;
  border-radius: 15px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  cursor: pointer;
}
.s-campaign__btn span {
  flex-shrink: 0;
  white-space: nowrap;
}
.s-campaign__btn img {
  flex-shrink: 0;
  width: 15.2833px;
  height: 15.2833px;
}

/* スクロールインジケーター */
.s-campaign__indicator {
  position: relative;
  flex-shrink: 0;
  width: 335px;
  height: 0;
}
.s-campaign__indicator img {
  position: absolute;
  top: -1px;
  left: 0;
  width: 335px;
  height: 1px;
}

/* flow（Figma node 2938:18176 / 375×1042） */
.s-flow {
  width: 375px;
  height: 1042px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 56px;
  padding: 64px 0 0 20px;
  color: #333;
}
.s-flow p,
.s-flow h2,
.s-flow ol {
  margin: 0;
  padding: 0;
}
.s-flow__title,
.s-flow__subtitle,
.s-flow__lead,
.s-flow__tab span,
.s-flow__num,
.s-flow__name,
.s-flow__body,
.s-flow__info > p,
.s-flow__note p {
  text-box: trim-both cap alphabetic;
}
.s-flow strong {
  font-weight: 700;
  color: #1e429b;
}

.s-flow__head {
  width: 335px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.s-flow__heading {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.s-flow__display {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.s-flow__title {
  font-family: "Melodrama", serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  text-transform: uppercase;
  color: #1e429b;
}
.s-flow__subtitle {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.s-flow__lead {
  font-size: 13px;
  line-height: 2;
}

/* タブ */
.s-flow__tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.s-flow__tab {
  flex-shrink: 0;
  margin: 0;
  padding: 14px 20px;
  background: #b3b3b3;
  border: 0;
  border-radius: 22px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
}
.s-flow__tab span {
  display: block;
}
.s-flow__tab.is-active {
  background: #1e429b;
}

/* カード列：横スクロール（JS なし） */
.s-flow__cards-wrap {
  position: relative;
  width: 355px;
}
.s-flow__cards {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 56px;
  overflow-x: auto;
  scrollbar-width: none;
}
.s-flow__cards::-webkit-scrollbar {
  display: none;
}
.s-flow__card {
  flex-shrink: 0;
  width: 235px;
  display: flex;
  flex-direction: column;
  gap: 29px;
}
/* 写真枠（角丸マスク） */
.s-flow__img {
  position: relative;
  width: 235px;
  height: 240px;
  overflow: hidden;
  -webkit-mask: url(../img/flow-img-mask.svg) no-repeat 0 0 / 235px 240px;
  mask: url(../img/flow-img-mask.svg) no-repeat 0 0 / 235px 240px;
}
.s-flow__img img {
  position: absolute;
  max-width: none;
  object-fit: cover;
}
.s-flow__img-01 { left: -22px;  top: 0;     width: 368px; height: 245px; }
.s-flow__img-02 { left: -168px; top: 0;     width: 480px; height: 240px; }
.s-flow__img-03 { left: -65px;  top: 0;     width: 371px; height: 247px; }
.s-flow__img-04 { left: -51px;  top: -16px; width: 361px; height: 256px; }

.s-flow__text {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.s-flow__card-title {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.s-flow__card-title--top {
  align-items: flex-start;
}
.s-flow__num {
  flex-shrink: 0;
  font-family: "Aboreto", serif;
  font-size: 32px;
  line-height: 2;
  white-space: nowrap;
  color: #1e429b;
}
.s-flow__name {
  flex: 1 0 0;
  min-width: 1px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
}
.s-flow__body {
  width: 100%;
  font-size: 13px;
  line-height: 2;
}
.s-flow__info {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding: 19px 15px;
  border: 1px solid #d9d8d8;
  font-size: 13px;
  line-height: 2;
}
.s-flow__info > p {
  white-space: nowrap;
}
.s-flow__info--list .s-flow__info-text {
  flex: 1 0 0;
  min-width: 1px;
  white-space: normal;
}
.s-flow__note {
  width: 100%;
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
  color: #c74f7b;
}
.s-flow__note-mark {
  flex-shrink: 0;
  font-size: 11px;
}
.s-flow__note-text {
  flex: 1 0 0;
  min-width: 1px;
  font-size: 10px;
}

/* スクロールインジケーター（Figma ではカード列の y=590 に重ねて配置） */
.s-flow__indicator {
  position: absolute;
  top: 590px;
  left: 0;
  width: 335px;
  height: 0;
}
.s-flow__indicator img {
  position: absolute;
  top: -1px;
  left: 0;
  width: 335px;
  height: 1px;
}

/* ===== 共通部品化の補正（トップ SP 用は 375px・高さ固定だったため） ===== */
.s-campaign, .s-flow { width: auto; height: auto; }
.s-flow { padding-bottom: 64px; }
.s-campaign__contents { width: 100%; }
.s-campaign__track-wrap { position: relative; }
.s-campaign__cards, .s-flow__cards { width: auto; margin: 0; padding: 0; scroll-snap-type: x mandatory; }
.s-campaign__card, .s-flow__card { scroll-snap-align: start; }
.s-flow__cards-wrap { width: 100%; }
.s-flow__tab:disabled { cursor: default; }
/* 施術の流れ（タブで切り替え。assets/js/tabs.js） */
.s-flow__cards-wrap[hidden] { display: none; }
.s-flow__img .s-flow__img--cover { position: static; display: block; width: 100%; height: 100%; object-fit: cover; }
.s-flow sup { font-size: .65em; vertical-align: super; line-height: 0; }
.s-flow__annotation { color: #777; font-size: 10px; line-height: 1.5; }

/* スライダーの補助（assets/js/slider.js） */
.slider-arrow { display: none; }
.slider-bar { position: relative; flex: none; width: 335px; height: 1px; background: #d9d8d8; }
.slider-bar span { position: absolute; top: -1px; left: 0; height: 3px; background: #1e429b; transition: left .1s; }
.s-flow__bar { margin-top: 32px; }
.slider-dots { display: none; }

/* CAMPAIGN「詳しく見る」で開くポップアップ（template-parts/campaign-details.php・assets/js/campaign.js） */
.s-campaign__modal { width: 335px; max-width: calc(100vw - 40px); max-height: 85vh; margin: auto; padding: 0; overflow: visible; border: 0; border-radius: 8px; background: #fff; color: #333; }
.s-campaign__modal::backdrop { background: rgba(30, 40, 70, .55); }
/* 開いている間は後ろのページをスクロールさせない */
/* スクロールバーが消えた分だけ画面が横にずれないよう、その幅は空けたままにする */
html:has(.s-campaign__modal[open]) { overflow: hidden; scrollbar-gutter: stable; }
.s-campaign__detail { max-height: 85vh; padding: 32px 20px; overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; }
.s-campaign__modal-close { position: absolute; top: -14px; right: -10px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #1e429b; cursor: pointer; }
.s-campaign__modal-close::before, .s-campaign__modal-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 1px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.s-campaign__modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
/* .s-campaign p の text-box（行の上下を詰める）を詳細では外す。余白は各要素で指定 */
.s-campaign .s-campaign__detail :where(p, ul) { text-box: none; }
.s-campaign .s-campaign__detail-title { padding-bottom: 12px; border-bottom: 1px solid #7089c8; color: #1e429b; font-size: 18px; font-weight: 700; line-height: 1.5; text-align: center; }
.s-campaign__detail-title span { font-size: 13px; }
.s-campaign .s-campaign__detail-text { margin-top: 20px; font-size: 13px; line-height: 2; }
.s-campaign .s-campaign__detail-list { margin-top: 20px; list-style: none; }
.s-campaign__detail-list li { position: relative; padding-left: 1.2em; font-size: 13px; line-height: 2; }
.s-campaign__detail-list li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 6px; border-radius: 50%; background: #7089c8; }
.s-campaign .s-campaign__detail-notes { margin-top: 16px; list-style: none; }
.s-campaign__detail-notes li { position: relative; padding-left: 1.2em; color: #777; font-size: 11px; line-height: 1.8; }
.s-campaign__detail-notes li + li { margin-top: 4px; }
.s-campaign__detail-notes li::before { content: "＊"; position: absolute; left: 0; }
.s-campaign__detail strong { color: #1e429b; font-weight: 700; }
.s-campaign__detail-step + .s-campaign__detail-step { margin-top: 32px; }
.s-campaign .s-campaign__detail-sub { margin-top: 24px; padding: 8px 12px; border-radius: 4px; background: #e1edff; color: #1e429b; font-size: 14px; font-weight: 700; line-height: 1.6; }
.s-campaign__detail-step + .s-campaign__detail-step .s-campaign__detail-sub { margin-top: 0; }
.s-campaign__detail-sub + .s-campaign__detail-text { margin-top: 12px; }
.s-campaign__detail-btn { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 295px; height: 48px; margin: 16px auto 0; border-radius: 24px; background: #1e429b; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }

@media (min-width: 768px) {
	.s-campaign__modal { width: 760px; border-radius: 12px; }
	.s-campaign__detail { padding: 48px 56px; }
	.s-campaign__modal-close { transition: opacity .2s; }
	.s-campaign__modal-close:hover { opacity: .8; }
	.s-campaign .s-campaign__detail-title { font-size: 22px; }
	.s-campaign__detail-title span { font-size: 15px; }
	.s-campaign .s-campaign__detail-text, .s-campaign__detail-list li { font-size: 15px; }
	.s-campaign__detail-notes li { font-size: 12px; }
	.s-campaign .s-campaign__detail-sub { font-size: 16px; padding: 10px 16px; }
	.s-campaign__detail-btn { max-width: 335px; height: 56px; font-size: 15px; transition: opacity .2s; }
	.s-campaign__detail-btn:hover { opacity: .8; }
	.s-campaign__btn { transition: background .2s; }
	.s-campaign__btn:hover { background: #fff; }
}

@media (min-width: 768px) {
	.s-campaign { align-items: center; gap: 48px; padding: 120px 0; }
	.s-campaign__contents { width: 1120px; align-items: center; gap: 56px; }
	.s-campaign__heading, .s-campaign__display { width: auto; align-items: center; text-align: center; }
	/* 矢印 40px ×2 ＋ 間隔 ＋ カード 4 枚（240px ×4 ＋ 間隔 20px ×3 ＝ 1020px） */
	.s-campaign__track-wrap { display: flex; align-items: center; justify-content: center; gap: 24px; width: auto; }
	.s-campaign__cards { flex: none; width: 1020px; gap: 20px; }
	.s-campaign__bar { display: none; }
	.slider-arrow { display: block; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid #1e429b; border-radius: 50%; cursor: pointer;
		background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1l5 5-5 5' fill='none' stroke='%231e429b' stroke-width='1.5'/%3E%3C/svg%3E") center / 8px 12px no-repeat; }
	.slider-arrow--prev { transform: scaleX(-1); }
	.slider-arrow:disabled { opacity: .3; cursor: default; }

	.s-flow { align-items: center; gap: 56px; padding: 120px 0; }
	.s-flow__head { width: 1120px; align-items: center; text-align: center; }
	.s-flow__heading, .s-flow__display { align-items: center; text-align: center; }
	.s-flow__cards-wrap { width: 1120px; }
	.s-flow__cards { gap: 0; }
	.s-flow__card { width: 1120px; flex-direction: row; align-items: center; gap: 56px; text-align: left; }
	.s-flow__img { flex: none; width: 560px; height: 373px; border-radius: 16px; -webkit-mask: none; mask: none; }
	.s-flow__img img { position: static; display: block; width: 100%; height: 100%; object-fit: cover; }
	.s-flow__text { flex: 1; width: auto; }
	.s-flow__bar { display: none; }
	.slider-dots { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
	.slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #d9d8d8; cursor: pointer; }
	.slider-dots button.is-current { background: #1e429b; }
}
