/**
 * 追従CTAバナー（赤ボタン・白半透明の帯）
 * SWELLのCSSと衝突しないよう、クラス名はすべて rmfx- で始める
 */
@keyframes rmfx-sweep {
  0%   { left: -30%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

.rmfx {
  box-sizing: border-box;
  position: fixed;
  z-index: 9999; /* スクロールポップアップ（10000）より奥 */
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 14px 0 14px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}
.rmfx *, .rmfx *::before, .rmfx *::after { box-sizing: border-box; }
.rmfx.is-visible { opacity: 1; pointer-events: auto; }

.rmfx__inner { position: relative; margin-inline: auto; padding: 0 24px; }
.rmfx__set { position: relative; max-width: 500px; margin-inline: auto; }

/* 吹き出し（LPと同じ文言・白地にピンク枠） */
.rmfx__balloon {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 3px 16px;
  border: 2px solid #ff048c;
  background: #fff;
  color: #333;
  font-family: "M PLUS 1", "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  transition: margin-top 0.2s ease;
}
.rmfx__balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #ff048c;
}
.rmfx__balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin: -2px 0 0 -5px;
  border: 5px solid transparent;
  border-top-color: #fff;
  z-index: 1;
}

.rmfx__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  max-width: 500px;
  height: 60px;
  margin-inline: auto;
  border-radius: 9999px;
  background: #ae2419;
  color: #fff;
  font-family: "M PLUS 1", "Inter", "Noto Sans JP", sans-serif;
  font-size: clamp(15px, 4.6vw, 20px); /* 狭いスマホでも文字と▶が重ならないよう縮める */
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.rmfx__btn:visited, .rmfx__btn:hover, .rmfx__btn:focus { color: #fff; text-decoration: none; }
.rmfx__arrow { flex: none; font-size: 0.8em; } /* 文字の後ろに並べる（絶対配置をやめて重なりを防ぐ） */

/* 斜めに流れる白い光 */
.rmfx__btn::after {
  content: "";
  position: absolute;
  top: -10%;
  left: -30%;
  width: 14%;
  height: 120%;
  background: rgba(255, 255, 255, 0.45);
  transform: skewX(-35deg);
  animation: rmfx-sweep 3s ease-in-out infinite;
  pointer-events: none;
}

@media screen and (min-width: 768px) {
  .rmfx { padding: 14px 0 16px; }
  .rmfx__set { max-width: 636px; }
  .rmfx__balloon { font-family: "Inter", "Noto Sans JP", sans-serif; top: -24px; font-size: 16px; padding: 3px 22px; }
  .rmfx__inner { max-width: 1000px; padding: 0; }
  .rmfx__btn { max-width: 636px; height: 66px; font-size: 29px; }
}

@media (any-hover: hover) {
  .rmfx__btn:hover { background: #8f1c13; transform: translateY(2px); }
  .rmfx__set:hover .rmfx__balloon { margin-top: 2px; }
}

/* 最下部の記事内容・フッターがバナーに隠れないよう余白を足す */
body.rmfx-active { padding-bottom: 96px; }

/* 以前フッターに直接貼っていた追従バナー（.rm-floating-banner）との二重表示を防ぐ。
   元のコードをSWELL側から削除したあとは、この指定は不要 */
.rm-floating-banner { display: none !important; }
