.top-page {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  color: #1a1311;
  background: #f7f5ef;
}

.top-page .floating-q-container {
  z-index: 2;
  pointer-events: none;
}

.top-page section {
  position: relative;
}

.top-page .contact-mini,
.top-page .site-footer {
  position: relative;
  z-index: 4;
}

.top-page .contact-mini{
  margin-top: 0;
  border-radius: 0;
  padding-top: 160px;
}

.top-page .contact-mini::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: max(112vw, 1580px);
    height: clamp(92px, 8.2vw, 132px);
    background: url(../img/service-blue-cloud.png) center / 100% 100% no-repeat;
    transform: translateX(-50%);
    pointer-events: none;
}

.top-section__inner,
.top-about__inner,
.top-service__inner,
.top-topics__inner,
.top-recruit__inner {
  position: relative;
  z-index: 3;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.top-topics__inner{
  position: relative;
}

/* .top-section-title {
  font-size: clamp(28px, 2.7vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
} */

.top-works .top-section-title {
  text-align: center;
}

.top-page section:not(.contact-mini) .c-btn:not(.c-btn--solid-dark) {
  min-width: 164px;
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 14px;
}

.top-button-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.top-cloud,
.contact-mini::before {
  width: max(112vw, 1580px);
}

.top-cloud {
  position: absolute;
  left: 50%;
  z-index: 1;
  height: clamp(92px, 8.2vw, 132px);
  pointer-events: none;
  background: url("../img/service-blue-cloud.png") center / 100% 100% no-repeat;
}

.top-cloud--top {
  top: -4px;
  transform: translateX(-50%);
}

.top-cloud--bottom {
  bottom: -4px;
  transform: translateX(-50%) rotate(180deg);
}

.top-hero {
  min-height: clamp(680px, 56vw, 980px);
  overflow: hidden;
  background: #f7f5ef;
}

.top-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: max(100vw, 1366px);
  aspect-ratio: 1366 / 268;
  background: url("../img/top-fv-deco.svg") top center / 100% 100% no-repeat;
  transform: translateX(-50%);
  transform-origin: center;
  pointer-events: none;
}

.top-hero__media,
.top-hero__media img {
  position: absolute;
  width: 100%;
  height: 100%;
}

.top-hero__media {
  top: clamp(160px, 7.8vw, 180px);
  bottom: auto;
  left: 50%;
  z-index: 2;
  width: min(1720px, calc(100% + 220px));
  height: auto;
  aspect-ratio: 6241 / 2378;
  transform: translateX(-50%);
  overflow: visible;
}

.top-hero__media img {
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
}

.top-hero__characters {
  position: absolute;
  left: max(10px, calc(50% - 640px));
  bottom: -6px;
  z-index: 3;
  width: min(65vw, 900px);
  pointer-events: none;
}

.top-hero__copy {
  position: absolute;
  top: 50%;
  /* left: calc(50% + 112px); */
  right: 5%;
  z-index: 4;
  /* width: min(40vw, 560px); */
  width: auto;
  max-width: none;
  transform: translateY(-50%);
}

.top-hero__title {
  font-size: clamp(48px, 3.2vw, 60px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: nowrap;
}

.top-hero__lead {
  margin-top: 12px;
  font-size: clamp(24px, 1.25vw, 40px);
  font-weight: 700;
  line-height: 1.7;
}

@media (min-width: 1600px) {
  .top-hero {
    min-height: clamp(920px, 50vw, 1080px);
  }

  .top-hero__media {
    top: clamp(124px, 6.3vw, 150px);
    width: clamp(1920px, 86vw, 2200px);
  }

  .top-hero__characters {
    left: max(40px, calc(50% - 920px));
    bottom: clamp(18px, 1.5vw, 30px);
    width: clamp(900px, 49vw, 1120px);
  }

  /* .top-hero__copy {
    left: calc(50% + 120px);
    width: min(34vw, 600px);
  } */
}

.top-blue-block {
  overflow: hidden;
  background: url("../img/blue_bg.png") center / cover repeat;
}

.top-works {
  padding: 168px 0;
}

.top-works__stage {
  position: relative;
  z-index: 3;
  width: calc(100vw + 160px);
  max-width: none;
  margin: 40px 0 0 50%;
  overflow: hidden;
  transform: translateX(-50%);
}

.top-works__rail {
  display: grid;
  grid-auto-columns: clamp(320px, 31vw, 420px);
  grid-auto-flow: column;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scroll-padding-inline: 0;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}

.top-works__rail::-webkit-scrollbar {
  display: none;
}

.top-works-card {
  min-width: 0;
}

.top-works-card__img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid #1d1717;
  border-radius: 8px;
  background: #fff;
}

.top-works-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-works-card__title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.top-works-card__text {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.top-works-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.top-works-card__external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-works-card__external--official {
  color: var(--color-blue);
}

.top-works-card__external--youtube {
  color: var(--color-red);
}

.top-works-card__external::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: currentColor;
  mask: url("../img/icon-link-blue.svg") center / contain no-repeat;
}

.top-works-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.top-works-card__cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 12px;
  border-radius: 4px;
  color: #fff;
  background: var(--color-pink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.top-works__arrow {
  position: absolute;
  top: 27%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 2px solid #d8d8d8;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.top-works__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #4a4a4a;
  border-right: 2px solid #4a4a4a;
}

.top-works__arrow--prev {
  left: calc((100% - 100vw) / 2 + 24px);
}

.top-works__arrow--prev::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.top-works__arrow--next {
  right: calc((100% - 100vw) / 2 + 24px);
}

.top-works__arrow--next::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.top-about {
  padding: 64px 0;
  overflow: hidden;
}

/* .top-about::before,
.top-about::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: 2;
  width: max(112vw, 1580px);
  height: clamp(92px, 8.2vw, 132px);
  transform: translateX(-50%);
  pointer-events: none;
  background: url("../img/service-blue-cloud.png") center / 100% 100% no-repeat;
} */

/* .top-about::before {
  top: -2px;
}

.top-about::after {
  bottom: -2px;
  transform: translateX(-50%) rotate(180deg);
} */

.top-about__inner,
.top-service__inner {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 32px 0;
  align-items: center;
}

.top-about__character {
  display: block;
  width: min(440px, 100%);
  height: auto;
}

.top-about__lead {
  margin-top: 18px;
  line-height: 1.75;
}

.top-about__text {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 2;
}

.top-about__buttons,
.top-recruit__buttons {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
}

.top-service {
  padding: 168px 0;
}

.top-service__inner {
  grid-template-columns: 1fr 0.8fr;
}

.top-service__text {
  margin-top: 18px;
  line-height: 2.1;
}

.top-service__button {
  display: flex;
  justify-content: flex-start;
  margin-top: 28px;
}

.top-service__character {
  display: block;
  justify-self: end;
  width: min(440px, 100%);
  height: auto;
}

.top-topics {
  padding: clamp(94px, 7vw, 112px) 0 clamp(108px, 8vw, 132px);
}

.top-news-board,
.top-facebook-card {
  border: 2px solid #1d1717;
  border-radius: 8px;
  background: #fff;
}

.top-news-board {
  display: grid;
  grid-template-columns: 112px 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 24px 30px;
}


.top-news-board--note {
  position: relative;
  display: flex;
  flex-direction: column;
}

.top-news-board--note .top-news-board__head {
  position: absolute;
  top: 24px;
  left: 30px;
  z-index: 1;
}

.top-news-board--note .top-note-guide {
  width: 100%;
  flex: 1;
}

.top-topics__subgrid {
  --top-facebook-frame-height: 480px;
  --top-facebook-padding-y: 16px;
  --top-card-border-y: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 28px;
  align-items: start;
}

.top-topics__posts {
  display: grid;
  gap: 28px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: calc(var(--top-facebook-frame-height) + (var(--top-facebook-padding-y) * 2) + var(--top-card-border-y));
}

.top-news-board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--color-blue);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.top-news-board__label {
  color: var(--color-blue);
}

.top-news-board__list {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  gap: 0;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-news-line {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #b8b8b8;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.top-news-line:last-child {
  border-bottom: 0;
}

.top-news-line--empty {
  grid-template-columns: 1fr;
}

.top-news-line time {
  color: #777;
  font-size: 13px;
}

.top-news-line a {
  color: #1d1717;
  text-decoration: none;
}

.top-news-line__title {
  display: block;
  margin: 0;
  font-size: 16px;
}

.top-news-board__more {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  margin-top: 8px;
  color: #1d1717;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.top-note-guide {
  grid-column: 1 / -1;
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  height: 100%;
  min-height: 230px;
  text-align: center;
}

.top-note-guide__logo {
  display: block;
  width: 100px;
  height: auto;
}

.top-note-guide__text {
  align-self: start;
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.9;
  text-align: left;
}

.top-note-guide__link {
  grid-row: 3;
  align-self: start;
  margin-top: 22px;
  color: #1d1717;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.top-facebook-card {
  display: flex;
  flex-direction: column;
  padding: var(--top-facebook-padding-y) 26px;
}

.top-facebook-card__body {
  flex: 0 0 auto;
  overflow: hidden;
  width: 100%;
  margin-top: 0;
  background: transparent;
}

.top-facebook-card__iframe {
  display: block;
  width: 100%;
  height: 480px;
  max-width: 420px;
  margin: 0 auto;
}

.top-facebook-card__iframe--narrow {
  display: none;
}

.top-topics__character {
  position: absolute;
  right: 5%;
  top: -90px;
  z-index: -1;
  width: 168px;
  pointer-events: none;
}

.top-recruit {
  /* width: min(1280px, calc(100% - 48px)); */
  position: relative;
  z-index: 4;
  margin: 0 auto;
  padding: 80px 0 160px;
  overflow: hidden;
  border-radius: 58px 58px 0 0;
  background: linear-gradient(180deg, #ff8080 0%, #ff9a9a 100%);
}

.top-recruit .top-cloud--top {
  top: auto;
  bottom: -2px;
  transform: translateX(-50%) rotate(180deg);
  z-index: 4;
}

.top-recruit__content {
  max-width: 680px;
  color: #fff;
}

.top-recruit__text {
  margin-top: 18px;
  line-height: 1.8;
}

.top-recruit__character {
  position: absolute;
  right: -60px;
  bottom: -120px;
  display: block;
  max-width: 300px;
  height: auto;
}


@media (max-width: 1180px) and (min-width: 1025px) {
  .top-facebook-card__iframe--desktop {
    display: none;
  }

  .top-facebook-card__iframe--narrow {
    display: block;
    height: 480px;
    max-width: 300px;
  }
}

@media (max-width: 1100px) {
  .top-hero::before {
    width: max(118vw, 1200px);
  }

  /* .top-hero__media {
    top: 0;
    bottom: auto;
    width: calc(100% + 680px);
  } */

  /* .top-hero__characters {
    left: -34px;
    bottom: 22px;
    width: min(74vw, 760px);
  } */

  /* .top-hero__copy {
    left: calc(50% + 72px);
    width: min(43vw, 500px);
  } */
}

@media (max-width: 1024px) {
  .top-news-board,
  .top-topics__subgrid {
    grid-template-columns: 1fr;
  }

  .top-topics__posts {
    grid-template-rows: auto;
    height: auto;
  }

  .top-news-board {
    grid-template-rows: auto;
  }

  .top-news-board__list,
  .top-news-board__more {
    grid-column: 1;
    grid-row: auto;
  }

  .top-note-guide {
    grid-column: 1;
    grid-row: auto;
  }


  .top-facebook-card__iframe--desktop {
    display: none;
  }

  .top-facebook-card__iframe--narrow {
    display: block;
    height: 480px;
    max-width: 300px;
  }
}

@media (max-width: 900px) {
  .top-hero {
    min-height: 600px;
  }

  .top-hero::before {
    top: -20px;
    width: max(155vw, 1040px);
  }

  .top-hero__media {
    top: 0;
    bottom: auto;
    width: calc(100% + 680px);
  }

  .top-hero__characters {
    left: 0px;
    bottom: 0;
    width: 600px;
    max-width: none;
  }

  .top-hero__copy {
    top: 40%;
    /* left: auto;
    right: 24px;
    width: 52%;
    max-width: none; */
  }

  .top-about__inner,
  .top-service__inner {
    grid-template-columns: 1fr;
  }

  .top-about__character,
  .top-service__character {
    width: min(320px, 72vw);
    margin: 0 auto;
  }

  .top-service__character {
    order: -1;
    justify-self: center;
  }

  .top-service__button,
  .top-about__buttons,
  .top-recruit__buttons {
    /* justify-content: center; */
    justify-content: flex-start;
  }

  .top-news-board {
    gap: 8px;
    padding: 22px 20px;
  }

  .top-news-line {
    grid-template-columns: 1fr;
    gap: 3px;
    align-items: start;
    min-height: 0;
    padding: 10px 0;
  }

  .top-recruit {
    padding-bottom: 220px;
  }

  .top-recruit__character {
    width: 260px;
    bottom: -190px;
  }
}

@media (max-width: 768px) {
  .top-section__inner,
  .top-about__inner,
  .top-service__inner,
  .top-topics__inner,
  .top-recruit__inner {
    width: min(100% - 32px, 520px);
  }

  /* .top-cloud,
  .top-about::before,
  .top-about::after {
    width: max(170vw, 920px);
  } */

  .top-cloud,
  .contact-mini::before{
    width: max(170vw, 920px);
  }

  .top-page .contact-mini::before {
    width: max(170vw, 920px);
  }

  .top-hero {
    min-height: 600px;
  }

  .top-hero::before {
    width: max(190vw, 900px);
  }

  .top-hero__media {
    top: 0;
    bottom: auto;
    width: calc(100% + 780px);
  }

  .top-hero__characters {
    /* left: -164px; */
    bottom: 0px;
    /* width: 660px; */
  }

  /* .top-hero__copy {
    top: 39%;
    right: 22px;
    width: 60%;
    max-width: none;
  } */

  .top-works__stage {
    width: calc(100vw + 48px);
  }

  .top-works__rail {
    grid-auto-columns: minmax(260px, 78vw);
    gap: 18px;
    padding-inline: 0;
    scroll-padding-inline: 0;
  }

  .top-works__arrow {
    top: 29%;
    width: 40px;
    height: 40px;
  }

  .top-works__arrow::before {
    width: 9px;
    height: 9px;
  }

  .top-works__arrow--prev {
    left: calc((100% - 100vw) / 2 + 8px);
  }

  .top-works__arrow--next {
    right: calc((100% - 100vw) / 2 + 8px);
  }

  .top-news-board {
    grid-template-rows: auto;
    gap: 8px;
    padding: 22px 20px;
  }

  .top-news-board__list,
  .top-news-board__more {
    grid-column: 1;
    grid-row: auto;
  }

  .top-news-line {
    grid-template-columns: 1fr;
    gap: 3px;
    align-items: start;
    min-height: 0;
    padding: 10px 0;
  }

  .top-recruit {
    width: 100%;
    border-radius: 40px 40px 0 0;
  }

  .top-recruit__content {
    max-width: 100%;
    padding-right: 94px;
  }

  .top-recruit__character {
    right: -120px;
  }

}

@media (max-width: 520px) {
  .top-page section:not(.contact-mini) .c-btn:not(.c-btn--solid-dark) {
    min-width: 142px;
  }

  .top-hero {
    min-height: 540px;
  }

  .top-hero__media {
    top: 0;
    bottom: auto;
    width: calc(100% + 900px);
  }

  .top-hero__characters {
    left: -16px;
    bottom: 0;
    width: 400px;
  }

  .top-hero__copy {
    top: 45%;
    right: 5px;
    width: 90%;
    max-width: none;
  }

  .top-hero__title {
    font-size: 32px;
  }

  .top-hero__lead {
    font-size: 18px;
  }

  .top-about__lead {
    font-size: 22px;
  }

  .top-about__text,
  .top-service__text {
    font-size: 14px;
  }

  /* .top-topics__character {
    top: -44px;
    right: -10px;
    width: 110px;
  } */

  .top-facebook-card__iframe--narrow {
    height: 420px;
  }

  .top-recruit__content {
    padding-right: 0;
  }

  .top-recruit__character {
    right: -20px;
    width: 200px;
    bottom: -180px;
  }
}
