.std-small-modal:has(.contact-report) {
    width: min(760px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.contact-report {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ui-surface);
    color: var(--ui-ink);
}

.contact-report__header {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ui-border);
}

.contact-report__heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-report__icon,
.contact-report__sender-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
}

.contact-report__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.1rem;
}

.contact-report__title {
    overflow-wrap: anywhere;
    color: var(--ui-ink);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.contact-report__close {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ui-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.contact-report__close:hover,
.contact-report__close:focus-visible {
    border-color: var(--ui-border);
    background: var(--ui-primary-soft);
    color: var(--ui-primary-strong);
    outline: none;
}

.contact-report__body {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.contact-report__sender {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface-muted);
}

.contact-report__sender-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.contact-report__sender-details {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.contact-report__sender-details strong {
    overflow: hidden;
    color: var(--ui-ink);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-report__meta-label,
.contact-report__limit {
    color: var(--ui-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.contact-report__field {
    min-width: 0;
}

.contact-report__field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.contact-report__field-header label {
    margin: 0;
    color: var(--ui-ink);
    font-weight: 700;
}

.contact-report__field textarea {
    width: 100%;
    min-height: 240px;
    max-height: 48vh;
    display: block;
    padding: 14px;
    resize: vertical;
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
    line-height: 1.5;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-report__field textarea::placeholder {
    color: var(--ui-muted);
    opacity: 0.8;
}

.contact-report__field textarea:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(60, 169, 225, 0.2);
    outline: none;
}

.contact-report__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--ui-border);
    background: var(--ui-surface-muted);
}

.contact-report__button {
    min-width: 120px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.contact-report__button:hover {
    transform: translateY(-1px);
}

.contact-report__button:focus-visible {
    outline: 3px solid rgba(60, 169, 225, 0.28);
    outline-offset: 2px;
}

.contact-report__button--cancel {
    border-color: var(--ui-border);
    background: var(--ui-surface);
    color: var(--ui-ink);
}

.contact-report__button--cancel:hover {
    border-color: var(--ui-primary);
    background: var(--ui-primary-soft);
}

.contact-report__button--send {
    border-color: #16835c;
    background: #16835c;
    color: #ffffff;
}

.contact-report__button--send:hover {
    border-color: #116a4a;
    background: #116a4a;
}

@media (max-width: 640px) {
    .std-small-modal:has(.contact-report) {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .contact-report__header,
    .contact-report__body,
    .contact-report__actions {
        padding-right: 16px;
        padding-left: 16px;
    }

    .contact-report__field textarea {
        min-height: 200px;
    }

    .contact-report__actions {
        align-items: stretch;
    }

    .contact-report__button {
        min-width: 0;
        flex: 1 1 0;
    }
}
