.dwf-block {
    --dwf-surface: rgba(255, 255, 255, 0.94);
    --dwf-surface-solid: #ffffff;
    --dwf-surface-soft: #f7faf7;
    --dwf-surface-active: #effdf3;
    --dwf-text: #101912;
    --dwf-heading: #08150c;
    --dwf-muted: #667269;
    --dwf-label: #3f4d43;
    --dwf-line: rgba(20, 120, 55, 0.14);
    --dwf-line-strong: rgba(7, 185, 79, 0.5);
    --dwf-green: #19e66a;
    --dwf-green-dark: #07b94f;
    --dwf-green-text: #087334;
    --dwf-red: #d9342e;
    --dwf-input: #f8faf8;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 0 max(24px, env(safe-area-inset-bottom));
    color: var(--dwf-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", sans-serif;
    font-weight: 450;
    line-height: 1.45;
    letter-spacing: 0;
}

.dwf-block *,
.dwf-block *::before,
.dwf-block *::after {
    box-sizing: border-box;
}

.dwf-block [hidden] {
    display: none !important;
}

.dwf-card {
    position: relative;
    width: 100%;
    margin: 0;
    padding: clamp(22px, 4.5vw, 34px);
    padding-bottom: max(clamp(22px, 4.5vw, 34px), env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid var(--dwf-line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 90% 8%, rgba(25, 230, 106, 0.11), transparent 180px),
        var(--dwf-surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dwf-card::after {
    content: "";
    position: absolute;
    top: 22px;
    right: 24px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--dwf-red);
    box-shadow: 0 0 0 6px rgba(217, 52, 46, 0.1);
}

.dwf-logo-wrap {
    display: grid;
    place-items: center;
    margin-bottom: 20px;
}

.dwf-logo {
    display: block;
    width: clamp(148px, 43vw, 220px);
    height: auto;
    max-height: 128px;
    object-fit: contain;
    border-radius: 24px;
    background: var(--dwf-surface-solid);
    padding: 10px 12px;
    box-shadow: 0 10px 28px rgba(16, 25, 18, 0.08);
}

.dwf-progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf4ee;
}

.dwf-progress span {
    display: block;
    width: 33%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--dwf-green), var(--dwf-green-dark));
    transition: width 180ms ease;
}

.dwf-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 11px 0 20px;
    color: var(--dwf-muted);
    font-size: 13px;
    font-weight: 500;
}

.dwf-meta [data-dwf-save-state] {
    flex: 0 0 auto;
    color: var(--dwf-green-text);
    font-size: 12px;
    font-weight: 600;
}

.dwf-step {
    display: grid;
    gap: 16px;
}

.dwf-step[hidden] {
    display: none;
}

.dwf-step h3 {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--dwf-heading);
    font-size: clamp(24px, 5vw, 32px);
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: 0;
}

.dwf-step h3::before,
.dwf-step h3::after {
    content: none !important;
    display: none !important;
}

.dwf-step p {
    margin: 0;
    color: var(--dwf-muted);
    font-size: 15px;
    font-weight: 450;
}

.dwf-options {
    display: grid;
    gap: 11px;
}

.dwf-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 68px;
    padding: 15px 16px;
    border: 1px solid #dfe8df;
    border-radius: 20px;
    background: rgba(248, 250, 248, 0.95);
    color: var(--dwf-text);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.dwf-option:hover,
.dwf-option:focus-visible {
    border-color: rgba(7, 185, 79, 0.34);
    background: #fbfdfb;
    box-shadow: 0 10px 26px rgba(20, 60, 30, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.dwf-option.is-selected {
    border-color: var(--dwf-line-strong);
    background: var(--dwf-surface-active);
    box-shadow: 0 12px 30px rgba(7, 185, 79, 0.12);
}

.dwf-dot {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1.5px solid #b8c6bb;
    border-radius: 999px;
    background: #ffffff;
}

.dwf-option.is-selected .dwf-dot {
    border-color: var(--dwf-green-dark);
    background: linear-gradient(135deg, var(--dwf-green), var(--dwf-green-dark));
}

.dwf-option.is-selected .dwf-dot::after {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

.dwf-needs-choice .dwf-option {
    animation: dwf-pulse 420ms ease;
}

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

.dwf-field {
    display: grid;
    gap: 7px;
    color: var(--dwf-label);
    font-size: 13px;
    font-weight: 600;
}

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

.dwf-field input,
.dwf-field textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid #dfe6df;
    border-radius: 16px;
    background: var(--dwf-input);
    color: var(--dwf-text);
    font: inherit;
    font-size: 16px;
    font-weight: 450;
    padding: 13px 14px;
    outline: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dwf-field textarea {
    height: 94px;
    min-height: 92px;
    resize: vertical;
}

.dwf-field input:focus,
.dwf-field textarea:focus {
    border-color: var(--dwf-green-dark);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(25, 230, 106, 0.16);
}

.dwf-field.has-error input {
    border-color: var(--dwf-red);
    box-shadow: 0 0 0 4px rgba(217, 52, 46, 0.14);
}

.dwf-actions {
    display: flex;
    gap: 11px;
    justify-content: flex-end;
    margin-top: 22px;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
}

.dwf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    min-width: 118px;
    padding: 0 22px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.dwf-button-primary {
    border: 0;
    background: linear-gradient(135deg, var(--dwf-green), var(--dwf-green-dark));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(7, 185, 79, 0.24);
}

.dwf-button-secondary {
    border: 1px solid #dce5dc;
    background: rgba(247, 250, 247, 0.82);
    color: #263329;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.dwf-button:hover,
.dwf-button:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.dwf-button:active,
.dwf-option:active {
    transform: translateY(0);
}

.dwf-thanks {
    min-height: 168px;
    align-content: center;
    text-align: center;
}

.dwf-thanks::before {
    content: "";
    width: 50px;
    height: 50px;
    margin: 0 auto 6px;
    border-radius: 999px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.4 4.4L19 7.3'/%3E%3C/svg%3E") center / 24px 24px no-repeat,
        linear-gradient(135deg, rgba(25, 230, 106, 0.95), rgba(7, 185, 79, 0.95));
    box-shadow: 0 0 0 10px rgba(25, 230, 106, 0.12);
}

.dwf-thanks h3 {
    font-size: clamp(23px, 5vw, 30px);
}

.dwf-thanks p {
    max-width: 28rem;
    margin: 0 auto;
}

.dwf-status-error {
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid rgba(217, 52, 46, 0.28);
    border-radius: 16px;
    background: rgba(217, 52, 46, 0.08);
    color: #8f211c;
    font-size: 14px;
    font-weight: 500;
}

@keyframes dwf-pulse {
    0%,
    100% {
        transform: translateX(0);
    }
    35% {
        transform: translateX(-3px);
    }
    70% {
        transform: translateX(3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dwf-progress span,
    .dwf-option,
    .dwf-button,
    .dwf-field input,
    .dwf-field textarea {
        transition: none;
    }

    .dwf-needs-choice .dwf-option {
        animation: none;
    }
}

@media (max-width: 560px) {
    .dwf-block {
        max-width: 100%;
    }

    .dwf-card {
        padding: 20px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        border-radius: 28px;
    }

    .dwf-logo-wrap {
        margin-bottom: 18px;
    }

    .dwf-logo {
        width: clamp(142px, 52vw, 190px);
        max-height: 116px;
        border-radius: 22px;
        padding: 9px 11px;
    }

    .dwf-meta {
        margin-bottom: 18px;
        font-size: 12px;
    }

    .dwf-step {
        gap: 14px;
    }

    .dwf-step h3 {
        font-size: clamp(23px, 7vw, 29px);
    }

    .dwf-option {
        min-height: 66px;
        padding: 14px 15px;
        border-radius: 19px;
    }

    .dwf-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dwf-field textarea {
        height: 90px;
        min-height: 88px;
    }

    .dwf-actions {
        justify-content: stretch;
        gap: 10px;
        margin-top: 20px;
    }

    .dwf-button {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 52px;
        padding-right: 14px;
        padding-left: 14px;
    }
}
