/* =========================================================================
   4-styles plan simulation: Banner + Sim Button + Modal Popup
   - Color tokens: #93214e (brand magenta) / #524741 (warm brown) / #1a222d (dark)
   ========================================================================= */

/* ---------- Smooth scroll (banner anchor) ---------- */
html { scroll-behavior: smooth; }
#fsp-sim-anchor { scroll-margin-top: 80px; }

/* ---------- Banner (Group 865) - 画像1枚, パンくず直下 ---------- */
.fsp-banner-wrap {
  padding: 18px 24px 72px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.fsp-banner {
  display: inline-block;
  text-decoration: none;
  transition: opacity .2s ease;
  max-width: 100%;
}
.fsp-banner:hover { opacity: 0.88; }
.fsp-banner img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .fsp-banner-wrap { padding: 14px 16px 48px; }
}

/* ---------- Simulation Button (テキストCTA / 料金ブロックの下に配置) ---------- */
/* 親要素 .four-styles-plan-lineup-map-block-details の flex に対し折り返して下段に落とす */
.four-styles-plan-lineup-map-block-details { flex-wrap: wrap; }
.fsp-sim-btn {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 520px;
  margin: 36px auto 4px;
  padding: 14px 28px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, #93214e 0%, #b22e60 100%);
  color: #fff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease;
  text-align: center;
}
.fsp-sim-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.fsp-sim-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 4px rgba(147, 33, 78, .35); }
.fsp-sim-btn-headline {
  font-size: 14px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .92);
  font-weight: 500;
}
.fsp-sim-btn-headline strong {
  color: #ffd07a;
  font-weight: 700;
  font-size: 1.05em;
}
.fsp-sim-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .06em;
}
.fsp-sim-btn-cta svg { flex: 0 0 auto; }

@media (max-width: 768px) {
  .fsp-sim-btn { padding: 12px 18px; }
  .fsp-sim-btn-headline { font-size: 13px; }
  .fsp-sim-btn-cta { font-size: 15px; }
}

/* ---------- Modal (e44) ---------- */
.fsp-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}
.fsp-modal[aria-hidden="false"] {
  display: block;
}
body.fsp-modal-open { overflow: hidden; }

.fsp-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  cursor: pointer;
}
.fsp-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  background: #1a222d;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fsp-modal-close svg { display: block; }

.fsp-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: #fff;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
/* スクロール領域は body 側で吸収 */
.fsp-modal-body { max-height: calc(100vh - 360px); overflow-y: auto; }

/* Header (magenta) */
.fsp-modal-header {
  background: #93214e;
  color: #fff;
  padding: 26px 40px 26px;
  position: relative;
}
.fsp-modal-headline {
  font-family: "Zen Old Mincho", "Yu Mincho", "Yu Mincho Light", "游明朝", serif;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: .04em;
  line-height: 1.5;
}
.fsp-modal-price-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.fsp-modal-price-label {
  margin: 0 0 2px;
  font-family: "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .14em;
  color: rgba(255,255,255,.82);
}
.fsp-modal-price-original {
  position: relative;
  display: inline-block;
  margin: 0;
  color: rgba(255,255,255,.55);
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.fsp-modal-price-original::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  height: 1.5px;
  background: rgba(255,255,255,.78);
  pointer-events: none;
}
.fsp-modal-price-original .fsp-yen { font-size: 18px; margin-right: 1px; vertical-align: baseline; }
.fsp-modal-price-original .fsp-num { font-size: 26px; letter-spacing: -.01em; vertical-align: baseline; }
.fsp-modal-price {
  margin: 0;
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}
.fsp-modal-price .fsp-yen { font-size: 44px; }
.fsp-modal-price .fsp-num { font-size: 76px; letter-spacing: -.02em; }
.fsp-modal-discount-info {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 0;
  padding: 8px 16px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  color: #fff;
  font-family: "Zen Old Mincho", serif;
}
.fsp-modal-discount-amt { font-size: 20px; font-weight: 700; color: #ffd07a; letter-spacing: .02em; }
.fsp-modal-discount-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid #fff;
  border-radius: 4px;
  font-weight: 900;
  line-height: 1;
}
.fsp-modal-discount-badge .fsp-pct { font-size: 22px; }
.fsp-modal-discount-badge .fsp-pct small { font-size: 12px; font-weight: 700; }
.fsp-modal-discount-badge .fsp-off { font-size: 13px; letter-spacing: .04em; }

/* Body */
.fsp-modal-body {
  padding: 24px 40px 24px;
}
.fsp-modal-product-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 4px;
  text-align: center;
}
.fsp-modal-product {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 10;
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fsp-modal-product img { width: 100%; height: 100%; object-fit: cover; }
.fsp-modal-product-empty { background: repeating-linear-gradient(45deg, #f6f6f6, #f6f6f6 8px, #ececec 8px, #ececec 16px); }

.fsp-modal-savings-prod {
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-weight: 900;
  color: #1a222d;
  letter-spacing: .02em;
  line-height: 1.25;
}
.fsp-modal-savings-prod strong { font-size: 32px; font-weight: 900; color: #93214e; }
.fsp-modal-savings-prod .fsp-savings-tail { font-size: 16px; }

/* CTA - カード下端から下半分はみ出し */
.fsp-modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #1a222d;
  color: #fff;
  height: 80px;
  margin: 8px 40px 0;
  margin-bottom: -40px; /* 高さの半分を負マージンで下にはみ出す */
  text-decoration: none;
  font-family: "Yu Gothic", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .06em;
  transition: background .2s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.fsp-modal-cta:hover { background: #7B191E; opacity: 1; }
.fsp-modal-cta svg { flex: 0 0 auto; }

/* Modal mobile */
@media (max-width: 768px) {
  .fsp-modal-card { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .fsp-modal-close {
    top: -12px;
    right: -12px;
    width: 30px;
    height: 30px;
  }
  .fsp-modal-header { padding: 20px 20px; }
  .fsp-modal-headline { font-size: 14px; }
  .fsp-modal-price-original .fsp-yen { font-size: 14px; }
  .fsp-modal-price-original .fsp-num { font-size: 20px; }
  .fsp-modal-price .fsp-yen { font-size: 28px; }
  .fsp-modal-price .fsp-num { font-size: 44px; }
  .fsp-modal-price-label { font-size: 12px; }
  .fsp-modal-discount-info { gap: 10px; padding: 6px 12px; }
  .fsp-modal-discount-amt { font-size: 16px; }
  .fsp-modal-discount-badge .fsp-pct { font-size: 18px; }
  .fsp-modal-discount-badge .fsp-off { font-size: 11px; }
  .fsp-modal-body { padding: 18px 20px; }
  .fsp-modal-product { width: 100%; aspect-ratio: 16 / 10; }
  .fsp-modal-savings-prod strong { font-size: 24px; }
  .fsp-modal-savings-prod .fsp-savings-tail { font-size: 13px; }
  .fsp-modal-cta { margin: 4px 20px 0; margin-bottom: -30px; height: 60px; font-size: 14px; }
  .fsp-modal-body { max-height: calc(100vh - 280px); }
}


/* === 2026-06 ポップアップ調整: 差額を主役に / %OFFバッジ廃止 / 「例えば…」追加 === */
.fsp-modal-price-stack { gap: 6px; }
.fsp-price-cap { display:block; font-family:"Yu Gothic",sans-serif; font-weight:500; font-size:12px; letter-spacing:.14em; color:rgba(255,255,255,.72); margin-bottom:1px; }
/* 元価格: もう少し大きく（取消線は維持） */
.fsp-modal-price-original { color: rgba(255,255,255,.6); }
.fsp-modal-price-original .fsp-yen { font-size: 22px; }
.fsp-modal-price-original .fsp-num { font-size: 34px; }
/* 値下げ後（総額費用）: 少し控えめに */
.fsp-modal-price .fsp-yen { font-size: 26px; }
.fsp-modal-price .fsp-num { font-size: 46px; }
/* 差額（お得額）: 主役・特大 */
.fsp-modal-savings-big { display:flex; align-items:baseline; justify-content:center; gap:.12em; margin:14px 0 2px; color:#ffd07a; font-family:"Zen Old Mincho","Yu Mincho",serif; font-weight:900; line-height:1; text-shadow:0 2px 8px rgba(0,0,0,.18); }
.fsp-modal-savings-big .fsp-savings-amt { display:inline-flex; align-items:baseline; }
.fsp-modal-savings-big .fsp-yen { font-size: 46px; }
.fsp-modal-savings-big .fsp-num { font-size: 100px; letter-spacing:-.03em; }
.fsp-modal-savings-big .fsp-savings-word { font-size: 38px; margin-left:.12em; }
/* 「例えば…」 */
.fsp-modal-eg { margin:0 0 12px; font-family:"Zen Old Mincho","Yu Mincho",serif; font-weight:700; font-size:18px; color:#93214e; text-align:center; letter-spacing:.04em; }
/* 商品名（「が買える」廃止により単独表示） */
.fsp-modal-savings-prod strong { font-size: 30px; }

@media (max-width: 600px) {
  .fsp-modal-price-original .fsp-num { font-size: 26px; }
  .fsp-modal-price-original .fsp-yen { font-size: 17px; }
  .fsp-modal-price .fsp-num { font-size: 34px; }
  .fsp-modal-price .fsp-yen { font-size: 20px; }
  .fsp-modal-savings-big .fsp-num { font-size: 64px; }
  .fsp-modal-savings-big .fsp-yen { font-size: 30px; }
  .fsp-modal-savings-big .fsp-savings-word { font-size: 26px; }
  .fsp-modal-eg { font-size: 15px; }
  .fsp-modal-savings-prod strong { font-size: 22px; }
}


/* === 2026-06 価格レイアウト: 通常→総額 横並び / 打消し中央 / お得改行防止 === */
.fsp-modal-price-stack { gap: 4px; }
.fsp-price-row { display:flex; align-items:center; justify-content:center; gap:clamp(10px,2vw,20px); flex-wrap:nowrap; }
.fsp-price-row .fsp-modal-price-original,
.fsp-price-row .fsp-modal-price { display:flex; flex-direction:column; align-items:center; margin:0; }
.fsp-price-row .fsp-price-cap { margin-bottom:2px; }
.fsp-price-val { display:inline-flex; align-items:baseline; white-space:nowrap; line-height:1; }
.fsp-modal-price-original::after { display:none !important; }
.fsp-modal-price-original .fsp-price-val { text-decoration:line-through; text-decoration-thickness:2px; text-decoration-color:rgba(255,255,255,.7); }
.fsp-modal-price-original .fsp-yen { font-size:16px; }
.fsp-modal-price-original .fsp-num { font-size:24px; }
.fsp-modal-price .fsp-yen { font-size:18px; }
.fsp-modal-price .fsp-num { font-size:32px; }
.fsp-price-arrow { align-self:flex-end; padding-bottom:2px; font-size:26px; line-height:1; color:rgba(255,255,255,.78); font-family:"Yu Gothic",sans-serif; }
.fsp-modal-savings-big { flex-wrap:nowrap; white-space:nowrap; margin:10px 0 2px; }
.fsp-modal-savings-big .fsp-savings-amt { white-space:nowrap; }
.fsp-modal-savings-big .fsp-num { font-size:clamp(56px,9vw,84px); }
.fsp-modal-savings-big .fsp-yen { font-size:40px; }
.fsp-modal-savings-big .fsp-savings-word { font-size:32px; white-space:nowrap; }

@media (max-width:600px){
  .fsp-price-row { gap:8px; }
  .fsp-modal-price-original .fsp-num { font-size:18px; }
  .fsp-modal-price-original .fsp-yen { font-size:13px; }
  .fsp-modal-price .fsp-num { font-size:24px; }
  .fsp-modal-price .fsp-yen { font-size:15px; }
  .fsp-price-arrow { font-size:20px; }
  .fsp-modal-savings-big .fsp-num { font-size:54px; }
  .fsp-modal-savings-big .fsp-yen { font-size:28px; }
  .fsp-modal-savings-big .fsp-savings-word { font-size:24px; }
}
