@layer components {

  /* ----------------------------------------
     1. .inner
  ---------------------------------------- */
  .inner {
    width: 100%;
  }

  /* ----------------------------------------
     2. .container
  ---------------------------------------- */
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;

    @media (max-width: 768px) {
      padding-inline: 20px;
    }
  }

  /* ----------------------------------------
     3. .title
  ---------------------------------------- */
  .title {
    font-size: var(--text-title);
    font-family: var(--font-en);
    color: var(--color-muted);
    font-weight: 400;
    width: fit-content;
    line-height: 0.74;

    @media (max-width: 768px) {
      font-size: 2.5rem;
    }
  }

  /* ----------------------------------------
     4. .ja-title
  ---------------------------------------- */
  .ja-title {
    margin-top: 16px;
    font-size: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 24px;
    line-height: var(--leading-160);

    &::before {
      content: '';
      display: block;
      width: 80px;
      height: 1px;
      background-color: var(--color);
      flex-shrink: 0;
    }

    @media (max-width: 768px) {
      font-size: var(--text-base);
      gap: 16px;

      &::before {
        width: 48px;
      }
    }
  }

  /* ----------------------------------------
     5. .sub-title
  ---------------------------------------- */
  .sub-title {
    font-size: var(--text-medium);
  }

  /* ----------------------------------------
     6. .line
  ---------------------------------------- */
  .line {
    display: block;
    margin: 24px auto;
    width: 40px;
    height: 1px;
    background-color: var(--color);

    @media (max-width: 768px) {
      margin: 20px auto;
    }
  }

  /* ----------------------------------------
     7. .long-arrow
  ---------------------------------------- */
  .long-arrow {
    border: 1px solid var(--color);
    border-radius: var(--radius-btn);
    display: flex;
    width: 100%;
    max-width: 320px;
    padding: 8px 32px;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    color: var(--color);
    position: relative;
    z-index: 1;
    line-height: var(--leading-140);
    margin: 0 auto;

    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background-color: var(--color-main);
      opacity: 0;
      scale: 0.9;
      border-radius: var(--radius-btn-inner);
      z-index: -1;
      transition:
        opacity var(--duration-base) var(--ease-btn),
        scale var(--duration-base) var(--ease-btn);
    }

    &:hover::before {
      scale: 1;
      opacity: 1;
    }

    &:hover .btn-text span {
      color: var(--color-white);
    }

    &:hover .btn-arrow path {
      stroke: var(--color-white);
    }

    /* .reverse バリエーション */
    &.reverse {
      border-color: var(--color-white);
      color: var(--color-white);

      &::before {
        background-color: var(--color-white);
      }

      &:hover .btn-text span {
        color: var(--color);
      }

      &:hover .btn-arrow path {
        stroke: var(--color);
      }
    }

    /* 矢印のみ左向き（一覧へ戻るなど。ホバーは .long-arrow 共通） */
    &.long-arrow--back .btn-arrow {
      transform: scaleX(-1);
    }

    @media (max-width: 768px) {
      font-size: var(--text-small);
    }
  }

  /* ----------------------------------------
     8. .btn-text
  ---------------------------------------- */
  @keyframes text-anim {
    0%   { translate: 0 100%; }
    100% { translate: 0 0; }
  }

  .btn-text {
    height: 48px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
  }

  .btn-text span:nth-child(1) {
    display: block;
    transform: translate(0, 0);
  }

  .btn-text span:nth-child(2) {
    display: block;
    position: absolute;
    top: 50%;
    transform: translate(0, 0);
    opacity: 0;
  }

  .long-arrow:hover .btn-text span:nth-child(1) {
    animation: text-anim var(--duration-base) var(--ease-btn);
  }

  .long-arrow:hover .btn-text span:nth-child(2) {
    opacity: 0.4;
    transform: translate(0, -300%);
    transition: transform var(--duration-slow) var(--ease-btn);
  }

  /* ----------------------------------------
     9. .short-arrow
  ---------------------------------------- */
  .short-arrow {
    display: flex;
    align-items: start;
    justify-content: space-between;
    width: 100%;
    border: none;
    gap: 24px;
    position: relative;
    transition: color var(--duration-base) ease;

    &::after {
      content: '';
      width: 32px;
      height: 32px;
      background: url('../icon/icon_short_arrow.svg') 8px 8px no-repeat;
      border-radius: 50%;
      border: 1px solid var(--color);
      flex-shrink: 0;
    }
  }

  /* ----------------------------------------
     10. .on-top
  ---------------------------------------- */
  .on-top {
    position: fixed;
    bottom: 56px;
    right: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: rotate(90deg) translate(0, 100%);
    transform-origin: bottom right;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) ease, visibility var(--duration-base) ease;
    z-index: 10;
    cursor: pointer;
    text-decoration: none;

    &::before {
      content: '';
      display: block;
      width: 53px;
      height: 16px;
      background: url('../icon/icon_long_arrow.svg') no-repeat;
      background-position: bottom;
      transform: rotate(0deg) scaleX(-1);
    }

    &.visible {
      opacity: 1;
      visibility: visible;
    }

    &:hover {
      opacity: 0.8;
      transform: rotate(90deg) translate(-20px, 100%);
      transition: transform var(--duration-base) ease, opacity var(--duration-base) ease;
    }

    @media (max-width: 768px) {
      bottom: 32px;
      right: 24px;
      gap: 16px;
    }
  }

}
