.local-dialog,
.local-gallery,
.local-cookie {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink)
}

.local-dialog *,
.local-gallery *,
.local-cookie * {
    box-sizing: border-box;
    font-family: inherit
}

.local-dialog {
    width: calc(100% - 32px);
    max-width: 720px;
    margin: auto;
    padding: 28px 32px;
    border: 1px solid white;
    border-radius: var(--radius-panel);
    background: #f7fafc;
    max-height: calc(100dvh - 24px);
    overflow: auto;
    box-shadow: 0 24px 80px #18252c33
}

.local-dialog::backdrop,
.local-gallery::backdrop {
    background: #18252c77;
    backdrop-filter: blur(12px)
}

.local-dialog h2 {
    font-size: var(--type-dialog-title);
    line-height: 1.15;
    font-weight: 550;
    letter-spacing: -.035em;
    margin: 0;
    padding-right: 28px
}

.local-subtitle {
    margin: 10px 0 20px;
    font-size: var(--type-small);
    line-height: 1.5;
    color: var(--muted)
}

.local-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-control);
    border: 1px solid var(--line-control);
    background: var(--surface);
    color: var(--ink);
    font-size: var(--type-prose-heading);
    cursor: pointer;
    z-index: 5;
    transition: background-color 150ms ease, transform 150ms var(--ease-feedback);
}
.local-close:active { transform: scale(.96); }

.local-step:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px
}

.local-step label {
    display: grid;
    gap: 6px;
    font-size: var(--type-caption);
    font-weight: 500;
    line-height: 1.4
}

.local-step input:not([type=checkbox]):not([type=file]) {
    width: 100%;
    min-width: 0;
    height: 46px;
    border: 1px solid var(--line-control);
    border-radius: var(--radius-control);
    background: var(--surface);
    padding: 11px 13px;
    font-size: var(--type-input);
    color: var(--ink)
}

.local-form-actions {
    display: grid;
    grid-template-columns: 1fr 140px 180px;
    gap: 10px;
    align-items: center;
    margin-top: 24px
}

.local-form-actions [hidden],
.local-step[hidden] {
    display: none !important
}

.local-form-actions #local-step-count {
    font-size: var(--type-micro);
    font-weight: 600;
    color: var(--muted)
}

.local-form-actions #local-next,
.local-form-actions #local-submit {
    grid-column: 3;
    grid-row: 1
}

.local-form-actions #local-prev {
    grid-column: 2;
    grid-row: 1
}

.local-primary,
.local-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: var(--radius-control);
    font-size: var(--type-control);
    line-height: 1.4;
    font-weight: 600;
    cursor: pointer
}

.local-primary {
    border: 1px solid var(--accent-border);
    background: var(--accent-fill);
    color: #29251e;
    box-shadow: inset 0 1px #fff8
}

.local-secondary {
    border: 1px solid var(--line-control);
    background: white;
    color: var(--ink)
}

.local-primary:hover,
.local-secondary:hover {
    filter: brightness(1.03);
    box-shadow: 0 6px 16px #a56a2226
}

.local-primary:active,
.local-secondary:active {
    transform: scale(.96)
}

.local-dialog a,
.local-cookie a {
    color: #79470e !important;
    text-decoration: underline !important;
    text-underline-offset: 3px
}

.local-consent {
    grid-column: 1/-1;
    display: flex !important;
    align-items: start;
    gap: 12px !important;
    font-size: var(--type-small) !important;
    line-height: 1.6 !important;
    font-weight: 400 !important
}

.local-consent input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: #a96b12;
    flex-shrink: 0
}

.local-photo-field {
    grid-column: 1/-1;
    padding: 20px;
    border: 1px dashed #91afbf;
    border-radius: var(--radius-control);
    background: var(--blue)
}

.local-photo-field>input {
    width: 100%;
    max-width: 100%;
    margin-top: 16px
}

.local-photo-field p {
    font-size: var(--type-micro);
    color: var(--muted);
    margin: 12px 0 0
}

#local-photo-preview {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

#local-photo-preview img {
    height: 80px;
    width: 80px;
    object-fit: contain;
    background: white;
    border-radius: 8px
}

.local-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px
}

#local-form-error {
    font-size: var(--type-caption);
    color: #a2402b;
    margin: 12px 0 0
}

.local-gallery {
    width: calc(100vw - 32px);
    height: calc(100dvh - 32px);
    max-width: 1200px;
    max-height: 1000px;
    margin: auto;
    padding: 64px 16px 20px;
    border: 1px solid var(--surface);
    border-radius: var(--radius-panel);
    background: #f7fafc;
    overflow: hidden
}

.local-gallery[open] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px
}

.local-gallery img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    min-height: 0
}

.local-gallery>button:not(.local-close) {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    padding: 0;
    height: 44px;
    width: 44px;
    border: 1px solid var(--line-control);
    background: #fffffff0;
    border-radius: var(--radius-control);
    font-size: var(--type-dialog-title);
    color: var(--ink);
    cursor: pointer;
    transition: background-color 150ms var(--ease-feedback), transform 150ms var(--ease-feedback)
}

.local-gallery>button[hidden] {
    display: none !important
}

#local-gallery-prev {
    inset-inline-start: 24px
}

#local-gallery-next {
    inset-inline-end: 24px
}

.local-gallery>button:not(.local-close) svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.local-gallery>button:not(.local-close):active {
    transform: scale(.96)
}

html[data-local-site]:has(.local-gallery[open]) {
    overflow: hidden
}

@media(hover:hover) and (pointer:fine) {
    .local-gallery>button:not(.local-close):hover {
        background: var(--action-featured-fill)
    }
    .local-close:hover { background: var(--action-featured-fill); }
}

@media(prefers-reduced-motion:reduce) {
    .local-gallery>button:not(.local-close), .local-close {
        transition: none !important;
        transform: none !important
    }
}

#local-gallery-count {
    grid-column: 1/-1;
    text-align: center;
    font-size: var(--type-caption);
    margin: 0
}

.local-cookie {
    position: fixed;
    z-index: 1000;
    bottom: 20px;
    left: 20px;
    width: 440px;
    max-width: calc(100% - 40px);
    padding: 22px;
    background: #fffffff2;
    border: 1px solid #d7e0e5;
    border-radius: var(--radius-panel);
    box-shadow: 0 18px 64px #18252c26;
    backdrop-filter: blur(16px)
}

.local-cookie h2 {
    font-size: var(--type-reading);
    font-weight: 600;
    margin: 0
}

.local-cookie p {
    font-size: var(--type-caption);
    line-height: 1.6;
    margin: 10px 0 16px;
    color: var(--muted)
}

.local-cookie[hidden] {
    display: none !important
}

.local-news-gallery {
    display: grid;
    gap: 12px
}

.local-news-gallery a:not(:first-child) {
    display: inline-block;
    width: calc(33.333% - 8px)
}

.local-news-gallery a:first-child {
    grid-column: 1/-1
}

.local-news-gallery img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-panel);
    background: var(--blue)
}

.local-dialog :focus-visible,
.local-gallery :focus-visible,
.local-cookie :focus-visible {
    outline: 2px solid #a96b12;
    outline-offset: 3px
}

.dv26-partners__logos>a {
    display: flex;
    align-items: center;
    justify-content: center
}

.local-step input[type=file]::file-selector-button {
    border: 1px solid #91afbf;
    border-radius: var(--radius-control);
    background: white;
    padding: 10px 12px;
    margin-right: 12px;
    font: inherit
}

.local-form-success {
    padding: 40px 0;
    color: #28593d
}

@media(max-width:640px) {
    .local-dialog {
        padding: 24px 20px;
        border-radius: var(--radius-panel)
    }

    .local-dialog h2 {
        font-size: 27px
    }

    .local-step:not([hidden]) {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .local-form-actions {
        grid-template-columns: 1fr 1fr;
        margin-top: 20px
    }

    .local-form-actions #local-step-count {
        grid-column: 1/-1;
        grid-row: 1
    }

    .local-form-actions #local-next,
    .local-form-actions #local-submit {
        grid-column: 2;
        grid-row: 2
    }

    .local-form-actions #local-prev {
        grid-column: 1;
        grid-row: 2
    }

    .local-close {
        right: 10px;
        top: 10px
    }

    .local-gallery {
        width: 100vw;
        height: 100dvh;
        max-width: none;
        max-height: none;
        border: 0;
        border-radius: 0;
        padding: calc(64px + env(safe-area-inset-top)) 8px calc(16px + env(safe-area-inset-bottom))
    }

    .local-gallery[open] {
        gap: 6px;
        grid-template-columns: minmax(0, 1fr)
    }

    .local-gallery>button:not(.local-close) {
        height: 44px;
        width: 44px
    }

    #local-gallery-prev {
        inset-inline-start: 12px
    }

    #local-gallery-next {
        inset-inline-end: 12px
    }

    .local-cookie {
        left: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 20px
    }

    .local-consent {
        font-size: var(--type-caption) !important
    }
}

@media(max-height:620px) {
    .local-dialog {
        padding: 20px
    }

    .local-subtitle {
        display: none
    }

    .local-dialog h2 {
        font-size: 24px;
        margin-bottom: 16px
    }

    .local-step:not([hidden]) {
        gap: 9px
    }

    .local-step label {
        gap: 4px
    }

    .local-form-actions {
        margin-top: 16px
    }

    .local-photo-field {
        padding: 12px
    }

    #local-photo-preview img {
        width: 50px;
        height: 50px
    }
}

@media(prefers-reduced-motion:no-preference) {

    .local-primary,
    .local-secondary {
        transition: transform 150ms cubic-bezier(.2, 0, 0, 1), box-shadow 150ms cubic-bezier(.2, 0, 0, 1)
    }
}
