@layer base {
  .page-form .note {
    color: var(--text-color);
    font-size: var(--text-md);
  }
  .page-form .page-contents {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
  }
  .page-form .form {
    display: flex;
    flex-direction: column;
  }
  .page-form .form .title {
    padding-block: var(--p-lg) var(--p-md);
    color: var(--text-color);
    font-size: var(--text-md);
    font-weight: var(--weight-bold);
    position: relative;
  }
  .page-form .form .title::after {
    display: block;
    position: absolute;
    top: var(--p-md);
    bottom: 0;
    right: 0;
    margin: auto;
    padding-bottom: 1px;
    content: "任意";
    text-align: center;
    color: var(--text-contrast-color);
    width: 40px;
    height: 20px;
    line-height: 20px;
    letter-spacing: 2px;
    text-indent: 1px;
    font-size: 12px;
    border-radius: 3px;
    background: #898989;
  }
  .page-form .form .title .icon {
    display: inline-block;
    color: var(--text-color);
    font-weight: var(--weight-regular);
    font-size: var(--text-xs);
    border: 1px solid var(--border-color);
    border-radius: calc((var(--weight-regular) * var(--line-height-sm)) * 1px);
    padding: 2px 4px;
    line-height: var(--line-height-sm);
  }
  .page-form .form .required::after {
    content: "必須";
    background: var(--required-color);
  }
  .page-form .form .description {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    padding-bottom: var(--p-xl);
    border-bottom: 1px solid var(--border-color);
  }
  .page-form .form .description .block {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
  }
  .page-form .form .radio-wrapper,
  .page-form .form .checkbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
  }
  .page-form .form .notes {
    padding-top: var(--p-md);
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    font-size: var(--text-sm);
  }
  .page-form .form .note-text {
    font-size: var(--text-sm);
  }
  .page-form .form .note-text span {
    display: block;
  }
  .page-form .form .notes-wrapper {
    position: relative;
  }
  .page-form .form .notes-wrapper textarea {
    padding-bottom: 24px;
  }
  .page-form .form .notes-wrapper .notes-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: var(--text-gray-color);
    font-size: var(--text-sm);
  }
  .page-form .form .contect-time {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-sm);
  }
  .page-form .form .contect-time[aria-hidden="true"] {
    display: none;
  }
  .page-form .form .contect-time label {
    min-width: 6em;
  }
  .page-form .privacy {
    padding-block: var(--p-xl);
    font-size: var(--text-md);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .page-form .privacy .link {
    color: var(--link-color);
  }
  .page-form .privacy .link:hover {
    color: var(--main-color);
    text-decoration: none;
  }
  .page-form .submit {
    width: 100%;
    height: 70px;
    line-height: 1.8;
    border-radius: 3px;
    padding: 0;
    border: none;
    color: #fff;
    font-size: 20px;
    display: block;
    cursor: pointer;
    position: relative;
    background-color: var(--main-color);
    font-family: var(--family-noto);
    transition: 0.3s;
  }
  .page-form .submit::after {
    position: absolute;
    content: "";
    top: 30px;
    right: 32px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    z-index: 5;
  }
  .page-form .submit:hover {
    background-color: var(--contents-bg-color);
    border: 1px solid var(--main-color);
    color: var(--main-color);
  }
  .page-form .submit:hover::after {
    border-color: var(--main-color);
  }
  @media (min-width: 768px) {
    .page-form .page-contents {
      gap: var(--p-xxxl);
    }
    .page-form .page-contents .note {
      font-size: var(--text-lg);
    }
    .page-form .page-contents .note > span {
      display: block;
      text-align: center;
    }
    .page-form .form {
      display: grid;
      grid-template-columns: 240px 1fr;
    }
    .page-form .form .title {
      font-weight: var(--weight-regular);
      border-top: 1px solid var(--border-color);
      padding-top: var(--p-xl);
      padding-bottom: var(--p-lg);
      padding-right: var(--p-lg);
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: var(--gap-md);
    }
    .page-form .form .title:last-of-type {
      border-bottom: 1px solid var(--border-color);
    }
    .page-form .form .title::after {
      margin: initial;
      top: 34px;
      right: 30px;
    }
    .page-form .form .description {
      border-top: 1px solid var(--border-color);
      border-bottom: none;
      padding-block: var(--p-lg);
    }
    .page-form .form .description:last-of-type {
      border-bottom: 1px solid var(--border-color);
    }
    .page-form .form .description .block {
      display: grid;
      align-items: center;
      grid-template-columns: 140px 1fr;
    }
    .page-form .form .description .checkbox-wrapper {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .page-form .form .description .radio-wrapper {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .page-form .form .description-name .block {
      grid-template-columns: 50px 1fr;
    }
    .page-form .form .contect-time {
      flex-direction: row;
      align-items: center;
      gap: var(--gap-md);
    }
    .page-form .privacy {
      align-items: center;
    }
    .page-form .submit {
      max-width: 600px;
      margin: 0 auto;
    }
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select {
    padding-inline: var(--p-md);
    width: 100%;
    height: 46px;
    line-height: 46px;
    color: var(--text-color);
    font-family: var(--family-noto);
    font-size: var(--text-md);
    border-radius: 3px;
    border: solid 1px var(--border-color);
    background-color: var(--contents-bg-color);
  }
  textarea {
    padding: var(--p-md);
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    font-family: var(--family-noto);
    font-size: var(--text-md);
    background: #fafafa;
    line-height: 1.5;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    word-break: break-word;
  }
  input[type="radio"],
  input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    height: 1px;
    width: 1px;
  }
  input[type="radio"] + label {
    display: flex;
    align-items: center;
    border: solid 1px var(--border-color);
    color: var(--text-color);
    padding: 10px 8px 10px 40px;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
  }
  input[type="radio"] + label:before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border: solid 1px var(--border-color);
    border-radius: 50%;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  input[type="radio"]:checked + label:after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--main-color);
    border-radius: 50%;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }
  input[type="checkbox"] + label {
    display: flex;
    align-items: center;
    border: solid 1px var(--border-color);
    color: var(--text-color);
    padding: 10px 8px 10px 40px;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
  }
  input[type="checkbox"] + label:before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border: solid 1px var(--border-color);
    border-radius: 3px;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  input[type="checkbox"]:checked + label::before {
    background-color: var(--main-color);
  }
  input[type="checkbox"]:checked + label::after {
    content: "";
    display: block;
    width: 10px;
    height: 5px;
    border: solid 1px var(--text-contrast-color);
    border-width: 0 0 2px 2px;
    position: absolute;
    left: 15px;
    top: 48%;
    transform: translateY(-50%) rotate(-45deg);
  }
  textarea {
    field-sizing: content;
  }
  .description label,
  .description input,
  .description select {
    font-size: var(--text-sm);
  }
  @media (min-width: 768px) {
    .description label,
    .description input,
    .description select {
      font-size: var(--text-md);
    }
  }
  input[type="checkbox"]:focus + label,
  input[type="radio"]:focus + label {
    outline: var(--main-color) auto 1px;
  }
  @media (min-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
      max-width: 300px;
    }
  }
  input:focus,
  select:focus,
  textarea:focus {
    outline-color: var(--main-color);
  }
  .error {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .error li {
    color: var(--required-color);
    font-weight: var(--weight-bold);
  }
}
