.research-popup__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 22px;
  background-color: transparent;
  position: sticky;
  top: 0;
  z-index: 20;
  isolation: isolate;
  border-radius: 0 0 16px 16px;
  font-family: "Noto Sans JP", "Noto Sans JP Extra", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "ヒラギノ角ゴ Pro W3", "メイリオ", sans-serif;
}

.research-popup__header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #FFF1DC;
  border-radius: inherit;
  z-index: -1;
}

.research-popup__header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background-color: #fff8ed;
  z-index: -2;
}

.research-popup__header-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--color-blue950);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  appearance: none;
}

@media screen and (max-width: 767px) {
  .research-popup__header-close {
    gap: 4px;
  }
}

.research-popup__header-close-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background-color: #005cab;
  position: relative;
}

.research-popup__header-close-icon::before,
.research-popup__header-close-icon::after {
  content: "";
  width: 10px;
  height: 1.5px;
  background-color: #fff;
  position: absolute;
}

.research-popup__header-close-icon::before {
  transform: rotate(45deg);
}

.research-popup__header-close-icon::after {
  transform: rotate(-45deg);
}

.research-popup__header-close-text {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.03em;
  font-family: inherit;
  white-space: nowrap;
}

.research-popup__header-close-text:hover {
  text-decoration: underline;
  color: var(--color-blue700);
}

.research-popup__header-close-text ruby,
.research-popup__header-ruby-text ruby,
.research-faq__close-link.contents-button__link ruby {
  line-height: 1.2;
}

.research-popup__header-close-text rb,
.research-popup__header-ruby-text rb,
.research-faq__close-link.contents-button__link rb {
  line-height: 1.2;
}

.research-popup__header-close-text rt,
.research-popup__header-ruby-text rt,
.research-faq__close-link.contents-button__link rt {
  line-height: 1;
}

.research-popup__header-close-text rp,
.research-popup__header-ruby-text rp,
.research-faq__close-link.contents-button__link rp {
  display: none;
}

.research-popup__header-ruby {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

@media screen and (max-width: 900px) and (min-width: 768px) {
  .research-popup__header {
    gap: 8px;
  }

  .research-popup__header-close {
    gap: 6px;
  }

  .research-popup__header-close-icon {
    width: 22px;
    height: 22px;
  }

  .research-popup__header-close-text {
    font-size: 1rem;
  }

  .research-popup__header-ruby {
    gap: 8px;
  }

  .research-popup__header-ruby-text {
    font-size: 0.875rem;
  }

  .research-popup__header-ruby-toggle {
    width: 52px;
    height: 28px;
  }

  .research-popup__header-ruby-toggle::after {
    width: 20px;
    height: 20px;
    top: 4px;
    left: 4px;
  }

  .research-popup__header-ruby-toggle[aria-pressed="true"]::after {
    transform: translateX(24px);
  }
}

.research-popup__header-ruby-text {
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.03em;
  font-family: inherit;
}

.research-popup__header-ruby-toggle {
  width: 64px;
  height: 32px;
  border-radius: 9999px;
  background-color: #d8dde2;
  position: relative;
  transition: background-color 0.2s ease;
}

.research-popup__header-ruby-toggle::after {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background-color: #fffdf7;
  position: absolute;
  top: 4px;
  left: 4px;
  transition: transform 0.2s ease;
}

.research-popup__header-ruby-toggle[aria-pressed="true"] {
  background-color: #005cab;
}

.research-popup__header-ruby-toggle[aria-pressed="true"]::after {
  transform: translateX(32px);
}

.research-faq__close-button {
  margin-top: 24px;
}

.research-faq__close-link.contents-button__link {
  max-width: 390px;
  margin: 0 auto;
  padding: 5px 24px 5px 64px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.12);
  position: relative;
}

.research-faq__close-link.contents-button__link::after {
  display: none;
}

.research-faq__close-link.contents-button__link::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--color-blue950) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 3.5L10.5 10.5' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M10.5 3.5L3.5 10.5' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 14px 14px;
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  transition: 0.2s;
}

@media (hover: hover) {
  .research-faq__close-link.contents-button__link:hover::before {
    background-color: var(--color-mono50);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 3.5L10.5 10.5' stroke='%23083044' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M10.5 3.5L3.5 10.5' stroke='%23083044' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    transform: translateY(-50%) scale(1.25);
  }
}

@media screen and (max-width: 767px) {
  .research-popup {
    padding-left: 0;
  }

  .research-popup__panel {
    width: 100%;
    box-shadow: none;
  }

  .research-popup__header {
    padding: 16px;
    align-items: flex-start;
    border-radius: 0 0 12px 12px;
  }

  .research-popup__header-close,
  .research-popup__header-ruby {
    align-items: flex-start;
  }

  .research-popup__header-close-text {
    font-size: 0.875rem;
  }

  .research-popup__header-ruby {
    gap: 8px;
  }

  .research-popup__header-ruby-text {
    font-size: 0.875rem;
    font-weight: bold;
    line-height: 1.5;
    letter-spacing: 0.03em;
  }

  .research-popup__header-close-text ruby,
  .research-popup__header-ruby-text ruby {
    display: revert;
    position: static;
    vertical-align: baseline;
    ruby-position: over;
    ruby-align: center;
    line-height: 1.0;
  }

  .research-popup__header-close-text rb,
  .research-popup__header-ruby-text rb {
    line-height: 1;
  }

  .research-popup__header-close-text rt,
  .research-popup__header-ruby-text rt {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    text-align: inherit;
    white-space: nowrap;
    line-height: 0.4;
  }

  .research-popup__header-ruby-toggle {
    width: 52px;
    height: 28px;
  }

  .research-popup__header-ruby-toggle::after {
    width: 20px;
    height: 20px;
    top: 4px;
    left: 4px;
  }

  .research-popup__header-ruby-toggle[aria-pressed="true"]::after {
    transform: translateX(24px);
  }

  .research-faq__close-button {
    margin-top: 20px;
    margin-bottom: 48px;
  }

  .research-faq__close-link.contents-button__link {
    width: 100%;
    max-width: none;
    padding: 5px 16px 5px 60px;
  }

  .research-faq__close-link.contents-button__link::before {
    left: 14px;
  }
}

.research-matome__hero-card-title {
  color: var(--color-blue950);
  font-size: 1.75rem;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-align: center;
}

.research-matome__hero-card-title-inner {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0 10px 2px;
  position: relative;
  z-index: 1;
}

.research-matome__hero-card-title-inner::after {
  content: "";
  width: calc(100% + 8px);
  height: 12px;
  border-radius: 9999px;
  background-color: var(--color-orange200);
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: -1;
}

.research-matome__hero-card-title-text {
  display: inline-block;
}

.research-matome__hero-card-icon {
  display: inline-block;
  width: 46px;
  height: 36px;
  background: url(/kids/research/common/img/icon_button_pencil.svg) no-repeat center / contain;
  flex-shrink: 0;
}

@media screen and (max-width: 767px) {
  .research-matome__hero-card-title {
    font-size: 1.25rem;
  }

  .research-matome__hero-card-title-inner {
    gap: 8px;
    padding: 0 2px;
  }

  .research-matome__hero-card-title-inner::after {
    width: calc(100% + 2px);
    height: 9px;
  }

  .research-matome__hero-card-icon {
    width: 30.45px;
    height: 28px;
  }
}

.research-matome-sheet::before,
.research-matome-sheet::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #dcd5cc;
  pointer-events: none;
  z-index: 2;
}

.research-matome-sheet::before {
  left: 8px;
}

.research-matome-sheet::after {
  right: 8px;
}

@media screen and (max-width: 767px) {
  .research-matome-sheet::before,
  .research-matome-sheet::after {
    content: none;
  }
}

/* page-top */
.side-navi__page-top{
  z-index: 2;
  position: fixed;
}

@media screen and (min-width: 768px) {
  .side-navi__page-top{
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);
    right: 8px;
    bottom: calc(80px + 8px);
  }
}
