.usersvoice {
  --usersvoicecolor-gray50: rgba(108, 117, 125, 0.5);
  --usersvoicecolor-gray25: rgba(108, 117, 125, 0.25);
  --usersvoicecolor-gray15: rgba(108, 117, 125, 0.15);
  --usersvoicelistspace: 16px;
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
  &:has(.usersvoicedetail + .usersvoicelist) {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    max-width: 1600px;
    > .usersvoicelist {
      width: 25%;
      @media (max-width: 767px) {
        width: 100%;
      }
      > dt:not(.usersvoicelisttitle) {
        display: none;
      }
      > .usersvoicelisttitle {
        margin-bottom: var(--usersvoicelistspace);
        padding-bottom: var(--usersvoicelistspace);
        border-bottom: 3px solid #7964ff;
        font-size: 1.4em;
        font-weight: normal;
      }
      > .usersvoiceitem {
        > a {
          flex-direction: column;
          > :where(.usersvoicedate, .usersvoicetitle) {
            align-self: flex-start;
          }
          > .usersvoicetitle {
            font-size: 1em;
          }
        }
      }
    }
    > .usersvoicedetail {
      width: 73%;
      @media (max-width: 767px) {
        width: 100%;
      }
    }
  }
  a {
    color: #232323;
  }
  .usersvoicelist {
    > dt {
      margin-bottom: 2em;
      padding-bottom: 2em;
      border-bottom: 1px solid #ddd;
      text-align: center;
      font-weight: 400;
      font-size: 16px;
    }
    > .usersvoiceitem {
      margin-bottom: var(--usersvoicelistspace);
      padding-bottom: var(--usersvoicelistspace);
      &:not(:last-child) {
        border-bottom: 1px solid var(--usersvoicecolor-gray25);
      }
      > a {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        @media (max-width: 767px) {
          flex-direction: column;
          gap: 4px;
        }
        > .usersvoicedate {
          flex-shrink: 0;
          align-self: center;
          width: 9em;
          font-size: 0.8em;
          @media (max-width: 767px) {
            align-self: flex-start;
          }
        }
        > .usersvoicetitle {
          font-size: 1.2em;
          @media (max-width: 767px) {
            font-size: 1em;
          }
        }
      }
    }
  }
  .usersvoicedetail {
    container-type: inline-size;
    margin-bottom: 3em;
    > * {
      line-height: 1.7;
    }
    > .usersvoicetitle {
      margin-bottom: 0.5em;
      padding-bottom: 0.5em;
      border-bottom: 1px solid var(--usersvoicecolor-gray25);
      font-size: 32px;
      line-height: 1.5;
    }
    > .usersvoicedate {
      display: block;
      margin-bottom: 1em;
      text-align: right;
    }
    :where(h3, h4, h5, h6) {
      margin-top: 2em;
      margin-bottom: 1em;
      padding-left: 0.5em;
      border-left: 0.5em solid var(--usersvoicecolor-gray15);
      font-size: 1.8em !important;
    }
    h2 {
      margin-top: 2em;
      margin-bottom: 0.5em;
      font-size: 32px;
      & + h3 {
        margin-top: 1em;
      }
    }
    :where(figure) {
      margin: unset;
    }
    :where(p, ul, ol, dl, table, figure) {
      font-size: clamp(16px, 3cqw, 22px);
      margin-bottom: 0.8em;
      text-wrap: pretty;
      line-break: strict;
      @media (max-width: 767px) {
        text-wrap: unset;
      }
    }
    .usersvoiceitems {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      @media (max-width: 798px) {
        grid-template-columns: 1fr;
      }
      .usersvoiceitem {
        /*
      &:not(:last-child) {
        margin-bottom: 64px;
        padding-bottom: 64px;
        padding-left: unset;
        border-bottom: 1px dashed #ccc;
      }
      dt {
        display: flex;
        align-items: center;
        gap: 16px;
        text-indent: unset;
        &::before {
          content: "";
          display: block;
          flex-shrink: 0;
          align-self: start;
          width: 80px;
          height: 80px;
          border-radius: 100vmax;
          background-image: url("/assets/images/menu/gm-mega07.gif");
          background-size: cover;
          @media (max-width: 480px) {
            width: 48px;
            height: 48px;
          }
        }
      }
      dd {
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: 1fr fit-content;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
        list-style: none;
        padding-left: min(96px, 5vw);
        @media (max-width: 480px) {
          grid-template-columns: 48px 1fr;
          padding-left: unset;
        }
        &::before {
          content: "";
          display: block;
          width: 80px;
          height: 80px;
          border-radius: 100vmax;
          background-image: url("/assets/images/menu/gm-mega06.gif");
          background-size: cover;
          grid-column: 1 / span 1;
          grid-row: 1;
          align-self: start;
          @media (max-width: 480px) {
            width: 48px;
            height: 48px;
          }
        }
        .comment {
          grid-column: 2 / span 1;
          grid-row: 1;
        }
        .links {
          display: flex;
          flex-direction: column;
          grid-column: 2 / span 1;
          grid-row: 2;
          a {
            width: fit-content;
            color: blue;
          }
        }
      }
      */
        margin: unset;
        padding: 16px;
        border: 1px dashed #ccc;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        dt {
          display: flex;
          align-items: center;
          gap: 16px;
          padding-bottom: 16px;
          border-bottom: 1px dotted #ccc;
          text-indent: unset;
          font-size: 16px;
          &::before {
            content: "";
            display: block;
            flex-shrink: 0;
            align-self: start;
            width: 5vw;
            height: 5vw;
            border-radius: 100vmax;
            background-image: url("/assets/images/menu/gm-mega09.webp");
            background-size: cover;
            @media (max-width: 480px) {
              width: 48px;
              height: 48px;
            }
          }
        }
        dd {
          display: grid;
          grid-template-columns: 5vw 1fr;
          grid-template-rows: 1fr fit-content;
          align-items: center;
          gap: 16px;
          flex-wrap: wrap;
          list-style: none;
          font-size: 14px;
          @media (max-width: 480px) {
            grid-template-columns: 48px 1fr;
          }
          &::before {
            content: "";
            display: block;
            width: 5vw;
            height: 5vw;
            border-radius: 100vmax;
            background-image: url("/assets/images/menu/gm-mega06.gif");
            background-size: cover;
            grid-column: 1 / span 1;
            grid-row: 1;
            align-self: start;
            @media (max-width: 480px) {
              width: 48px;
              height: 48px;
            }
          }
          .comment {
            grid-column: 2 / span 1;
            grid-row: 1;
          }
          .links {
            display: flex;
            flex-direction: column;
            grid-column: 2 / span 1;
            grid-row: 2;
            a {
              width: fit-content;
              color: blue;
            }
          }
        }
      }
    }
    /* list */
    :where(ul, ol, dl) {
      margin-block: 2em;
      padding-left: 2em;
      dt {
        margin-bottom: 1em;
        text-indent: -2em;
      }
      :where(li, dd) {
        display: list-item;
        font-size: 1em;
        &:not(:last-child) {
          margin-bottom: 1em;
        }
      }
    }
    :where(ul) {
      list-style-type: disc;
    }
    :where(ol) {
      list-style-type: decimal-leading-zero;
    }
    :where(dl) {
      list-style-type: circle;
    }
    /* table */
    table {
      border: 1px solid var(--usersvoicecolor-gray25);
      :where(th, td) {
        all: unset;
        display: table-cell;
        padding: 4px 8px;
        border: 1px solid var(--usersvoicecolor-gray25);
        font-size: 16px;
        @media (max-width: 767px) {
          text-wrap: nowrap;
        }
      }
      :where(th) {
        background-color: var(--usersvoicecolor-gray15);
        font-weight: bold;
      }
    }

    figure {
      img {
        display: block;
        line-height: 1;
      }
    }
    a {
      text-decoration: unset !important;
      border-bottom: 1px solid blue;
      &:hover {
        border-bottom: 1px solid rgba(78, 78, 209, 1);
      }
    }
    strong {
      background: linear-gradient(to top, white, white 6%, rgba(255, 203, 46, 0.3) 6%, rgba(255, 203, 46, 0.3) 35%, white 35%, white);
    }
    .author {
      display: flex;
      justify-content: flex-end;
      padding: 4px 8px;
      border: 2px solid #ddd;
      border-radius: 4px;
    }
  }
}

.container {
  &:has(.usersvoice) {
    max-width: unset;
  }
}
