body.contact {
    background-color: #E5E5EA;
}

.contact-page {
    background: #E5E5EA;
    padding: 100px 2rem 120px;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header,
.contact-confirm {
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 105px;
}

.contact-intro--placeholder {
    width: 300px;
    flex-shrink: 0;
    min-height: 1px;
}

.contact-content {
    display: flex;
    grid-template-columns: 300px 1fr;
    gap: 105px;
    justify-content: space-between;
}

.form-notice > p,
.contact-success p {
    margin: 0 0 20px;
}

.contact-success p {
    font-weight: 450;
}

.contact-success p:last-child {
    padding-bottom: 70px;
}

.contact-success {
    flex: 1;
    font-size: 15px;
    line-height: 27px;
    font-weight: 500;
    font-family: 'IBM Plex Sans JP', sans-serif;
    text-align: justify;
}

.contact-intro {
    width: 300px;
    font-size: 15px;
    line-height: 27px;
    font-weight: 450;
    font-family: 'IBM Plex Sans JP', sans-serif;
    text-align: justify;
    margin-top: 55px;
}

.contact-intro p {
    margin: 0 0 20px;
}

.contact-form-wrapper {
    background: #E5E5EA;
    padding: 0;
    flex: 1;
}

.form-notice {
    flex: 1;
    font-size: 15px;
    line-height: 27px;
    font-weight: 450;
    font-family: 'IBM Plex Sans JP', sans-serif;
}

.form-notice--success {
    font-weight: 450;
    line-height: 33px;
}

.form-notice--sp {
    display: none;
    font-size: 15px;
    line-height: 27px;
    font-weight: 450;
    font-family: 'IBM Plex Sans JP', sans-serif;
    color: #000;
    text-align: justify;
}

.form-notice--sp p {
    margin: 0 0 27px;
}

.form-group {
    margin-bottom: 50px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 100%;
    font-family: 'IBM Plex Sans JP', sans-serif;
    color: #000;
}

.confirm-label {
    display: block;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 100%;
    font-family: 'IBM Plex Sans JP', sans-serif;
    color: #000;
    padding-left: 0;
}

.confirm-value {
    display: block;
    font-weight: 600;
    margin-bottom: 45px;
    font-size: 15px;
    font-family: 'IBM Plex Sans JP', sans-serif;
    color: #000;
    padding-left: 0;
    line-height: 28px;
    text-align: justify;
    word-break: break-all;
    overflow-wrap: break-word;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 30px 30px 30px 30px;
    border: none;
    background: #fff;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    line-height: 45px;
    font-family: 'IBM Plex Sans JP', sans-serif;
    box-sizing: border-box;
    height: 75px;
}

.form-group textarea {
    line-height: 25px;
}

.custom-select {
    position: relative;
    width: 100%;
    font-family: 'IBM Plex Sans JP', sans-serif;
}

.custom-select__toggle {
    width: 100%;
    height: 75px;
    padding: 12px 12px 12px 30px;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
}

.custom-select__text {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    line-height: 45px;
}

.custom-select__arrow {
    width: 12px;
    height: 10px;
    margin-right: 18px;
    transition: transform 0.3s;
}

.custom-select.active .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__menu {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #8E8E93;
    list-style: none;
    margin: 0;
    padding: 15px 0;
    z-index: 100;
    box-sizing: border-box;
}

.custom-select.active .custom-select__menu {
    display: block;
}

.custom-select.active .custom-select__toggle {
    visibility: hidden;
}

.custom-select__item {
    padding: 4px 20px;
    font-size: 18px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 27px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'IBM Plex Sans JP', sans-serif;
}

.custom-select__item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #0b0b0b;
}

.custom-select__item.selected::before {
    content: "✔";
    font-size: 14px;
    width: 15px;
}

.custom-select__item:not(.selected)::before {
    content: "";
    width: 15px;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
    color: #E5E5EA;
}

.form-group textarea {
    resize: vertical;
    height: 450px;
    text-align: justify;
}

.form-group-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'IBM Plex Sans JP', sans-serif;
    padding-top: 100px;
    padding-bottom: 90px;
    gap: 75px;
}

#contactForm .form-group-btn {
    gap: 55px;
}

.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 10px 40px 10px 12px;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
}

.custom-select select::-ms-expand {
    display: none;
}

.custom-select img {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.form-privacy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-privacy label {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    gap: 20px;
}

.form-privacy input {
    border: none;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    flex-shrink: 0;
    margin-right: 10px;
}

.custom-check {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    border: none;
    outline: none;

    cursor: pointer;
    position: relative;
}

.custom-check:checked::after {
    content: "✔";
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    color: black;
}

.btn-submit,
.btn-back {
    background: #000;
    color: #fff;
    padding: 15px 60px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: clamp(250px, calc(24.1vw + 3px), 350px);
    height: 75px;
}

.btn-back {
    background-color: #8E8E93;
}

.btn-submit:hover {
    background: #333;
}

.success-message {
    background: #d4edda;
    padding: 20px;
    border: 1px solid #c3e6cb;
    color: #155724;
    margin-bottom: 20px;
    max-width: 600px;
}

.required-icon {
    color: #dc3545;
    font-size: 15px;
    font-weight: 700;
}

.confirm-group {
    display: flex;
    flex-direction: column !important;
    padding-left: 0;
}

#confirmContent {
    padding-left: 0;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.form-label-row label {
    margin-bottom: 0;
}

.form-error {
    color: #D32F2F;
    font-size: 15px;
    font-weight: 500 !important;
    font-family: 'IBM Plex Sans JP', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.form-error.show {
    opacity: 1;
    visibility: visible;
}

.form-privacy {
    position: relative;
}

.form-privacy .form-error {
    position: absolute;
    top: 100%;
    left: 5px;
    margin-top: 8px;
    text-align: left;
    white-space: nowrap;
    transform: translateZ(0);
    font-weight: 450 !important;
}

@media (max-width: 1025px) and (min-width: 768px) {
    .contact-header,
    .contact-content,
    .contact-confirm {
        gap: 50px !important;
    }

    .btn-submit, .btn-back {
        width: clamp(200px, calc(45.5vw - 149.4px), 275px);
        height: 65px;
        padding: 0;
    }

    .form-privacy .form-error {
        white-space: normal;
        max-width: 100%;
    }
}

@media (max-width: 1025px) and (min-width: 768px) {
    .contact-intro {
        width: 220px;
    }

    .contact-intro--placeholder {
        width: 230px;
    }

    .contact-success {
        margin-left: 0;
    }

    .form-group-btn {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .contact-page {
        padding: 100px 20px 40px;
    }

    .contact-page .brand-box__rect {
        stroke-dashoffset: 0 !important;
        stroke-dasharray: none !important;
        transition: none !important;
        opacity: 1 !important;
    }

    .contact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        margin-bottom: 70px;
    }

    .form-notice--pc {
        display: none;
    }

    .form-notice--sp {
        display: block;
    }

    .contact-content {
        flex-direction: column;
        gap: 30px;
    }

    .contact-intro {
        display: none;
    }

    .custom-select__item {
        font-size: 15px;
        line-height: 21px;
    }

    .contact-confirm {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .contact-intro--placeholder {
        display: none;
    }

    .contact-confirm .contact-form-wrapper,
    .contact-confirm #confirmContent,
    .contact-confirm .confirm-group {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .contact-form-wrapper {
        width: 100%;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .form-label-row {
        margin-bottom: 0px;
    }

    .form-error {
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 1;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 12px;
        height: 60px;
    }

    .custom-select__toggle {
        height: 60px;
    }

    .form-group textarea {
        min-height: 200px;
        height: auto;
        resize: none;
        overflow: hidden;
    }

    .form-group input,
    .form-group textarea,
    .btn-submit,
    .btn-back {
        max-width: 100%;
        width: 100%;
    }

    .form-group-btn {
        display: flex;
        flex-direction: column;
        gap: 75px;
        align-items: center;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .form-privacy {
        order: 1;
        text-align: center;
    }

    .form-privacy input {
        width: 20px;
        height: 20px;
    }

    .btn-submit {
        order: 2;
        width: 100% !important;
        padding: 18px 20px;
        font-size: 18px;
    }

    .confirm-group {
        flex-direction: column;
    }

    .confirm-label {
        margin-bottom: 10px;
    }

    .confirm-value {
        margin-bottom: 35px;
    }

    .confirm-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px;
        padding-top: 20px;
        padding-bottom: 20px;
        margin: 0;
    }

    .btn-back,
    .confirm-buttons > .btn-submit {
        width: 50% !important;
        height: 60px;
        font-size: 16px;
        padding: 0;
    }

    .contact-success {
        padding: 0 0 10px;
    }

    .contact-success p {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 30px;
    }

    .contact-success p:last-child {
        padding-bottom: 30px;
    }

    .btn-home {
        width: 100%;
        padding: 18px 20px;
        text-align: center;
        font-size: 16px;
    }

    .custom-select img {
        margin: 0;
        width: 12px;
        height: 12px;
        right: 20px;
    }
}
