.top-modal {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.75);
  overscroll-behavior: contain;
  overflow-y: scroll;
  z-index: 999;
  display: var(--modal, none);
  overflow-x: hidden;
  transition: opacity 1s ease;
  opacity: 0;
}

.top-modal--2023 {
  --main-max-width: 740px;
}

.top-modal--2024 {
  --main-max-width: 700px;
  --arrow-display: block;
}

.top-modal img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.top-modal::before,
.top-modal::after {
  content: '';
  width: 1px;
  height: calc(100vh + 1px);
  display: flex;
}

.top-modal__wrap {
  width: calc(100vw - 40px);
  margin: auto;
  display: flex;
  align-items: center;
  pointer-events: none;
  padding: 20px;
  /* opacity: 0; */
  /* animation: fadeIn 1s ease .5s forwards; */
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-modal__main {
  position: relative;
  max-width: var(--main-max-width);
  background-color: #fff;
  padding: 30px;
  pointer-events: auto;
  width: calc(100vw - 40px);
  margin: 0 auto;
  transition: background-color 0.3s ease;
}

.top-modal__close {
  position: absolute;
  border: none;
  background: none;
  text-align: center;
  right: 30px;
  top: 30px;
  cursor: pointer;
  padding: 0;
}

.top-modal__lead {
  text-align: center;
  margin-bottom: 15px;
}

.top-modal__ttl {
  text-align: center;
  margin-bottom: 20px;
}

.top-modal__ttl span {
  position: relative;
  display: inline-block;
}

.top-modal span:after {
  position: absolute;
  display: block;
  left: calc(100% + 8px);
  top: 0;
  bottom: 0;
  margin: auto;
  content: '正解';
  width: 50px;
  height: 48px;
  background: no-repeat url(/assets/img/top/ttl_new_02.svg) top left / 100% auto;
  overflow: hidden;
  display: block;
  text-indent: 200%;
  white-space: nowrap;
  text-align: left;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.top-modal__img {
  position: relative;
  text-align: center;
}

.top-modal__img > * + * {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.top-modal__lower {
  display: flex;
  margin: 30px -15px 0;
  justify-content: center;
}

.top-modal__btn {
  width: 100%;
  text-align: center;
  margin: 0 15px;
  max-width: 325px;
}

.top-modal__btn > * {
  display: flex;
  align-items: center;
  justify-content: center;
  border: solid 3px #eb5f1e;
  width: 100%;
  font-size: 16px;
  height: 60px;
  position: relative;
  font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .top-modal__btn > *:hover svg {
    transform: translateX(10px);
  }
}

.top-modal__btn button {
  background-color: #eb5f1e;
  color: #fff;
  cursor: pointer;
}

.top-modal__btn a {
  background-color: #fff;
  text-decoration: none;
  color: #000;
}

.top-modal__btn a::before {
  content: '';
  display: var(--arrow-display, none);
  width: 16px;
  height: 16px;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 20px;
  margin: auto;
  background: no-repeat 0 0 / 100% auto;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20height%3D%2216.7%22%20width%3D%2216.4%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m16.4%208-8-8-.8.7%207.2%207.2h-14.8v1h14.8l-7.2%207.1.8.7%208-8-.4-.3z%22%2F%3E%3C%2Fsvg%3E');
}

.top-modal__btn svg {
  fill: currentColor;
  position: absolute;
  right: 20px;
  top: 0;
  bottom: 0;
  margin: auto;
  transition: transform 0.3s ease;
  display: inline-block;
  max-width: 16.39px;
  width: 100%;
  max-height: 16.7px;
  height: 100%;
}

.top-modal__check {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.top-modal__check input {
  display: none;
}

.top-modal__check label {
  font-size: 16px;
  display: block;
  cursor: pointer;
  transition: padding 0.3s ease;
  position: relative;
  padding-left: 33px;
}

.top-modal__check label::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  margin: auto;
  left: 0;
  width: 23px;
  height: 23px;
  background: url(/assets/img/top/btn_check_01.png) 0 0 no-repeat;
  background-size: 100%;
}

.top-modal__check input:checked + label::before {
  background-position-y: 100%;
}

.top-modal[aria-hidden='false'] {
  opacity: 1;
}
.top-modal[aria-hidden='true'] {
  opacity: 0;
}

.top-modal[data-answer='true'] .top-modal__main {
  background-color: #ffe3d6;
}

.top-modal[data-answer='true'] .top-modal__img > * + * {
  opacity: 0;
}

.top-modal[data-answer='true'] .top-modal__ttl span:after {
  opacity: 1;
}

.top-modal__svg {
  display: none;
}

@media (max-width: 768px) {
  .top-modal__wrap {
    width: calc(100vw - 10px);
    padding: calc(40 / 500 * 100vw) 0;
  }

  .top-modal__main {
    max-width: 740px;
    padding: calc(20 / 500 * 100vw);
    height: auto;
  }

  .top-modal__close {
    right: calc(20 / 500 * 100vw);
    top: calc(23 / 500 * 100vw);
    max-width: calc(19 / 500 * 100vw);
    width: 100%;
  }

  .top-modal__lead {
    max-width: calc(344 / 500 * 100vw);
    margin: 0 auto calc(12 / 500 * 100vw);
  }

  .top-modal__ttl {
    max-width: calc(146 / 500 * 100vw);
    margin: 0 auto calc(16 / 500 * 100vw);
  }

  .top-modal__ttl span {
    max-width: calc(255 / 500 * 100vw);
    margin: 0 auto;
  }

  .top-modal__ttl span:after {
    left: calc(100% + 5 / 500 * 100vw);
    width: calc(40 / 500 * 100vw);
    height: calc(40 / 500 * 100vw);
  }

  .top-modal__lower {
    margin: calc(20 / 500 * 100vw) calc(-10 / 500 * 100vw) 0;
  }

  .top-modal__btn {
    margin: 0 calc(10 / 500 * 100vw);
    max-width: calc(260 / 500 * 100vw);
  }

  .top-modal__btn a::before {
    width: calc(16 / 500 * 100vw);
    height: calc(16 / 500 * 100vw);
    right: calc(20 / 500 * 100vw);
  }

  .top-modal__btn > * {
    font-size: calc(18 / 500 * 100vw);
    height: calc(55 / 500 * 100vw);
    padding: 0 calc(12 / 500 * 100vw) 0 0;
  }

  .top-modal__btn svg {
    right: calc(15 / 500 * 100vw);
    max-width: calc(15 / 500 * 100vw);
    max-height: calc(15 / 500 * 100vw);
    font-size: calc(15 / 500 * 100vw);
  }

  .top-modal__check {
    margin-top: calc(25 / 500 * 100vw);
  }

  .top-modal__check label {
    font-size: calc(16 / 500 * 100vw);
    padding-left: calc(33 / 500 * 100vw);
  }

  .top-modal__check label::before {
    width: calc(23 / 500 * 100vw);
    height: calc(23 / 500 * 100vw);
  }
}

.p-bnr {
  position: fixed;
  right: 20px;
  z-index: 110;
}

.p-bnr a {
  display: block;
}

.p-bnr--2 {
  top: 330px;
}

@media (max-width: 1330px) {
  .p-bnr {
    right: 0;
  }
}
