.member-shell {
    width: min(920px, calc(100% - 32px));
    margin-inline: auto;
}

.member-header {
    margin-bottom: clamp(28px, 5vw, 48px);
}

.member-header .page-title,
.member-header .page-lead {
    max-width: 760px;
}

.member-form {
    display: grid;
    gap: 28px;
}

.member-section {
    background: #fffdfa;
    border: 1px solid #ded5ca;
    box-shadow: 7px 7px 0 rgba(117, 31, 25, 0.07);
    padding: clamp(22px, 4vw, 38px);
}

.member-section__heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    align-items: baseline;
    border-bottom: 2px solid #c9a227;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.member-section__heading h2 {
    color: #8a100b;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
}

.member-section__heading p {
    color: #6d655f;
    font-size: 0.86rem;
}

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

.member-field {
    min-width: 0;
}

.member-field--wide {
    grid-column: 1 / -1;
}

.member-label {
    display: block;
    color: #302b28;
    font-size: 0.92rem;
    font-weight: 750;
    margin-bottom: 7px;
}

.member-label__hint,
.member-help {
    color: #746c66;
    font-size: 0.78rem;
    line-height: 1.5;
}

.member-label__required {
    color: #a61915;
}

.member-input,
.member-select {
    appearance: none;
    background: #fff;
    border: 1px solid #b9aea4;
    border-radius: 0;
    color: #282421;
    min-height: 50px;
    padding: 12px 14px;
    width: 100%;
}

.member-textarea {
    min-height: 104px;
    resize: vertical;
}

.member-select {
    background-image: linear-gradient(45deg, transparent 50%, #8a100b 50%), linear-gradient(135deg, #8a100b 50%, transparent 50%);
    background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
    padding-right: 42px;
}

.member-input:focus,
.member-select:focus {
    border-color: #8a100b;
    box-shadow: 0 0 0 3px rgba(138, 16, 11, 0.13);
    outline: none;
}

.member-input:disabled {
    background: #f1ede8;
    color: #6f6862;
    cursor: not-allowed;
}

.member-note {
    background: #fff5d7;
    border: 1px solid #d4b44e;
    color: #4a352b;
    line-height: 1.6;
    margin-bottom: 26px;
    padding: 15px 17px;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.member-actions .btn {
    min-height: 50px;
    justify-content: center;
}

.member-password-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.member-password-row .btn {
    min-height: 50px;
}

.member-loading {
    color: #6d655f;
    padding: 64px 16px;
    text-align: center;
}

.member-privacy {
    display: grid;
    gap: 22px;
}

.member-privacy .member-section__heading {
    margin-bottom: 0;
}

.member-privacy__block {
    align-items: center;
    background: #f8f4ef;
    border: 1px solid #ded5ca;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
}

.member-privacy__block--danger {
    align-items: stretch;
    border-left: 4px solid #a61915;
    grid-template-columns: 1fr;
}

.member-privacy__block h3 {
    color: #4a352b;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.member-privacy__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-privacy__actions .btn,
.member-privacy__block > .btn {
    min-height: 48px;
    justify-content: center;
}

.btn-danger {
    background: #8a100b;
    border: 1px solid #8a100b;
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: #69100d;
    border-color: #69100d;
}

.member-privacy__status {
    color: #5f5751;
    font-size: 0.88rem;
    line-height: 1.55;
    min-height: 1.4em;
}

.member-privacy__status.is-error {
    color: #9d1712;
    font-weight: 700;
}

.member-privacy__status.is-success {
    color: #216542;
    font-weight: 700;
}

@media (max-width: 700px) {
    .member-shell {
        width: min(100% - 24px, 920px);
    }

    .member-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .member-field--wide {
        grid-column: auto;
    }

    .member-section {
        box-shadow: 4px 4px 0 rgba(117, 31, 25, 0.07);
        padding: 20px 16px;
    }

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

    .member-actions {
        flex-direction: column;
    }

    .member-actions .btn,
    .member-password-row .btn,
    .member-privacy__actions .btn,
    .member-privacy__block > .btn {
        width: 100%;
    }

    .member-privacy__block {
        grid-template-columns: 1fr;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .member-input,
    .member-select,
    .member-actions .btn {
        transition: none !important;
    }
}
