*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

html {
  /* 最小値13pxを保証し、1200px未満では最大22pxまでフォントサイズが流動する */
  font-size: clamp(13px, var(--font-size-base), 22px);

  @media screen and (min-width: 1200px) {
    font-size: clamp(0.1rem, var(--font-size-base), 24px);
  }
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--ivory);
  letter-spacing: 0.04em;
  font-weight: 500;
}

#root {
  max-width: 1920px;
  margin: 0 auto;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: inherit;
}

img, iframe {
  max-width: 100%;
}
iframe {
  border: none;
  box-shadow: none;
}

a, a:hover {
  color: var(--ink);
}

[id] {
  scroll-margin-top: 3.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button {
  position: relative;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  border: 0;
  outline: none;
  background: none;
  padding: 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.5rem;
  list-style: disc outside none;

  & > p {
    margin: 0;
    display: list-item;
  }
}

.webgene-pagination {
  & ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0;
    margin: 0;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          &:hover {}
        }
      }
    }
  }
}

.webgene-no-items {
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
}

.thumbnail {
  position: relative;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }

  & img,
  &:empty::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &:empty::before {
    content: "";
    background-image: url("/system_panel/uploads/images/ogp.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }
}

.article-body {
  & > p {
    margin: 1em 0;
  }

  & > h1,
  & > h2,
  & > h3,
  & > h4,
  & > h5,
  & > h6 {
    margin: 2em 0 1em;
  }

  & > *:first-child {
    margin-top: 0;
  }

  & > *:last-child {
    margin-bottom: 0;
  }

  & a,
  & a:hover {
    color: var(--blue);
    text-decoration: underline;
  }
}

.backdrop-object {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.__mat.__mat--processed {
  word-break: keep-all;
  word-wrap: break-word;
}

.page-hero {
  position: relative;
  height: 20rem;
  @media screen and (min-width: 768px) {
    padding: 1.5rem 2.5rem 0;
    height: 25rem;
  }
  @media screen and (min-width: 1024px) {
    padding: 2rem 3.75rem 0;
  }
  @media screen and (min-width: 1200px) {
    padding: 3rem 5rem 0;
    height: auto;
  }
  & .page-hero__container {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    width: 100%;
    height: 100%;
    @media screen and (min-width: 1200px) {
      height: auto;
    }
    & .page-hero__image {
      position: relative;
      width: 100%;
      height: 100%;
      @media screen and (min-width: 1200px) {
        height: auto;
        aspect-ratio: 4 / 1;
      }
    }
    & .page-hero__title {
      position: absolute;
      inset: auto 0.625rem 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.625rem;
      border-radius: 1rem;
      padding: 1rem 1.25rem 1.5rem;
      background: url(/system_panel/uploads/images/gear--page-hero.png), var(--grad-cobalt);
      background-size: cover;
      color: var(--snow);
      max-width: 37.5rem;
      @media screen and (min-width: 768px) {
        right: auto;
        left: 1.25rem;
      }
      & .page-hero__title-main {
        line-height: 1.25;
        font-weight: 700;
        font-size: 1.5rem;
        text-align: center;
        @media screen and (min-width: 768px) {
          font-size: 2rem;
        }
        @media screen and (min-width: 1024px) {
          font-size: 2.5rem;
        }
      }
      & .page-hero__title-sub {
        line-height: 1.8;
        font-size: 0.875rem;
      }
    }
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  &::before {
    content: "";
    display: block;
    background-image: url(/system_panel/uploads/images/firework.svg);
    background-repeat: no-repeat;
    background-size: auto 100%;
    align-self: center;
    height: 2.6875rem;
    width: 5rem;
    @media screen and (min-width: 768px) {
      height: 4rem;
      width: 7.5rem;
    }
    @media screen and (min-width: 1024px) {
      height: 5.3125rem;
      width: 10rem;
    }
  }
  & .section-title__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--snow);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    & .section-title__sub {
      border-radius: 9999px;
      background-color: var(--cobalt);
      padding: 0.25rem 1.25rem 0;
      z-index: 1;
    }
    & .section-title__main {
      border-radius: 9999px;
      background-color: var(--cobalt);
      padding: 0.75rem 1rem 0.5rem;
      margin-top: -0.625rem;
      min-width: 12.5rem;
      @media screen and (min-width: 768px) {
        padding: 1rem 1.25rem 0.5rem;
        margin-top: -1rem;
        min-width: 17.5rem;
      }
      @media screen and (min-width: 1024px) {
        padding: 1rem 1.5rem 0.75rem;
      }
    }
  }
  &.section-title--start {
    @media screen and (min-width: 768px) {
      & .section-title__content {
      	align-items: start;
        & .section-title__sub {
          margin-left: 2rem;
        }
      }
    }
  }
  &.section-title--no-firework::before {
    content: none;
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  
  gap: 0.5rem;
  padding: 0.625rem 1.125rem 0.625rem 1.25rem;
  border-radius: 9999px;
  line-height: 1;
  letter-spacing: 0.04em;
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--snow);
  background-color: var(--cobalt);
  transition: all ease 200ms;
  &::after {
    content: "";
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    background-image: url(/system_panel/uploads/images/circle-arrow-down-01.svg);
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  &:hover {
    opacity: 90%;
    transform: scale(0.95);
    color: var(--snow);
    text-decoration: none;
  }
  &.button--red {
    background-color: var(--red);
  }
  &.button--snow-red {
    background-color: var(--snow);
    & > p {
      color: var(--red) !important;
    }
    &::after {
      background-image: url(/system_panel/uploads/images/circle-arrow-down-red.svg);
    }
  }
  &.button--snow-cobalt {
    background-color: var(--snow);
    & > p {
      color: var(--cobalt) !important;
    }
    &::after {
      background-image: url(/system_panel/uploads/images/circle-arrow-down-cobalt.svg);
    }
  }
  &.button--no-icon {
    padding-right: 1.25rem;
    &::after {
      content: none;
    }
  }
  &.button--icon-left {
    padding-right: 1.25rem;
    padding-left: 1.125rem;
    &::after {
      content: none;
    }
  }
}

.outside-border {
  box-shadow: 0 0 0 8px hsl(from var(--cobalt) h s l / 40%);
  &.outside-border--snow {
    box-shadow: 0 0 0 8px hsl(from var(--snow) h s l / 40%);
  }
  &.outside-border--red {
    box-shadow: 0 0 0 8px hsl(from var(--red) h s l / 15%);
  }
}

.border-text {
  position: relative;
  & > p {
    position: relative;
  }
  &::before {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background-color: hsl(from var(--cobalt) h s l / 20%);
  }
  &.border-text--wide::before {
    height: 0.75rem;
    bottom: 0.25rem;
  }
  &.border-text--snow::before {
    background-color: hsl(from var(--snow) h s l / 34%);
  }
}

.surprise-lines {
  display: flex;
  justify-content: center;
  align-items: center;
  &::before, &::after {
    content: "";
    display: block;
    width: 1.5rem;
    height: 2.0625rem;
    background-image: url(/system_panel/uploads/images/surprise-line.svg);
    background-repeat: no-repeat;
    background-size: auto 100%;
    @media screen and (min-width: 768px) {
      width: 2rem;
      height: 2.6875rem;
    }
    @media screen and (min-width: 1024px) {
      width: 2.5rem;
      height: 3.4375rem;
    }
  }
  &::after {
    transform: scaleX(-1);
  }
}

.footer-contact-bubble {
  position: absolute;
  bottom: 0.5rem;
  left: -5.75rem;
  width: 5rem;
  @media screen and (min-width: 768px) {
    left: -7rem;
    width: 6.25rem;
  }
}


.bubble-frame {
  position: relative;
  &::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.9375rem;
    height: 0.8125rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
  
  &.bubble-frame--cobalt {
    &::after {
      background-image: url("/system_panel/uploads/images/arrow-down-cobalt.svg");
    }
  }
  &.bubble-frame--red {
    &::after {
      background-image: url("/system_panel/uploads/images/arrow-down-red.svg");
    }
  }
  &.bubble-frame--reverse {
    &::after {
      top: -0.5rem;
      bottom: auto;
      transform: translateX(-50%) scaleY(-1);
    }
  }
}

.patent-number-bubble {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, calc(100% + 1rem));
  padding: 0.5rem 1.125rem;
  background-color: var(--red);
  color: var(--snow);
  line-height: 1.25;
  font-size: 1rem;
  border-radius: 9999px;
  @media screen and (min-width: 768px) {
    left: 2rem;
    transform: translateY(calc(100% + 1.5rem));
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
  }
  @media screen and (min-width: 1024px) {
    font-size: 1.25rem;
  }
}

.filtered-image {
  & img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background-color: hsl(0 0 0 / 40%);
    pointer-events: none;
  }
}
.patent-merits {
  counter-reset: merit-num 0;
  & .patent-merit-last-container {
    @media screen and (min-width: 1200px) {
      grid-column: 1 / span 3;
    }
    & .patent-merit {
      max-width: 45rem;
      width: 100%;
      margin-right: auto;
      margin-left: auto;
      @media screen and (min-width: 1200px) {
        flex-direction: row;
        align-items: center;
      }
    }
  }
}
.patent-merit {
  counter-increment: merit-num 1;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 2rem 1rem;
  background: url(/system_panel/uploads/images/gear--page-hero.png), var(--grad-cobalt);
  border-radius: 1rem;
  @media screen and (min-width: 768px) {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
  & .patent-merit__bubble {
    position: absolute;
    top: 0;
    left: -0.625rem;
    transform: translateY(-80%);
    width: 6.25rem;
    height: 6.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    & > div::after {
      content: counter(merit-num, decimal-leading-zero);
      display: block;
      position: relative;
      color: var(--logo-sky);
      letter-spacing: -0.04em;
      font-style: italic;
      font-weight: 900;
      font-size: 2rem;
    }
  }
}

.bg-gear {
  background: url(/system_panel/uploads/images/gear--page-hero.png), var(--grad-cobalt);
  background-size: cover;
  &.bg-gear--red {
    background: url(/system_panel/uploads/images/gear--page-hero.png), var(--grad-red);
  }
}








