.xmp-agreement-shell {
    box-sizing: border-box;
    max-width: 980px;
    margin: 0 auto;
    padding: 56px 20px 72px;
    color: #22201d;
}

.xmp-agreement-header {
    margin-bottom: 28px;
}

.xmp-agreement-header span {
    display: block;
    margin-bottom: 10px;
    color: #b38952;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
}

.xmp-agreement-header h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: 0;
}

.xmp-agreement-header p {
    max-width: 720px;
    margin: 0;
    color: #72685f;
    font-size: 17px;
    line-height: 1.8;
}

.xmp-agreement-message,
.xmp-legacy-form-notice {
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid #d8e6dc;
    background: #f6fbf7;
    border-radius: 8px;
    color: #2f5d45;
    line-height: 1.7;
}

.xmp-agreement-message.is-error {
    border-color: #f1c7c7;
    background: #fff7f7;
    color: #a33a3a;
}

.xmp-legacy-form-notice h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.xmp-legacy-form-notice p {
    margin: 0 0 14px;
}

.xmp-legacy-form-notice a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 6px;
    background: #1f2933;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.xmp-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.xmp-agreement-form {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.xmp-form-card {
    box-sizing: border-box;
    border: 1px solid #e6dfd3;
    border-radius: 8px;
    background: rgba(255, 253, 248, .86);
    padding: 26px;
    min-width: 0;
}

.xmp-form-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.25;
}

.xmp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.xmp-form-card label {
    display: grid;
    gap: 8px;
    color: #28231f;
    font-weight: 800;
}

.xmp-form-card label span,
.xmp-signed-date span {
    font-size: 15px;
}

.xmp-agreement-form input[type="text"],
.xmp-agreement-form input[type="tel"],
.xmp-agreement-form input[type="email"],
.xmp-agreement-form input[type="date"],
.xmp-agreement-form select,
.xmp-agreement-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    border: 1px solid #d8d2c8;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
    color: #22201d;
    font-size: 16px;
    line-height: 1.5;
}

.xmp-agreement-form input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
}

.xmp-agreement-form input[type="date"]::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: left;
}

.xmp-plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.xmp-plan-item {
    padding: 16px;
    border: 1px solid #e4ddd2;
    border-radius: 8px;
    background: #fff;
}

.xmp-plan-item strong {
    display: block;
    font-size: 18px;
}

.xmp-plan-item p {
    margin: 8px 0 0;
    color: #736a61;
    line-height: 1.7;
}

.xmp-agreement-content p,
.xmp-agreement-body p {
    color: #5e554d;
    line-height: 1.9;
}

.xmp-party-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.xmp-party-overview > div {
    border: 1px solid #e8e1d5;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.xmp-party-overview strong {
    display: block;
    margin-bottom: 8px;
    color: #2b2621;
    font-size: 16px;
}

.xmp-party-overview p {
    margin: 4px 0;
    font-size: 15px;
}

.xmp-agreement-body {
    margin-top: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e1d5;
    border-radius: 8px;
}

.xmp-party-seal {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e8e1d5;
}

.xmp-party-seal img {
    width: 118px;
    height: auto;
    display: block;
}

.xmp-help {
    margin: 0 0 14px;
    color: #756a60;
    line-height: 1.7;
}

.xmp-signature-field {
    display: grid;
    gap: 12px;
}

.xmp-signature-pad {
    position: relative;
    height: 210px;
    border: 1px solid #d8d2c8;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    touch-action: none;
}

.xmp-signature-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.xmp-signature-clear {
    justify-self: start;
    min-height: 38px;
    border: 1px solid #d8d2c8;
    border-radius: 6px;
    background: #fff;
    color: #2f2925;
    font-weight: 800;
    padding: 0 14px;
    cursor: pointer;
}

.xmp-signature-error {
    display: none;
    margin: 0;
    color: #a33a3a;
    font-weight: 800;
}

.xmp-signature-field.is-error .xmp-signature-pad {
    border-color: #c65050;
}

.xmp-signature-field.is-error .xmp-signature-error {
    display: block;
}

.xmp-signed-date {
    box-sizing: border-box;
    width: 100%;
    max-width: 340px;
    min-width: 0;
    margin-top: 18px;
}

.xmp-signed-date input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.xmp-confirm {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    align-items: flex-start;
    margin-top: 20px;
    line-height: 1.8;
}

.xmp-confirm input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    margin-top: 4px;
}

.xmp-submit {
    min-height: 56px;
    border: 0;
    border-radius: 8px;
    background: #1f2933;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 720px) {
    .xmp-agreement-shell {
        padding: 34px 12px 52px;
    }

    .xmp-agreement-header h1 {
        font-size: 36px;
    }

    .xmp-agreement-header p {
        font-size: 15px;
    }

    .xmp-form-card {
        padding: 20px 12px;
        border-radius: 8px;
    }

    .xmp-form-card h2 {
        font-size: 21px;
    }

    .xmp-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .xmp-party-overview {
        grid-template-columns: 1fr;
    }

    .xmp-agreement-body {
        padding: 16px;
    }

    .xmp-signature-pad {
        height: 190px;
    }

    .xmp-signed-date {
        max-width: none;
    }

    .xmp-submit {
        width: 100%;
    }
}
