:root {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
    color: #231816;
    background: #fff;
    font-size: 15px;
    line-height: 1.7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

main {
    max-width: 940px;
    margin: 30px auto 0;
    padding: 0 22px;
}

h1 {
    margin: 0;
    padding: 12px 24px;
    background: #90857E;
    color: #fff;
    text-align: center;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    line-height: 1.6;
}

h1 span {
    display: inline-block;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 28px auto;
    display: flex;
    gap: 30px;
    width: 88%;
}

.steps li {
    flex: 1;
    position: relative;
    background: #cac7c0;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 7px 0;
    font-size: .85rem;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(50% - 7px);
    right: -22px;
    border-left: 10px solid #E1DBD0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.steps .current {
    background: #B9A08D;
}

.intro {
    margin: 30px 0;
}

.required {
    color: #c94b42;
    margin-left: 3px;
}

.test-notice {
    margin: 20px 0;
    padding: 10px 16px;
    border: 1px solid #ddd5b6;
    background: #fffbee;
    color: #65582b;
    font-size: .9rem;
}

.form-table {
    margin: 0;
    border: 1px solid #E1DBD0;
    box-shadow: 0 1px 5px #00000010;
}

.form-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.form-row + .form-row {
    border-top: 1px solid #E1DBD0;
}

.row-title {
    padding: 24px 20px;
    background: #f3efec;
    font-weight: 600;
    line-height: 1.6;
}

.row-title small {
    display: block;
    color: #646464;
    font-size: .83rem;
    font-weight: normal;
}

.row-content {
    min-width: 0;
    padding: 24px;
    margin: 0;
    overflow-wrap: anywhere;
}

input:not([type="checkbox"]):not([type="hidden"]), select, textarea {
    display: block;
    width: 100%;
    max-width: 480px;
    padding: 9px 12px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px #00000008;
}

textarea {
    max-width: none;
    resize: vertical;
    min-height: 80px;
}

input::placeholder {
    color: #888;
    opacity: 1;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    flex: 0 0 auto;
    accent-color: #4c9542;
}

.checkbox-label {
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.number-group {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 320px;
}

.number-group input:not([type="checkbox"]) {
    width: 0;
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

.postal {
    max-width: 260px;
}

.sub-label {
    display: block;
    font-size: .9rem;
    margin: 17px 0 7px;
}

.sub-label:first-child {
    margin-top: 0;
}

.customer-category {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.customer-category + .customer-category {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e4e4e4;
}

.customer-category legend {
    float: left;
    width: 100%;
    padding: 0;
}

.category-details {
    padding: 10px 0 0 27px;
    clear: both;
}

.privacy-note {
    font-size: .88rem;
    margin: 16px 0 0;
}

a {
    color: #B9A08D;
    text-underline-offset: 3px;
}

button, .back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    font: inherit;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button {
    color: #fff;
    background: #B9A08D;
    min-width: 250px;
    gap: 28px;
}

button:hover {
    background: #90857E;
}

.back-button {
    background: #fff;
    color: #90857E;
    border-color: #beb7b2;
}

.back-button:hover {
    background: #ebe8e7;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 36px 0;
}

.field-error {
    color: #a72723;
    font-size: .88rem;
    margin: 8px 0 0;
    white-space: pre-line;
}

[hidden] {
    display: none !important;
}

.error-summary {
    background: #fff5f4;
    color: #9b2923;
    border: 1px solid #e1b7b2;
    padding: 16px 22px;
    margin-bottom: 24px;
}

.error-summary p {
    margin: 0;
    font-weight: 600;
}

.error-summary ul {
    padding-left: 22px;
    margin-bottom: 0;
}

[aria-invalid="true"] {
    border-color: #b22 !important;
}

.complete-panel {
    padding: 46px 22px;
    text-align: center;
    border: 1px solid #d4d4d4;
}

.complete-mark {
    margin: 0 auto;
    border-radius: 50%;
    background: #B9A08D;
    color: #fff;
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 2rem;
}

.complete-panel h2 {
    font-size: 1.4rem;
    margin: 22px 0 16px;
}

.complete-panel .back-button {
    margin-top: 20px;
}

footer {
    margin: 45px 0 26px;
    text-align: center;
    font-size: .85rem;
}

:focus-visible {
    outline: 3px solid #B9A08D;
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.honeypot {
    display: none;
}

@media (max-width: 640px) {
    main {
        margin-top: 16px;
        padding: 0 16px;
    }

    h1 {
        padding: 13px 12px;
    }

    .steps {
        width: 100%;
        gap: 24px;
        margin: 22px 0;
    }

    .steps li:not(:last-child)::after {
        right: -18px;
        border-left-width: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .row-title {
        padding: 13px 16px;
    }

    .row-title small {
        display: inline;
        margin-left: 10px;
    }

    .row-content {
        padding: 20px 16px;
    }

    .actions {
        flex-direction: column-reverse;
        gap: 14px;
    }

    button, .back-button {
        width: 100%;
        min-width: 0;
    }

    .category-details {
        padding-left: 14px;
    }

    .complete-panel h2 {
        font-size: 1.2rem;
    }

}
