@charset "UTF-8";

/* Post Contents
============================================================================= */

/* area default */
.cwwl_contents {
  --cwwl-mt: 8.0rem; /* layout default margin */

  @media (width <= 640px) {
    --cwwl-mt: 5.6rem; /* layout default margin */
  }

  /* youtube */
  span[data-mce-p-src*=youtube] {
    display: block;
    width: 100%;
  }
  iframe[src*=youtube] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  /* h2-4 tag setting */
  :is(h2,h3,h4):first-child {
    margin-top: 0;
  }
  :is(h2,h3,h4) {
    font-feature-settings: "palt" 0;
    font-family: var(--ff-ten);
    font-weight: 500;
  }
  :is(h2,h3,h4) + :is(ul,ol,blockquote,._cww-layout) {
    margin-top: 0 !important;
  }

  /* h2 */
  h2 {
    margin-block: 8.0rem 2.4rem;
    padding-block: 1.0rem;
    border-bottom: 1px solid;
    font-family: var(--ff-serif);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: .16em;

    @media (width <= 640px) {
      margin-block: 6.4rem 1.6rem;
      font-size: 1.7rem;
    }
  }

  /* h3 */
  h3 {
    margin-block: 8.0rem 2.4rem;
    font-family: var(--ff-serif);
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: .16em;

    @media (width <= 640px) {
      margin-block: 5.6rem 1.6rem;
      font-size: 1.6rem;
    }
  }

  /* h4 */
  h4 {
    margin-block: 8.0rem 2.4rem;
    font-family: var(--ff-serif);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: .16em;

    @media (width <= 640px) {
      margin-block: 5.6rem 1.6rem;
      font-size: 1.5rem;
    }
  }

  /* img setting */
  img {
    display: block;
    max-width: 100%;
    height: auto;

    &.aligncenter {
      margin-inline: auto;
    }
    &.alignright  {
      margin-left: auto;
    }
  }
  p:not([class]) > img {
    display: block;
  }

  /* width 指定画像（インラインstyle） */
  img[style*="--cww-iw"] {
    width: calc(var(--cww-iw) * 0.1rem);

    @media (width <= 640px) {
      width: calc(var(--cww-iw) * .005rem);
    }
  }

  /* a default */
  a:not(.cwwl-link-button, .cwwl-index-link, .cwwl-related-link) {
    text-decoration: underline;
    word-wrap: break-word;
    color: #888064;

    @media (hover) {
      &:hover {
        text-decoration: none;
      }
      &:hover::before {
        transform: rotate(45deg) translate(.2em,-.2em);
      }
    }
    @media (width <= 640px) {
      &::before {
        border-top-width: 1px;
        border-right-width: 1px;
      }
    }
  }

  /* blockquote */
  blockquote {
    margin-block: var(--cwwl-mt) 0;
    border: 1px solid var(--cc-gold-A);
    margin-inline: 0;
    padding: 4.0rem;
    color:var(--cc-gray_text-A);

    @media (width <= 640px) {
      padding: 3.2rem 2.4rem;
    }
  }

  /* ol & ul */
  :is(ul,ol):not([class*="cwwl-index"]) {
    margin-top: 8.0rem;
    line-height: 1.75;

    > li {
      padding-left: 2.4rem;
      position: relative;

      &:not(:first-of-type) {
        margin-top: 0.3em;
      }
    }

    @media (width <= 640px) {
      margin-top: 4.8rem;
      line-height: 1.7;

      > li {
        padding-left: 1.6rem;
      }
      > li:not(:first-of-type) {
        margin-top: 0.3em;
      }
    }
  }

  /* ol */
  ol {
    counter-reset: num;

    li::before {
      counter-increment: num;
      content: counter(num) ".";
      font-family: var(--ff-castoro);
      font-size: 1.2em;
      line-height: 1.2;
      color: var(--cc-gold-A);
      position: absolute;
      left: 0;

      @media (width <= 640px) {
        margin-top: .05em;
      }
    }
  }

  /* ul */
  ul:not([class*="cwwl-index"]) li::before {
    content: "";
    display: inline-block;
    border-radius: 50%;
    width: 0.6rem;
    height: 0.6rem;
    background-color: var(--cc-gold-A);
    position: absolute;
    top: calc(.5lh - 0.3rem);
    left: 0;

    @media (width <= 640px) {
      width: 7px;
      height: 7px;
      top: calc(.5lh - 3px);
    }
  }

  /* hr */
  hr {
    height: 0;
    margin-block: var(--cwwl-mt);
    padding: 0;
    border: 0;
    border-top: 1px solid #fff;
  }
}

/* p default margin（複数ルート） */
:is(:is(.cwwl_contents,blockquote,._cww-text) > :is(p + *:not(._cww-layout,blockquote,h2,h3,h4), *:not(h2,h3,h4) + p)) {
  margin-top: 1.2em;

  @media (width <= 640px) {
    /* sp override（必要なら記述） */
  }
}

/* 共通テキスト整形 */
:is(.cwwl_contents, blockquote, ._cww-text) > p {
  text-align: justify;
}

/* アスペクト比ユーティリティ */
._ar-auto {
  ._cww-img img {
    max-width: 100%;
    height: auto;
  }
}
:is(._ar-16_9,._ar-3_2,._ar-2_3,._ar-1_1) ._cww-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
._ar-16_9 ._cww-img img {
  aspect-ratio: 16/9;
}
._ar-3_2  ._cww-img img {
  aspect-ratio: 3/2;
}
._ar-2_3  ._cww-img img {
  aspect-ratio: 2/3;
}
._ar-1_1  ._cww-img img {
  aspect-ratio: 1/1;
}

/* Link */
.cwwl-link {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 4rem;
  justify-content: center;

  &:not(:first-child) {
    margin-top: var(--cwwl-mt);
  }
}

/* Column Layout */
.cwwl-column {
  display: flex;

  .cwwl-column-item-img img {
    width: 100%;
  }
  .cwwl-column-item-text p {
    text-align: justify;
  }

  &:not(:first-child) {
    margin-top: var(--cwwl-mt);
  }

  &._img-top:not(:has(.cwwl-column-item:nth-child(2)))._ar-auto :is(.cwwl-column-item,.cwwl-column-item-img) {
    margin-inline: auto;
    width: fit-content;
  }

  &:is(._img-left,._img-right) {
    .cwwl-column-item {
      display: flex;
    }

    &:not(.-border) {
      .cwwl-column-item-img,
      .cwwl-column-item-text {
        flex: 1;
      }
    }
  }

  &._img-right .cwwl-column-item {
    flex-direction: row-reverse;
  }

  .cwwl-column-item-text {
    color:var(--cc-gray_text-A);
    font-size:1.3rem;
    line-height:1.8;
    letter-spacing: .12em;
  }

  @media (width > 640px) {
    gap: 4rem;

    &._img-top {
      gap: 2.4rem;
    }
    &:has(.cwwl-column-item:nth-child(3)) {
      gap: 3.2rem;
    }

    &._img-top .cwwl-column-item-text {
      margin-top: 1.6rem;
    }

    .cwwl-column-item-text > :is(p,h2,h3,h4):first-child {
      margin-top: calc((1lh - 1em) * -.5);
    }

    .cwwl-column-item {
      flex: 1;
    }

    &:is(._img-left,._img-right) .cwwl-column-item {
      gap: 6rem;
    }
  }

  @media (width <= 640px) {
    &:is(._img-left,._img-right):not(.-border) .cwwl-column-item {
      flex-direction: column;
      gap: 1.6rem;
    }

    &._img-top {
      display: grid;
      gap: 3.2rem;

      .cwwl-column-item {
        display: grid;
        align-items: center;
        gap: 1.5rem;
      }

      &:has(.cwwl-column-item:nth-child(2):last-child) {

        .cwwl-column-item {
          /* grid-template-columns: 15.0rem 1fr; */
        }
      }

      &:has(.cwwl-column-item:nth-child(3):last-child) {
        gap:2.4rem;
        .cwwl-column-item {
          grid-template-columns: 13.5rem 1fr;
        }
      }
    }
  }
}

/* Table Layout */
.cwwl-table {
  margin-top: var(--cwwl-mt);
  color: var(--cc-gray_text-A);
  border-top: 1px solid var(--cc-gray_line-A);

  @media (width > 640px) {
    --tc: 32.8rem;
    display: grid;
    grid-template-columns: var(--tc) 1fr;
  }
  @media (width <= 640px) {
    font-size:1.3rem;
    line-height:1.8;
    letter-spacing: .12em;
  }

  .row {
    border-bottom: 1px solid var(--cc-gray_line-A);
    @media (width > 640px) {
      grid-column: 1 / 3;
      display: grid;
      grid-template-columns: subgrid;
    }
    @media (width <= 640px) {
      padding-block:1.6rem;
    }
  }

  :is(.h,.d) {
    /* 保持 */
  }

  .h {
    display: flex;
    align-items: center;
    padding-right: 1.6rem;

    @media (width > 640px) {
      padding-left:1.6rem;
      padding-block: 1.6rem;
    }
    @media (width <= 640px) {
      margin-bottom:.8rem;
    }
  }

  .d {
    @media (width > 640px) {
      padding-block: 1.6rem;
    }
    @media (width <= 640px) {
    }
  }
}

p strong {
  font-weight: 700;
}
