:root {
    --barnhelp-community-ink: #17211d;
    --barnhelp-community-muted: #5f6b65;
    --barnhelp-community-rust: #a6421b;
    --barnhelp-community-rust-dark: #7f2e10;
    --barnhelp-community-green: #315c43;
    --barnhelp-community-ivory: #fffdf8;
    --barnhelp-community-line: #d8d0c2;
    --barnhelp-community-soft: #f6f3ec;
}

.barnhelp-auth-form,
.barnhelp-code-card {
    background: var(--barnhelp-community-ivory);
    border: 1px solid var(--barnhelp-community-line);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(23, 33, 29, .1);
    color: var(--barnhelp-community-ink);
    margin-inline: auto;
    padding: clamp(24px, 4vw, 42px);
    width: 100%;
}

.barnhelp-auth-form {
    max-width: 780px;
}

.barnhelp-code-card {
    max-width: 660px;
}

.barnhelp-auth-form__intro {
    margin-bottom: 24px;
}

.barnhelp-auth-form__intro h2,
.barnhelp-code-card h2,
.barnhelp-public-gallery h2 {
    color: var(--barnhelp-community-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 4vw, 2.45rem);
    line-height: 1.1;
    margin: 0 0 10px;
}

.barnhelp-auth-form__intro p,
.barnhelp-code-card > p,
.barnhelp-gallery-upload p,
.barnhelp-device-revoke p {
    color: var(--barnhelp-community-muted);
    line-height: 1.6;
    margin: 0;
}

.barnhelp-auth-form__fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.barnhelp-auth-form__fieldset legend,
.barnhelp-auth-form__field > label,
.barnhelp-code-card__form label,
.barnhelp-gallery-upload > label {
    color: var(--barnhelp-community-ink);
    display: block;
    font-size: .92rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.barnhelp-auth-form__row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.barnhelp-auth-form__field {
    margin-top: 18px;
    min-width: 0;
}

.barnhelp-auth-form__field input,
.barnhelp-code-card__form input,
.barnhelp-gallery-upload input[type="file"] {
    background: #fff;
    border: 1px solid var(--barnhelp-community-line);
    border-radius: 12px;
    color: var(--barnhelp-community-ink);
    font: inherit;
    min-height: 52px;
    padding: 12px 14px;
    width: 100%;
}

.barnhelp-auth-form__field input:focus-visible,
.barnhelp-code-card__form input:focus-visible,
.barnhelp-gallery-upload input[type="file"]:focus-visible {
    border-color: var(--barnhelp-community-rust);
    box-shadow: 0 0 0 3px rgba(166, 66, 27, .18);
    outline: 0;
}

.barnhelp-auth-form__upload input[type="file"],
.barnhelp-gallery-upload input[type="file"] {
    cursor: pointer;
    padding: 9px;
}

.barnhelp-auth-form__help,
.barnhelp-auth-form__privacy {
    color: var(--barnhelp-community-muted);
    font-size: .82rem;
    line-height: 1.55;
    margin: 8px 0 0;
}

.barnhelp-auth-form__privacy {
    background: var(--barnhelp-community-soft);
    border-radius: 12px;
    margin-top: 18px;
    padding: 14px;
}

.barnhelp-auth-form__consent {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 12px;
    line-height: 1.5;
    margin-top: 20px;
}

.barnhelp-auth-form__consent input {
    flex: 0 0 auto;
    height: 22px;
    margin: 2px 0 0;
    width: 22px;
}

.barnhelp-auth-form__consent--compact {
    font-size: .92rem;
}

.barnhelp-auth-form__submit,
.barnhelp-code-card__form button,
.barnhelp-gallery-upload button,
.barnhelp-device-revoke button {
    align-items: center;
    background: var(--barnhelp-community-rust);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    margin-top: 22px;
    min-height: 52px;
    padding: 12px 24px;
    text-align: center;
    width: 100%;
}

.barnhelp-auth-form__submit:hover,
.barnhelp-auth-form__submit:focus-visible,
.barnhelp-code-card__form button:hover,
.barnhelp-code-card__form button:focus-visible,
.barnhelp-gallery-upload button:hover,
.barnhelp-gallery-upload button:focus-visible,
.barnhelp-device-revoke button:hover,
.barnhelp-device-revoke button:focus-visible {
    background: var(--barnhelp-community-rust-dark);
    color: #fff;
    outline: 3px solid rgba(166, 66, 27, .24);
    outline-offset: 3px;
}

.barnhelp-auth-form__link {
    color: var(--barnhelp-community-rust-dark);
    display: block;
    font-weight: 750;
    margin-top: 18px;
    min-height: 44px;
    padding: 11px;
    text-align: center;
}

.barnhelp-notice {
    border: 1px solid;
    border-radius: 12px;
    line-height: 1.5;
    margin: 0 auto 18px;
    max-width: 660px;
    padding: 13px 16px;
}

.barnhelp-notice--error {
    background: #fff1ed;
    border-color: #c55a36;
    color: #6f230e;
}

.barnhelp-notice--success {
    background: #edf7f0;
    border-color: #568266;
    color: #234731;
}

.barnhelp-code-card {
    text-align: center;
}

.barnhelp-code-card__icon {
    align-items: center;
    background: var(--barnhelp-community-green);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 1.35rem;
    height: 54px;
    justify-content: center;
    margin-bottom: 16px;
    width: 54px;
}

.barnhelp-code-card__eyebrow {
    color: var(--barnhelp-community-rust-dark) !important;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .12em;
    margin-bottom: 10px !important;
    text-transform: uppercase;
}

.barnhelp-code-card__form {
    margin: 24px auto 0;
    max-width: 360px;
    text-align: left;
}

.barnhelp-code-card__form input {
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .3em;
    text-align: center;
}

.barnhelp-code-card__resend {
    margin-top: 16px;
}

.barnhelp-code-card__resend button,
.barnhelp-profile-gallery__item form button {
    background: transparent;
    border: 0;
    color: var(--barnhelp-community-rust-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 44px;
    padding: 10px 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.barnhelp-code-card__resend button:focus-visible,
.barnhelp-profile-gallery__item form button:focus-visible {
    outline: 3px solid rgba(166, 66, 27, .28);
    outline-offset: 2px;
}

.barnhelp-gallery-settings .listivo-panel-accordion__top {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
}

.barnhelp-profile-gallery {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.barnhelp-profile-gallery__item {
    border-radius: 15px;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.barnhelp-profile-gallery__item img {
    aspect-ratio: 1 / 1;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.barnhelp-profile-gallery--editing .barnhelp-profile-gallery__item {
    border: 1px solid var(--barnhelp-community-line);
}

.barnhelp-profile-gallery--editing .barnhelp-profile-gallery__item form {
    background: #fff;
    text-align: center;
}

.barnhelp-gallery-upload,
.barnhelp-device-revoke {
    border-top: 1px solid var(--barnhelp-community-line);
    margin-top: 24px;
    padding-top: 24px;
}

.barnhelp-upload-preview {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
}

.barnhelp-upload-preview:empty {
    display: none;
}

.barnhelp-upload-preview img {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    object-fit: cover;
    width: 100%;
}

.barnhelp-gallery-upload button,
.barnhelp-device-revoke button {
    width: auto;
}

.barnhelp-device-revoke button {
    background: var(--barnhelp-community-green);
}

.barnhelp-public-gallery {
    margin: 34px auto 0;
    max-width: 1200px;
    padding: 0 24px 32px;
    width: 100%;
}

.site-footer__credit {
    line-height: 1.75;
    margin-inline: auto;
    text-align: center;
}

.site-footer__credit a {
    color: inherit;
    display: inline-block;
    min-height: 44px;
    padding: 8px 2px;
}

.site-footer__credit a:focus-visible {
    outline: 3px solid #fffdf8;
    outline-offset: 3px;
}

.site-footer__heart {
    color: #d76a45;
}

@media (min-width: 1025px) {
    .listivo-login-widget .listivo-login-form {
        max-width: 780px;
        width: min(780px, calc(100vw - 48px));
    }
}

@media (max-width: 767px) {
    .barnhelp-auth-form,
    .barnhelp-code-card {
        border-radius: 16px;
        box-shadow: none;
        padding: 22px 16px;
    }

    .barnhelp-auth-form__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .barnhelp-auth-form__field input,
    .barnhelp-code-card__form input {
        font-size: 16px;
    }

    .barnhelp-code-card__form input {
        font-size: 1.35rem;
    }

    .barnhelp-profile-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .barnhelp-upload-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .barnhelp-gallery-upload button,
    .barnhelp-device-revoke button {
        width: 100%;
    }

    .listivo-panel-section,
    .listivo-panel-section__content,
    .listivo-panel-accordions,
    .listivo-panel-accordion,
    .listivo-panel-accordion__content {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 374px) {
    .barnhelp-auth-form,
    .barnhelp-code-card {
        padding-inline: 13px;
    }

    .barnhelp-profile-gallery {
        grid-template-columns: minmax(0, 1fr);
    }
}
