*,
*::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(--snow);
  background-image: var(--paper-beige);
  letter-spacing: 0.12em;
  font-weight: 500;
}

#root {
  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%;
  }
  &.thumbnail--1x1 {
    padding-top: 100%;
  }

  & 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;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
  background-image: var(--paper-beige);
  border-radius: 0.75rem;
  @media (min-width: 768px) {
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
  
  &.page-hero--subpage {
    @media (min-width: 768px) {
      padding-bottom: 1rem;
    }
  }
  
  & .page-hero__title {
    line-height: 1;
    letter-spacing: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    @media (min-width: 768px) {
      font-size: 3.5rem;
    }
    @media (min-width: 1024px) {
      font-size: 4.5rem;
    }
    @media (min-width: 1200px) {
      font-size: 5rem;
    }
  }
  
  & .page-hero__marquee-container {
    overflow: auto;
    display: flex;
    gap: 0.5rem;
    & .page-hero__marquee-content {
      will-change: transform;
      display: flex;
      align-items: center;
      flex-shrink: 0;
      gap: 0.5rem;
      animation: scroll-left 30s linear infinite;
      white-space: nowrap;
      letter-spacing: 0;
      font-family: var(--font-serif);
      font-weight: 700;
      font-size: 0.625rem;
      & img {
        height: 0.75rem;
      }
    }
    @media (min-width: 768px) {
      gap: 1rem;
      & .page-hero__marquee-content {
        gap: 1rem;
        animation-duration: 50s;
        font-size: 1.5rem;
        & img {
          height: 2rem;
        }
      }
    }
    @media (min-width: 1024px) {
      gap: 1.5rem;
      & .page-hero__marquee-content {
        gap: 1.5rem;
        animation-duration: 80s;
        font-size: 2rem;
        & img {
          height: 3rem;
        }
      }
    }
  }
  
  & .page-hero__typo-image {
    margin-left: auto;
    margin-right: auto;
    width: 18.75rem;
    @media (min-width: 768px) {
      width: 30rem;
    }
    @media (min-width: 1024px) {
      width: 40rem;
    }
    @media (min-width: 1200px) {
      width: 57.1875rem;
    }
  }
}

.listen-for-now-cards {
  counter-reset: card-num;
  @media (min-width: 1024px) {
    max-width: 50rem;
  }
  @media (min-width: 1200px) {
    max-width: 75rem;
  }
}
.listen-for-now-card {
  counter-increment: card-num;
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
  @media (min-width: 1200px) {
    &:nth-child(even) {
      align-items: end;
    }
  }
  
  & .listen-for-now-card__illust {
    width: 100%;
    max-width: 30rem;
    margin-left: auto;
    margin-right: auto;
    animation: permanent-swing 2s infinite;
    transform-origin: center center;
    will-change: transform;
    display: inline-block;
    @media (min-width: 1200px) {
      position: absolute;
      &.listen-for-now-card__illust--1 {
        width: 28rem;
        top: -2.375rem;
        right: -2.375rem;
        z-index: 2;
      }
      &.listen-for-now-card__illust--2 {
        width: 31.125rem;
        top: -3.75rem;
        left: -7.75rem;
        animation-delay: 500ms;
      }
      &.listen-for-now-card__illust--3 {
        width: 30.5625rem;
        top: -1.875rem;
        right: -6.875rem;
      }
      &.listen-for-now-card__illust--4 {
        width: 32.8125rem;
        top: -3rem;
        left: -10.125rem;
        animation-delay: 500ms;
      }
      &.listen-for-now-card__illust--5 {
        width: 29.1875rem;
        top: -2rem;
        right: -3.75rem;
      }
    }
  }
  & .listen-for-now-card__content {
    position: relative;
    background-image: var(--paper-beige);
    padding: 2rem 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    &::before {
      content: "";
      aspect-ratio: 1 / 1;
      display: block;
      width: 7.5rem;
      background-image: url(/system_panel/uploads/images/listen-for-now-card-num-dec.svg);
      background-size: 100% 100%;
      background-repeat: no-repeat;
      position: absolute;
      top: -6.25rem;;
      right: 0.25rem;
    }
    &::after {
      content: counter(card-num, decimal-leading-zero);
      line-height: 1.25rem;
      letter-spacing: -0.1em;
      font-family: var(--font-serif-2);
      font-weight: 700;
      font-size: 9rem;
      color: var(--neon-green);
      position: absolute;
      top: -5.625rem;
      right: 0;
    }
    @media (min-width: 768px) {
      padding-left: 2.5rem;
      padding-right: 2.5rem;
      &::before {
        width: 9.375rem;
        right: -0.75rem;
      }
    }
    @media (min-width: 1200px) {
      padding: 3rem 3.75rem 3rem 5rem;
      &::before {
        top: -3.75rem;
        right: auto;
        left: -4.25rem;
      }
      &::after {
        top: -2.875rem;
        right: auto;
        left: -4.5rem;
      }
    }
  }
  @media (min-width: 1200px) {
    &:nth-child(even) .listen-for-now-card__content {
      &::before {
        width: 7.1875rem;
        top: -2.5rem;
        left: -3.25rem;
      }
      &::after {
        top: -2.625rem;
      }
    }
  }
}

.listen-for-now-typo-image {
  width: 21.25rem;
  margin-left: auto;
  margin-right: auto;
  @media (min-width: 768px) {
    width: 40rem;
  }
  @media (min-width: 1024px) {
    width: 45rem;
  }
  @media (min-width: 1200px) {
    width: 54.125rem;
  } 
}

.footer-illust {
  width: 137.6%;
  & img {
    width: 100%;
  }
  @media (min-width: 1200px) {
    width: 163.125%;
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem 0.75rem 1.75rem;
  border-radius: 9999px;
  background-color: var(--snow);
  color: hsl(0deg 0% 0%);
  box-shadow: var(--card-shadow);
  border: 2px solid var(--ink);
  line-height: 1.25;
  letter-spacing: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  transition: all ease 200ms;
  &::after {
    content: "";
    aspect-ratio: 11 / 6;
    width: 1.875rem;
    background-image: url(/system_panel/uploads/images/pointing-right.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &:hover {
    text-decoration: none;
    color: hsl(0deg 0% 0%);
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 0 #3C3133;
  }
  @media (min-width: 768px) {
    font-size: 1.25rem;
    &::after {
      width: 2.25rem;
    }
  }
  @media (min-width: 1024px) {
    font-size: 1.5rem;
    &::after {
      width: 2.75rem;
    }
  }
}

.footer-logo {
  display: block;
  width: 100%;
  @media (min-width: 768px) {
    width: 45rem;
    margin-left: auto;
    margin-right: auto;
  }
  @media (min-width: 1024px) {
    width: 60rem;
  }
  @media (min-width: 1200px) {
    width: 81.375rem;
  }
}


.blog-list {  
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }
  & .webgene-item {
    container-type: inline-size;
  }
  
  & .blog-link {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-decoration: none;
    transition: all 250ms ease;
    & * {
      transition: all 250ms ease;
    }
    
    & .thumbnail {
      border: 4px solid var(--ink);
    }
    
    & .contents {
      border: 4px solid var(--ink);
      padding: 1.5rem 1.5rem 1rem;
      background-color: var(--snow);
      display: flex;
      flex-direction: column;
      position: relative;
      gap: 0.75rem;
    }
    
    & .category {
      background: var(--noise-neon-green);
      padding: 0.375rem 0.875rem;
      line-height: 1.25;
      font-size: 1.125rem;
      font-family: var(--font-zen);
      border: 1px solid var(--ink);
      box-shadow: 2px 2px 0 var(--ink);
      position: absolute;
      top: -1.25rem;
      left: -1.25rem;
      letter-spacing: 0;
    }
    
    & .title {
      letter-spacing: 0;
      font-weight: 900;
      font-size: 1rem;
      line-height: 1.25;
      font-feature-settings: "palt";
    }
    & .summary {
      font-size: 0.75rem;
      font-weight: 500;
      line-height: 1.8;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
    
    @media (min-width: 768px) {
      & .title {
        font-size: 1.25rem;
      }
      & .summary {
        font-size: 0.875rem;
      }
    }
    @media (min-width: 1024px) {
      & .title {
        font-size: 1.5rem;
      }
      & .summary {
        font-size: 1.125rem;
      }
    }
    
    @container (min-width: 1024px) {
      flex-direction: row;
      align-items: center;
      
      & .thumbnail-wrapper {
        width: 20rem;
      }
      & .contents {
        flex: 1 0 0%;
      }
    }
    
    &:hover {
      opacity: 0.85;
      & .thumbnail {
        transform: rotate(3deg);
      }
      
      & .category {
        transform: rotate(-2deg);
      }
    }
  }
}

.category-select {
  & select {
    background: none;
    border: none;
    outline: none;
  }
}

.page-pagination {
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  
  & .webgene-pagination li a {
    width: unset;
    height: unset;
  }
}

.about-bg-dec {
  position: absolute;
  & img {
    width: 100%;
  }
  &.about-bg-dec--1 {
    width: clamp(40rem, 82.9375%, 82.9375rem);
    top: -0.625rem;
    left: 0;
    transform: translateX(-35.418236624%);
  }
  &.about-bg-dec--2 {
    width: clamp(20rem, 35%, 35rem);
    top: 50%;
    right: 0;
    transform: translate(23.5714285714%, -24.8236953456%);
  }
  &.about-bg-dec--3{
    width: clamp(15rem, 29.3125%, 29.3125rem);
    bottom: -1rem;
    left: 0;
    transform: translateX(-12.7931769723%);
  }
}


.social-links {
  display: flex;
  align-items: cneter;
  gap: 0.75rem;
  
  & a {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    transition: opacity 200ms ease;
    
    &:hover {
      opacity: 1;
    }
  }
}

.article-header {
  & .webgene-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  & .title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 900;
    font-feature-settings: "palt";
    letter-spacing: 0;
    
    @media (min-width: 768px) {
      font-size: 1.75rem;
    }
    @media (min-width: 1200px) {
      font-size: 2rem;
    }
  }
}

.article-image {
  @media (min-width: 1200px) {
    position: sticky;
    top: 10rem;
  }
  & .item-image {
    border: 4px solid var(--ink);
    
    & img {
      aspect-ratio: 16 / 9;
      object-fit: cover;
    }
  }
}

.footer-sns-links {
  & img {
    width: 1.75rem;
  }
}


