/* Legacy-inspired pill header (renewal) */

.rn-legacy-header {
  position: fixed;
  top: 12px;
  left: 0;
  width: 100%;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.rn-legacy-header__bar {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: min(92vw, 1180px);
  min-height: 72px;
  padding: 8px 10px 8px 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(42, 36, 32, 0.12);
  transition: width 0.22s ease, min-height 0.22s ease, padding 0.22s ease;
}

.rn-legacy-header.is-compact .rn-legacy-header__bar {
  width: 72px;
  min-height: 72px;
  padding: 8px;
  margin-left: auto;
  margin-right: max(4vw, 16px);
}

.rn-legacy-header__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.rn-legacy-header__logo img {
  height: 34px;
  width: auto;
}

.rn-legacy-header.is-compact .rn-legacy-header__logo {
  display: none;
}

.rn-legacy-header__pc {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 2px;
}

.rn-legacy-header__pc button,
.rn-legacy-header__pc a {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
}

.rn-legacy-header__pc button::after,
.rn-legacy-header__pc a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  background: #fbb040;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.rn-legacy-header__pc button:hover::after,
.rn-legacy-header__pc button.is-active::after,
.rn-legacy-header__pc a:hover::after,
.rn-legacy-header__pc a.is-active::after {
  transform: scaleX(1);
}

.rn-legacy-header.is-compact .rn-legacy-header__pc {
  display: none !important;
}

.rn-legacy-hamburger {
  position: relative;
  width: 56px;
  height: 56px;
  margin-left: 8px;
  margin-right: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}

.rn-legacy-header.is-compact .rn-legacy-hamburger {
  margin: 0 auto;
}

.rn-legacy-hamburger span {
  position: absolute;
  right: 12px;
  height: 2px;
  background: #2a2420;
  transition: transform 0.28s ease, top 0.28s ease, width 0.28s ease;
}

.rn-legacy-hamburger span:first-child {
  top: 24px;
  width: 22px;
}

.rn-legacy-hamburger span:last-child {
  top: 30px;
  width: 28px;
}

.rn-legacy-hamburger.is-open span:first-child {
  top: 27px;
  width: 24px;
  transform: rotate(-30deg);
}

.rn-legacy-hamburger.is-open span:last-child {
  top: 27px;
  width: 24px;
  transform: rotate(30deg);
}

.rn-legacy-panel {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 12px;
  right: max(4vw, 16px);
  width: 72px;
  height: auto;
  min-height: 72px;
  max-height: 72px;
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
  z-index: 39;
  transition: width 0.22s ease, max-height 0.3s ease, box-shadow 0.22s ease, opacity 0.18s ease;
}

.rn-legacy-panel.is-visible {
  visibility: visible;
  opacity: 1;
}

.rn-legacy-panel.is-open {
  pointer-events: auto;
  width: min(86vw, 320px);
  max-height: min(calc(100vh - 24px), 700px);
  max-height: min(calc(100dvh - 24px), 700px);
  box-shadow: 0 14px 40px rgba(42, 36, 32, 0.18);
  overflow: hidden;
}

.rn-legacy-panel__list {
  display: none;
  flex-direction: column;
  gap: clamp(0px, 0.5vh, 4px);
  padding: 84px 18px 16px;
}

.rn-legacy-panel.is-open .rn-legacy-panel__list {
  display: flex;
}

.rn-legacy-panel__list a,
.rn-legacy-panel__list button {
  appearance: none;
  position: relative;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  padding: clamp(7px, 1.25vh, 12px) 18px;
  line-height: 1.35;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

.rn-legacy-panel__list a:hover,
.rn-legacy-panel__list button:hover {
  color: var(--ink);
}

.rn-legacy-panel__list a::after,
.rn-legacy-panel__list button::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 9px;
  height: 2px;
  background: #fbb040;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.rn-legacy-panel__list a:hover::after,
.rn-legacy-panel__list button:hover::after {
  transform: scaleX(1);
}

.rn-legacy-panel__list .is-active {
  background: #fbb040;
  box-shadow: 0 4px 12px rgba(42, 36, 32, 0.12);
}

@media (max-height: 600px) {
  .rn-legacy-panel__list {
    padding-top: 74px;
    padding-bottom: 10px;
  }

  .rn-legacy-panel__list a,
  .rn-legacy-panel__list button {
    padding-block: 6px;
    font-size: 14px;
  }
}

body.renewal {
  padding-top: 0;
}

body.renewal .rn-main {
  padding-top: 0;
}

body.renewal-home .rn-hero,
body.renewal .rn-page-hero {
  scroll-margin-top: 100px;
}

body.renewal section[id],
body.renewal .rn-sys-home,
body.renewal .rn-contact {
  scroll-margin-top: 100px;
}

/* 固定ヘッダーの下端（PC: 約96px）より下からサブページを開始する */
body.renewal .rn-page-hero,
body.renewal .rn-page-hero--compact {
  padding-top: 120px;
}

/* トップが1カラムになるスマホ〜タブレット幅でも本文との重なりを防ぐ */
@media (max-width: 1099px) {
  body.renewal-home .rn-hero {
    padding-top: 112px;
  }

  body.renewal-home .rn-hero__grid {
    padding-top: 0;
  }
}

@media (max-width: 899px) {
  .rn-legacy-hamburger {
    margin-left: auto;
    margin-right: 2px;
  }

  .rn-legacy-header.is-compact .rn-legacy-hamburger {
    margin: 0 auto;
  }

  body.renewal-home .rn-hero {
    padding-top: 104px;
  }

  body.renewal .rn-page-hero,
  body.renewal .rn-page-hero--compact {
    padding-top: 108px;
  }
}

@media (min-width: 900px) {
  .rn-legacy-header__pc {
    display: flex;
  }

  .rn-legacy-header__bar {
    min-height: 84px;
    padding: 10px 14px 10px 28px;
  }

  .rn-legacy-header__logo img {
    height: 40px;
  }

}

body.renewal-policy .policy_container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 72px) 80px;
  background: #fff;
  border: 1px solid rgba(42, 36, 32, 0.08);
  border-radius: 18px;
  line-height: 1.9;
}

body.renewal-policy .policy_container h2 {
  margin: 28px 0 10px;
  font-size: 18px;
}

body.renewal-qa .QA_container {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px clamp(20px, 4vw, 72px) 80px;
}

body.renewal-qa .QA_content {
  margin-bottom: 8px;
}

body.renewal-qa .question_container {
  display: flex;
  align-items: center;
  min-height: 64px;
  background: #fff;
  border: 1px solid rgba(42, 36, 32, 0.08);
  border-radius: 14px;
  padding: 12px 8px;
}

body.renewal-qa .question_element {
  width: 78%;
  margin-left: 4%;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

body.renewal-qa .plus_box {
  width: 12%;
  position: relative;
  height: 36px;
  cursor: pointer;
}

body.renewal-qa .plus_line {
  position: absolute;
  width: 18px;
  height: 3px;
  background: #2a2420;
  border-radius: 4px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  top: 16px;
  left: 8px;
}

body.renewal-qa .plus_line.before {
  opacity: 1;
}

body.renewal-qa .plus_line.before_open {
  transform: rotate(-90deg);
  opacity: 0;
}

body.renewal-qa .plus_line.after {
  transform: rotate(90deg);
}

body.renewal-qa .plus_line.after_open {
  transform: rotate(0deg);
}

body.renewal-qa .answercontainer {
  height: 0;
  overflow: hidden;
  margin: 0 4%;
  font-size: 15px;
  line-height: 1.8;
  transition: height 0.2s ease, margin 0.2s ease;
}

body.renewal-qa .answercontainer_open {
  height: auto;
  margin: 12px 6% 20px;
}
