.community-side-customer-service[hidden],
.frontend-contact-floating[hidden],
.contact-float[hidden] {
    display: none !important;
}

body.contact-entry-hidden .contact-float[data-frontend-contact-bound="true"]:not([hidden]) {
    display: inline-flex !important;
}

.frontend-contact-floating {
    position: fixed;
    right: max(22px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 11000;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    touch-action: manipulation;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, opacity 160ms ease;
}

.contact-float[data-frontend-contact-bound="true"] {
    right: max(22px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
}

.frontend-contact-floating svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.frontend-contact-floating span {
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.frontend-contact-floating:hover {
    border-color: rgba(96, 165, 250, 0.38);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.frontend-contact-floating:active {
    transform: translateY(0) scale(0.98);
}

.frontend-contact-floating:focus-visible,
.contact-float[data-frontend-contact-bound="true"]:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.34);
    outline-offset: 3px;
}

:is(html[data-theme="light"], body.light-mode) .frontend-contact-floating {
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

:is(html[data-theme="light"], body.light-mode) .frontend-contact-floating:hover {
    background: #ffffff;
}

body.frontend-contact-open .frontend-contact-floating,
body.frontend-contact-open .contact-float[data-frontend-contact-bound="true"],
body.frontend-mobile-nav-sheet-open .frontend-contact-floating,
body.frontend-mobile-nav-sheet-open .contact-float[data-frontend-contact-bound="true"],
html.community-mobile-sidebar-open .frontend-contact-floating,
html.community-mobile-sidebar-open .contact-float[data-frontend-contact-bound="true"] {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .frontend-contact-floating,
    .contact-float[data-frontend-contact-bound="true"] {
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(14px + env(safe-area-inset-bottom));
        min-height: 40px;
        padding: 0 14px;
    }

    body.frontend-mobile-nav-page .frontend-contact-floating,
    body.frontend-mobile-nav-page .contact-float[data-frontend-contact-bound="true"] {
        bottom: calc(var(--frontend-mobile-nav-height, 70px) + 14px + env(safe-area-inset-bottom));
    }

    body.community-home-body .frontend-contact-floating,
    body.community-home-body .contact-float {
        bottom: calc(var(--frontend-mobile-nav-height, 70px) + 64px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .frontend-contact-floating,
    .contact-float[data-frontend-contact-bound="true"] {
        transition: none;
    }

    .frontend-contact-floating:hover,
    .frontend-contact-floating:active,
    .contact-float[data-frontend-contact-bound="true"]:hover,
    .contact-float[data-frontend-contact-bound="true"]:active {
        transform: none;
    }
}

.frontend-contact-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(6px);
}

.frontend-contact-overlay.is-open {
    display: flex;
}

.frontend-contact-dialog {
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.frontend-contact-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #eef0f3;
}

.frontend-contact-title {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.frontend-contact-desc {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
}

.frontend-contact-close {
    width: 32px;
    height: 32px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.frontend-contact-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.frontend-contact-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.frontend-contact-tabs {
    display: grid;
    grid-template-columns: repeat(var(--frontend-contact-tab-count, 2), minmax(0, 1fr));
    gap: 5px;
    padding: 12px 20px 0;
}

.frontend-contact-tab {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.frontend-contact-tab:hover {
    background: #f8fafc;
    color: #334155;
}

.frontend-contact-tab.is-active {
    border-color: #dfe3ea;
    background: #f3f5f8;
    color: #111827;
}

.frontend-contact-panel[hidden] {
    display: none !important;
}

.frontend-contact-panel {
    min-height: 0;
    overflow-y: auto;
}

.frontend-contact-body {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 20px;
}

.frontend-contact-empty {
    width: 100%;
    margin: 0;
    padding: 24px 12px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}

.frontend-contact-qr {
    width: 220px;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.frontend-contact-wechat {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.frontend-contact-wechat span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.frontend-contact-wechat strong {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontend-contact-copy {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.frontend-contact-copy:hover {
    background: #15803d;
}

.frontend-feedback-form {
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
}

.frontend-feedback-intro {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border: 1px solid #e7e9f4;
    border-radius: 10px;
    background: #f8f8ff;
}

.frontend-feedback-intro strong {
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
}

.frontend-feedback-intro span {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.55;
}

.frontend-feedback-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.frontend-feedback-types label {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.frontend-feedback-types input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.frontend-feedback-types span {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.frontend-feedback-types input:checked + span {
    border-color: #8177ed;
    background: #f1efff;
    color: #5145cd;
}

.frontend-feedback-types input:focus-visible + span {
    outline: 3px solid rgba(99, 102, 241, 0.2);
    outline-offset: 2px;
}

.frontend-feedback-field {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.frontend-feedback-field > span {
    color: #374151;
    font-size: 12px;
    font-weight: 750;
}

.frontend-feedback-field > span em,
.frontend-feedback-field > span i {
    margin-left: 4px;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.frontend-feedback-field > span em {
    color: #dc5b5b;
}

.frontend-feedback-field > span i {
    color: #9ca3af;
}

.frontend-feedback-field textarea,
.frontend-feedback-field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dfe3e9;
    border-radius: 9px;
    outline: 0;
    background: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.frontend-feedback-field textarea {
    min-height: 116px;
    padding: 10px 12px 24px;
    resize: vertical;
}

.frontend-feedback-field input {
    min-height: 42px;
    padding: 0 12px;
}

.frontend-feedback-field textarea::placeholder,
.frontend-feedback-field input::placeholder {
    color: #a0a7b3;
}

.frontend-feedback-field textarea:focus,
.frontend-feedback-field input:focus {
    border-color: #8177ed;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.frontend-feedback-field textarea[aria-invalid="true"] {
    border-color: #dc5b5b;
}

.frontend-feedback-field small {
    justify-self: end;
    margin-top: -28px;
    padding: 0 9px 8px 0;
    color: #9ca3af;
    font-size: 10px;
    pointer-events: none;
}

.frontend-feedback-field small b {
    font-weight: 700;
}

.frontend-feedback-upload {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.frontend-feedback-upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.frontend-feedback-upload-head > span {
    color: #374151;
    font-size: 12px;
    font-weight: 750;
}

.frontend-feedback-upload-head > span i {
    margin-left: 4px;
    color: #9ca3af;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.frontend-feedback-upload-head > small {
    color: #9ca3af;
    font-size: 10px;
}

.frontend-feedback-upload-picker {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border: 1px dashed #cfd5df;
    border-radius: 9px;
    background: #fafbfc;
    color: #667085;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.frontend-feedback-upload-picker:hover,
.frontend-feedback-upload-picker:focus-within {
    border-color: #8177ed;
    background: #f8f7ff;
    color: #5145cd;
}

.frontend-feedback-upload-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.frontend-feedback-upload-picker svg {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 7px;
    border-radius: 8px;
    background: #efedff;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.frontend-feedback-upload-picker > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.frontend-feedback-upload-picker strong {
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

.frontend-feedback-upload-picker small {
    overflow: hidden;
    color: #8a919e;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontend-feedback-image-preview {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #e3e6eb;
    border-radius: 9px;
    background: #f8fafc;
}

.frontend-feedback-image-preview[hidden] {
    display: none !important;
}

.frontend-feedback-image-preview img {
    width: 88px;
    height: 64px;
    display: block;
    flex: 0 0 88px;
    border-radius: 7px;
    background: #eef0f4;
    object-fit: cover;
}

.frontend-feedback-image-preview button {
    min-height: 34px;
    margin-left: auto;
    padding: 0 11px;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #b04444;
    font-family: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.frontend-feedback-image-preview button:hover {
    border-color: #eccaca;
    background: #fff7f7;
}

.frontend-feedback-status {
    min-height: 18px;
    margin: -2px 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.frontend-feedback-status:empty {
    min-height: 0;
}

.frontend-feedback-status[data-state="success"] {
    color: #15803d;
}

.frontend-feedback-status[data-state="error"] {
    color: #c2413b;
}

.frontend-contact-dialog .frontend-feedback-submit {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    background: linear-gradient(120deg, #2563eb 0%, #635bff 48%, #7c3aed 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(30, 27, 75, 0.22);
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.frontend-feedback-submit::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: -45%;
    left: -55%;
    width: 38%;
    height: 190%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    pointer-events: none;
    transform: skewX(-18deg);
    transition: left 560ms ease;
}

.frontend-feedback-submit > * {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.frontend-feedback-submit-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.frontend-feedback-submit-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.frontend-feedback-submit-label {
    line-height: 1;
}

.frontend-feedback-submit-arrow {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
}

.frontend-feedback-submit-spinner {
    width: 17px;
    height: 17px;
    display: none;
    flex: 0 0 17px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: frontend-feedback-submit-spin 700ms linear infinite;
}

.frontend-feedback-submit:hover:not(:disabled) {
    filter: saturate(1.08) brightness(1.04);
    box-shadow: 0 17px 34px rgba(79, 70, 229, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
}

.frontend-feedback-submit:hover:not(:disabled)::before {
    left: 118%;
}

.frontend-feedback-submit:hover:not(:disabled) .frontend-feedback-submit-arrow {
    transform: translateX(3px);
}

.frontend-feedback-submit:active:not(:disabled) {
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(0) scale(0.99);
}

.frontend-feedback-submit:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.24);
    outline-offset: 3px;
}

.frontend-feedback-submit:disabled {
    cursor: not-allowed;
    filter: saturate(0.72);
    opacity: 0.62;
    box-shadow: 0 7px 16px rgba(79, 70, 229, 0.18);
    transform: none;
}

.frontend-feedback-submit.is-loading {
    cursor: progress;
    filter: none;
    opacity: 0.88;
}

.frontend-feedback-submit.is-loading .frontend-feedback-submit-icon,
.frontend-feedback-submit.is-loading .frontend-feedback-submit-arrow {
    display: none;
}

.frontend-feedback-submit.is-loading .frontend-feedback-submit-spinner {
    display: inline-block;
}

@keyframes frontend-feedback-submit-spin {
    to { transform: rotate(360deg); }
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-dialog .frontend-feedback-submit {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 14px 30px rgba(34, 31, 105, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 520px) {
    .frontend-contact-dialog .frontend-feedback-submit {
        min-height: 52px;
        border-radius: 12px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frontend-feedback-submit,
    .frontend-feedback-submit::before,
    .frontend-feedback-submit-arrow,
    .frontend-feedback-submit-spinner {
        animation: none;
        transition: none;
    }
}

.frontend-feedback-history {
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
}

.frontend-feedback-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.frontend-feedback-history-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.frontend-feedback-history-head strong {
    color: #1f2937;
    font-size: 14px;
    font-weight: 800;
}

.frontend-feedback-history-head span {
    color: #8a919e;
    font-size: 11px;
}

.frontend-feedback-history-head button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dfe3e9;
    border-radius: 8px;
    background: #ffffff;
    color: #5b6472;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.frontend-feedback-history-head button:hover {
    border-color: #c9ced7;
    background: #f8fafc;
    color: #1f2937;
}

.frontend-feedback-history-list {
    display: grid;
    gap: 10px;
}

.frontend-feedback-history-item {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #ffffff;
}

.frontend-feedback-history-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.frontend-feedback-history-item-head > div {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.frontend-feedback-history-item-head strong {
    color: #1f2937;
    font-size: 12px;
    font-weight: 850;
}

.frontend-feedback-history-item-head span {
    color: #7a8392;
    font-size: 11px;
}

.frontend-feedback-status-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff5d9;
    color: #a66408;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.frontend-feedback-status-badge.is-processing {
    background: #eaf2ff;
    color: #376dc7;
}

.frontend-feedback-status-badge.is-resolved {
    background: #e9f9ef;
    color: #23804a;
}

.frontend-feedback-status-badge.is-closed {
    background: #f0f1f4;
    color: #68707d;
}

.frontend-feedback-history-content,
.frontend-feedback-history-reply p {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.frontend-feedback-history-content {
    color: #414957;
    font-size: 12px;
    line-height: 1.65;
}

.frontend-feedback-history-image {
    width: min(100%, 280px);
    display: block;
    overflow: hidden;
    border: 1px solid #e3e6eb;
    border-radius: 9px;
    background: #f4f5f7;
}

.frontend-feedback-history-image img {
    width: 100%;
    max-height: 220px;
    display: block;
    object-fit: contain;
}

.frontend-feedback-history-reply {
    display: grid;
    gap: 5px;
    padding: 10px 11px;
    border: 1px solid #e7e4ff;
    border-radius: 9px;
    background: #f7f5ff;
}

.frontend-feedback-history-reply strong {
    color: #5145cd;
    font-size: 11px;
    font-weight: 800;
}

.frontend-feedback-history-reply p {
    color: #4b5563;
    font-size: 12px;
    line-height: 1.65;
}

.frontend-feedback-history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    color: #9aa1ad;
    font-size: 10px;
}

.frontend-feedback-history-meta a {
    color: #6758f3;
    font-weight: 700;
    text-decoration: none;
}

.frontend-feedback-history-meta a:hover {
    text-decoration: underline;
}

.frontend-feedback-history-empty {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 38px 16px;
    border: 1px dashed #dfe3e9;
    border-radius: 11px;
    color: #7a8392;
    text-align: center;
}

.frontend-feedback-history-empty p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
}

.frontend-feedback-history-empty a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 8px;
    background: #6758f3;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

html[data-theme="dark"] .frontend-contact-dialog {
    border-color: #303543;
    background: #181a22;
    color: #f4f5f9;
}

html[data-theme="dark"] .frontend-contact-head {
    border-color: #2d3140;
}

html[data-theme="dark"] .frontend-contact-title,
html[data-theme="dark"] .frontend-contact-wechat strong {
    color: #f4f5f9;
}

html[data-theme="dark"] .frontend-contact-desc,
html[data-theme="dark"] .frontend-contact-wechat span,
html[data-theme="dark"] .frontend-contact-empty {
    color: #a8afbf;
}

html[data-theme="dark"] .frontend-contact-close {
    color: #b6bccb;
}

html[data-theme="dark"] .frontend-contact-close:hover {
    background: #252832;
    color: #ffffff;
}

html[data-theme="dark"] .frontend-contact-wechat {
    border-color: #303543;
    background: #20232d;
}

body.frontend-contact-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .frontend-contact-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .frontend-contact-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        overflow: hidden;
    }

    .frontend-contact-head {
        padding: 17px 17px 13px;
    }

    .frontend-contact-tabs {
        padding: 10px 17px 0;
    }

    .frontend-contact-body {
        gap: 13px;
        padding: 17px;
    }

    .frontend-feedback-form,
    .frontend-feedback-history {
        gap: 13px;
        padding: 15px 17px 17px;
    }

    .frontend-feedback-field textarea {
        min-height: 108px;
    }

    .frontend-contact-qr {
        width: min(210px, 70vw);
    }
}

/* Match every theme state used by the frontend shell. */
html[data-theme="dark"] .frontend-contact-overlay,
body.dark-mode .frontend-contact-overlay,
body.profile-dashboard-dark .frontend-contact-overlay {
    background: rgba(2, 4, 9, 0.74);
}

html[data-theme="dark"] .frontend-contact-dialog,
body.dark-mode .frontend-contact-dialog,
body.profile-dashboard-dark .frontend-contact-dialog {
    border-color: #343947;
    background: #171920;
    color: #f5f6fa;
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.52);
}

html[data-theme="dark"] .frontend-contact-head,
body.dark-mode .frontend-contact-head,
body.profile-dashboard-dark .frontend-contact-head {
    border-bottom-color: #2d313d;
}

html[data-theme="dark"] :where(.frontend-contact-title, .frontend-contact-wechat strong),
body.dark-mode :where(.frontend-contact-title, .frontend-contact-wechat strong),
body.profile-dashboard-dark :where(.frontend-contact-title, .frontend-contact-wechat strong) {
    color: #f4f6fa;
}

html[data-theme="dark"] :where(.frontend-contact-desc, .frontend-contact-wechat span, .frontend-contact-empty),
body.dark-mode :where(.frontend-contact-desc, .frontend-contact-wechat span, .frontend-contact-empty),
body.profile-dashboard-dark :where(.frontend-contact-desc, .frontend-contact-wechat span, .frontend-contact-empty) {
    color: #abb2c1;
}

html[data-theme="dark"] .frontend-contact-wechat,
body.dark-mode .frontend-contact-wechat,
body.profile-dashboard-dark .frontend-contact-wechat {
    border-color: #363b49;
    background: #20232c;
}

html[data-theme="dark"] .frontend-contact-qr,
body.dark-mode .frontend-contact-qr,
body.profile-dashboard-dark .frontend-contact-qr {
    border-color: #3a3f4d;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .frontend-contact-close,
body.dark-mode .frontend-contact-close,
body.profile-dashboard-dark .frontend-contact-close {
    color: #bec4d0;
}

html[data-theme="dark"] .frontend-contact-close:hover,
body.dark-mode .frontend-contact-close:hover,
body.profile-dashboard-dark .frontend-contact-close:hover {
    background: #282c36;
    color: #ffffff;
}

html[data-theme="dark"] :where(.frontend-contact-tab, .frontend-feedback-intro span, .frontend-feedback-types span),
body.dark-mode :where(.frontend-contact-tab, .frontend-feedback-intro span, .frontend-feedback-types span),
body.profile-dashboard-dark :where(.frontend-contact-tab, .frontend-feedback-intro span, .frontend-feedback-types span) {
    color: #aeb5c4;
}

html[data-theme="dark"] .frontend-contact-tab:hover,
body.dark-mode .frontend-contact-tab:hover,
body.profile-dashboard-dark .frontend-contact-tab:hover {
    background: #20232c;
    color: #f4f6fa;
}

html[data-theme="dark"] .frontend-contact-tab.is-active,
body.dark-mode .frontend-contact-tab.is-active,
body.profile-dashboard-dark .frontend-contact-tab.is-active {
    border-color: #3a3f4d;
    background: #252832;
    color: #ffffff;
}

html[data-theme="dark"] .frontend-feedback-intro,
body.dark-mode .frontend-feedback-intro,
body.profile-dashboard-dark .frontend-feedback-intro {
    border-color: #343947;
    background: #1d2028;
}

html[data-theme="dark"] :where(.frontend-feedback-intro strong, .frontend-feedback-field > span),
body.dark-mode :where(.frontend-feedback-intro strong, .frontend-feedback-field > span),
body.profile-dashboard-dark :where(.frontend-feedback-intro strong, .frontend-feedback-field > span) {
    color: #eef0f5;
}

html[data-theme="dark"] .frontend-feedback-types span,
body.dark-mode .frontend-feedback-types span,
body.profile-dashboard-dark .frontend-feedback-types span {
    border-color: #363b49;
    background: #1e2129;
}

html[data-theme="dark"] .frontend-feedback-types input:checked + span,
body.dark-mode .frontend-feedback-types input:checked + span,
body.profile-dashboard-dark .frontend-feedback-types input:checked + span {
    border-color: #7165dc;
    background: #302c51;
    color: #d9d5ff;
}

html[data-theme="dark"] :where(.frontend-feedback-field textarea, .frontend-feedback-field input),
body.dark-mode :where(.frontend-feedback-field textarea, .frontend-feedback-field input),
body.profile-dashboard-dark :where(.frontend-feedback-field textarea, .frontend-feedback-field input) {
    border-color: #363b49;
    background: #1e2129;
    color: #f4f6fa;
}

html[data-theme="dark"] :where(.frontend-feedback-field textarea::placeholder, .frontend-feedback-field input::placeholder),
body.dark-mode :where(.frontend-feedback-field textarea::placeholder, .frontend-feedback-field input::placeholder),
body.profile-dashboard-dark :where(.frontend-feedback-field textarea::placeholder, .frontend-feedback-field input::placeholder) {
    color: #777f90;
}

html[data-theme="dark"] :where(.frontend-feedback-upload-head > span, .frontend-feedback-upload-picker strong),
body.dark-mode :where(.frontend-feedback-upload-head > span, .frontend-feedback-upload-picker strong),
body.profile-dashboard-dark :where(.frontend-feedback-upload-head > span, .frontend-feedback-upload-picker strong) {
    color: #eef0f5;
}

html[data-theme="dark"] :where(.frontend-feedback-upload-picker, .frontend-feedback-image-preview),
body.dark-mode :where(.frontend-feedback-upload-picker, .frontend-feedback-image-preview),
body.profile-dashboard-dark :where(.frontend-feedback-upload-picker, .frontend-feedback-image-preview) {
    border-color: #3b4150;
    background: #1d2028;
    color: #b8bfcc;
}

html[data-theme="dark"] .frontend-feedback-upload-picker:hover,
html[data-theme="dark"] .frontend-feedback-upload-picker:focus-within,
body.dark-mode .frontend-feedback-upload-picker:hover,
body.dark-mode .frontend-feedback-upload-picker:focus-within,
body.profile-dashboard-dark .frontend-feedback-upload-picker:hover,
body.profile-dashboard-dark .frontend-feedback-upload-picker:focus-within {
    border-color: #7165dc;
    background: #28243f;
    color: #d9d5ff;
}

html[data-theme="dark"] .frontend-feedback-image-preview button,
body.dark-mode .frontend-feedback-image-preview button,
body.profile-dashboard-dark .frontend-feedback-image-preview button {
    border-color: #454b59;
    background: #252832;
    color: #f0a3a3;
}

html[data-theme="dark"] .frontend-feedback-history-image,
body.dark-mode .frontend-feedback-history-image,
body.profile-dashboard-dark .frontend-feedback-history-image {
    border-color: #3a3f4d;
    background: #14161c;
}

html[data-theme="dark"] .frontend-feedback-status[data-state="success"],
body.dark-mode .frontend-feedback-status[data-state="success"],
body.profile-dashboard-dark .frontend-feedback-status[data-state="success"] {
    color: #5edb8c;
}

html[data-theme="dark"] .frontend-feedback-status[data-state="error"],
body.dark-mode .frontend-feedback-status[data-state="error"],
body.profile-dashboard-dark .frontend-feedback-status[data-state="error"] {
    color: #f08b87;
}

html[data-theme="dark"] :where(.frontend-feedback-history-head strong, .frontend-feedback-history-item-head strong),
body.dark-mode :where(.frontend-feedback-history-head strong, .frontend-feedback-history-item-head strong),
body.profile-dashboard-dark :where(.frontend-feedback-history-head strong, .frontend-feedback-history-item-head strong) {
    color: #f1f3f7;
}

html[data-theme="dark"] :where(.frontend-feedback-history-head span, .frontend-feedback-history-item-head span, .frontend-feedback-history-content, .frontend-feedback-history-empty),
body.dark-mode :where(.frontend-feedback-history-head span, .frontend-feedback-history-item-head span, .frontend-feedback-history-content, .frontend-feedback-history-empty),
body.profile-dashboard-dark :where(.frontend-feedback-history-head span, .frontend-feedback-history-item-head span, .frontend-feedback-history-content, .frontend-feedback-history-empty) {
    color: #aeb5c4;
}

html[data-theme="dark"] :where(.frontend-feedback-history-head button, .frontend-feedback-history-item),
body.dark-mode :where(.frontend-feedback-history-head button, .frontend-feedback-history-item),
body.profile-dashboard-dark :where(.frontend-feedback-history-head button, .frontend-feedback-history-item) {
    border-color: #363b49;
    background: #1e2129;
    color: #c7ccd6;
}

html[data-theme="dark"] :where(.frontend-feedback-history-head button:hover, .frontend-feedback-history-reply),
body.dark-mode :where(.frontend-feedback-history-head button:hover, .frontend-feedback-history-reply),
body.profile-dashboard-dark :where(.frontend-feedback-history-head button:hover, .frontend-feedback-history-reply) {
    border-color: #484f60;
    background: #28243f;
    color: #ffffff;
}

html[data-theme="dark"] .frontend-feedback-history-reply p,
body.dark-mode .frontend-feedback-history-reply p,
body.profile-dashboard-dark .frontend-feedback-history-reply p {
    color: #d0d4de;
}

html[data-theme="dark"] .frontend-feedback-history-empty,
body.dark-mode .frontend-feedback-history-empty,
body.profile-dashboard-dark .frontend-feedback-history-empty {
    border-color: #3a3f4d;
}

.frontend-feedback-upload-picker.is-dragging,
.frontend-feedback-upload-picker.is-dragging:hover {
    border-color: #6758f3;
    background: #f0eeff;
    color: #5145cd;
    box-shadow: inset 0 0 0 2px rgba(103, 88, 243, 0.12);
}

.frontend-feedback-upload-picker.has-files {
    min-height: 50px;
}

.frontend-feedback-upload-list {
    display: grid;
    gap: 8px;
}

.frontend-feedback-upload-list[hidden] {
    display: none !important;
}

.frontend-feedback-upload-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #e3e6eb;
    border-radius: 9px;
    background: #f8fafc;
}

.frontend-feedback-upload-item img {
    width: 78px;
    height: 58px;
    display: block;
    border-radius: 7px;
    background: #eef0f4;
    object-fit: cover;
}

.frontend-feedback-upload-item-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.frontend-feedback-upload-item-info strong,
.frontend-feedback-upload-item-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontend-feedback-upload-item-info strong {
    color: #374151;
    font-size: 11px;
    font-weight: 750;
}

.frontend-feedback-upload-item-info small {
    color: #8a919e;
    font-size: 9px;
}

.frontend-feedback-upload-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.frontend-feedback-upload-item-actions button,
.frontend-feedback-history-meta button,
.frontend-feedback-thread-head > button {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid #dfe3e9;
    border-radius: 7px;
    background: #ffffff;
    color: #5b6472;
    font-family: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}

.frontend-feedback-upload-item-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.frontend-feedback-upload-item-actions .is-remove {
    color: #b04444;
}

.frontend-feedback-history-meta button {
    min-height: 32px;
    margin-left: auto;
    padding: 0 11px;
    color: #5145cd;
    font-size: 10px;
}

.frontend-feedback-message-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.frontend-feedback-message-images a {
    min-width: 0;
    display: block;
    overflow: hidden;
    border: 1px solid #e3e6eb;
    border-radius: 8px;
    background: #f4f5f7;
}

.frontend-feedback-message-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
}

.frontend-feedback-thread {
    display: grid;
    gap: 16px;
    padding: 18px 20px 20px;
}

.frontend-feedback-thread[hidden],
.frontend-feedback-followup[hidden] {
    display: none !important;
}

.frontend-feedback-thread-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.frontend-feedback-thread-head > button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 10px;
}

.frontend-feedback-thread-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.frontend-feedback-thread-head strong,
.frontend-feedback-thread-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontend-feedback-thread-head strong {
    color: #1f2937;
    font-size: 13px;
    font-weight: 850;
}

.frontend-feedback-thread-head span {
    color: #8a919e;
    font-size: 10px;
}

.frontend-feedback-timeline {
    min-height: 120px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    background: #f7f8fa;
}

.frontend-feedback-message {
    width: min(88%, 500px);
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #e2e5ea;
    border-radius: 11px 11px 11px 3px;
    background: #ffffff;
}

.frontend-feedback-message.is-user {
    justify-self: end;
    border-color: #dedafa;
    border-radius: 11px 11px 3px 11px;
    background: #f2f0ff;
}

.frontend-feedback-message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.frontend-feedback-message-head strong {
    color: #5145cd;
    font-size: 10px;
    font-weight: 850;
}

.frontend-feedback-message.is-admin .frontend-feedback-message-head strong {
    color: #2366a8;
}

.frontend-feedback-message-head time {
    color: #9aa1ad;
    font-size: 9px;
}

.frontend-feedback-message > p {
    margin: 0;
    color: #414957;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.frontend-feedback-followup {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.frontend-feedback-followup .frontend-feedback-field textarea {
    min-height: 86px;
    padding-bottom: 10px;
}

.frontend-followup-status,
.frontend-feedback-thread-closed {
    min-height: 0;
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.55;
}

.frontend-followup-status[data-state="success"] {
    color: #15803d;
}

.frontend-followup-status[data-state="error"],
.frontend-feedback-thread-closed {
    color: #c2413b;
}

.frontend-feedback-thread-closed {
    padding: 12px 13px;
    border: 1px solid #f0d3d1;
    border-radius: 9px;
    background: #fff8f7;
    text-align: center;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-feedback-upload-item,
    .frontend-feedback-upload-item-actions button,
    .frontend-feedback-history-meta button,
    .frontend-feedback-thread-head > button,
    .frontend-feedback-timeline,
    .frontend-feedback-message
) {
    border-color: #3a3f4d;
    background: #1e2129;
    color: #c7ccd6;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-feedback-message.is-user {
    border-color: #514a86;
    background: #2a2742;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-feedback-upload-item-info strong,
    .frontend-feedback-thread-head strong,
    .frontend-feedback-message > p
) {
    color: #eef0f5;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-feedback-message-images a,
    .frontend-feedback-upload-item img
) {
    border-color: #3a3f4d;
    background: #14161c;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-feedback-upload-picker.is-dragging {
    border-color: #8c82f2;
    background: #302c51;
    color: #e2dfff;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-followup-status[data-state="success"] {
    color: #5edb8c;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-followup-status[data-state="error"],
    .frontend-feedback-thread-closed
) {
    color: #f08b87;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-feedback-thread-closed {
    border-color: #573a3c;
    background: #2b2022;
}

@media (max-width: 520px) {
    .frontend-feedback-thread {
        gap: 13px;
        padding: 15px 17px 17px;
    }

    .frontend-feedback-upload-item {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .frontend-feedback-upload-item img {
        width: 62px;
        height: 52px;
    }

    .frontend-feedback-upload-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .frontend-feedback-message {
        width: 94%;
    }

    .frontend-feedback-thread-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .frontend-feedback-thread-head > em {
        grid-column: 2;
        justify-self: start;
    }
}

/* Shared service-center presentation layer. */
.frontend-contact-overlay {
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(10px) saturate(1.08);
}

.frontend-contact-dialog {
    --frontend-contact-surface: #ffffff;
    --frontend-contact-surface-soft: #f7f9fc;
    --frontend-contact-surface-strong: #eef2f7;
    --frontend-contact-border: #dfe5ed;
    --frontend-contact-border-strong: #cfd7e3;
    --frontend-contact-text: #172033;
    --frontend-contact-text-soft: #647084;
    --frontend-contact-accent: #5b5ce2;
    --frontend-contact-accent-soft: #eeefff;
    width: min(900px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    border: 1px solid var(--frontend-contact-border);
    border-radius: 24px;
    background: var(--frontend-contact-surface);
    color: var(--frontend-contact-text);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.3), 0 8px 24px rgba(15, 23, 42, 0.12);
}

.frontend-contact-overlay.is-open .frontend-contact-dialog {
    animation: frontend-contact-dialog-enter 180ms ease-out both;
}

@keyframes frontend-contact-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.frontend-contact-dialog [hidden] {
    display: none !important;
}

.frontend-contact-head {
    position: relative;
    align-items: center;
    gap: 20px;
    padding: 25px 28px 19px;
    overflow: hidden;
    border-bottom-color: var(--frontend-contact-border);
    background:
        radial-gradient(circle at 86% -20%, rgba(91, 92, 226, 0.16), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.frontend-contact-head-main {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 5px;
}

.frontend-contact-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid rgba(91, 92, 226, 0.2);
    border-radius: 999px;
    background: var(--frontend-contact-accent-soft);
    color: #5253cf;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.frontend-contact-title {
    color: var(--frontend-contact-text);
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 850;
    letter-spacing: -0.02em;
}

.frontend-contact-desc {
    max-width: 650px;
    margin-top: 0;
    color: var(--frontend-contact-text-soft);
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.frontend-contact-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--frontend-contact-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--frontend-contact-text-soft);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.frontend-contact-close:hover {
    border-color: var(--frontend-contact-border-strong);
    background: var(--frontend-contact-surface-strong);
    color: var(--frontend-contact-text);
    transform: translateY(-1px);
}

.frontend-contact-tabs {
    margin: 14px 24px 0;
    padding: 4px;
    border: 1px solid var(--frontend-contact-border);
    border-radius: 15px;
    background: var(--frontend-contact-surface-soft);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.frontend-contact-tab {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    color: var(--frontend-contact-text-soft);
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.frontend-contact-tab:hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--frontend-contact-text);
}

.frontend-contact-tab.is-active {
    border-color: transparent;
    background: var(--frontend-contact-surface);
    color: var(--frontend-contact-text);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.frontend-contact-panel {
    scrollbar-color: var(--frontend-contact-border-strong) transparent;
}

.frontend-contact-body {
    display: block;
    padding: 22px 24px 26px;
}

.frontend-contact-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.14fr) minmax(270px, 0.86fr);
    align-items: start;
    gap: 18px;
}

.frontend-contact-contact-grid.is-single {
    grid-template-columns: minmax(280px, 430px);
    justify-content: center;
}

.frontend-contact-custom-service,
.frontend-contact-channel {
    min-width: 0;
    box-sizing: border-box;
    border-radius: 20px;
}

.frontend-contact-custom-service {
    --frontend-custom-bg:
        radial-gradient(circle at 98% 4%, rgba(99, 102, 241, 0.14), transparent 32%),
        linear-gradient(145deg, #f8f9ff 0%, #f0f2ff 54%, #e9ecff 100%);
    --frontend-custom-border: #d7dcf7;
    --frontend-custom-text: #27304f;
    --frontend-custom-text-soft: #5f6984;
    --frontend-custom-badge-bg: rgba(255, 255, 255, 0.72);
    --frontend-custom-badge-border: rgba(99, 102, 241, 0.2);
    --frontend-custom-badge-text: #5556c9;
    --frontend-custom-stage-text: #5f6984;
    --frontend-custom-item-bg: rgba(255, 255, 255, 0.66);
    --frontend-custom-item-border: rgba(99, 102, 241, 0.14);
    --frontend-custom-marker-bg: #e0f5f8;
    --frontend-custom-marker-text: #147a8c;
    --frontend-custom-note-bg: rgba(255, 255, 255, 0.58);
    --frontend-custom-note-border: rgba(99, 102, 241, 0.14);
    --frontend-custom-note-text: #59647f;
    --frontend-custom-ring: rgba(99, 102, 241, 0.1);
    --frontend-custom-ring-soft: rgba(99, 102, 241, 0.025);
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 18px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--frontend-custom-border);
    border-radius: 18px;
    background: var(--frontend-custom-bg);
    color: var(--frontend-custom-text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
}

.frontend-contact-custom-service::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: -112px;
    right: -92px;
    width: 230px;
    height: 230px;
    border: 1px solid var(--frontend-custom-ring);
    border-radius: 50%;
    box-shadow: 0 0 0 32px var(--frontend-custom-ring-soft), 0 0 0 66px var(--frontend-custom-ring-soft);
    pointer-events: none;
}

.frontend-contact-custom-service-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.frontend-contact-custom-service-badge,
.frontend-contact-custom-service-stage {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.frontend-contact-custom-service-badge {
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--frontend-custom-badge-border);
    background: var(--frontend-custom-badge-bg);
    color: var(--frontend-custom-badge-text);
    backdrop-filter: blur(8px);
}

.frontend-contact-custom-service-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.frontend-contact-custom-service-stage {
    color: var(--frontend-custom-stage-text);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.frontend-contact-custom-service-copy {
    display: grid;
    gap: 8px;
}

.frontend-contact-custom-service-copy h3 {
    margin: 0;
    color: var(--frontend-custom-text);
    font-size: clamp(23px, 2.6vw, 27px);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.frontend-contact-custom-service-copy p {
    max-width: 48em;
    margin: 0;
    color: var(--frontend-custom-text-soft);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.frontend-contact-custom-service-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.frontend-contact-custom-service-items li {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid var(--frontend-custom-item-border);
    border-radius: 11px;
    background: var(--frontend-custom-item-bg);
    color: var(--frontend-custom-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.frontend-contact-custom-service-marker {
    width: 20px;
    height: 20px;
    display: inline-grid;
    flex: 0 0 20px;
    place-items: center;
    border-radius: 6px;
    background: var(--frontend-custom-marker-bg);
    color: var(--frontend-custom-marker-text);
    font-size: 12px;
    font-weight: 800;
}

.frontend-contact-custom-service-note {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 13px;
    border: 1px solid var(--frontend-custom-note-border);
    border-radius: 12px;
    background: var(--frontend-custom-note-bg);
    color: var(--frontend-custom-note-text);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
}

.frontend-contact-custom-service-note svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: var(--frontend-custom-marker-text);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.frontend-contact-channel {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--frontend-contact-border);
    background: var(--frontend-contact-surface-soft);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.frontend-contact-channel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.frontend-contact-channel-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.frontend-contact-channel-head span {
    color: #15803d;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.frontend-contact-channel-head strong {
    color: var(--frontend-contact-text);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.4;
}

.frontend-contact-channel-head > svg {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 9px;
    box-sizing: border-box;
    border-radius: 13px;
    background: #dcfce7;
    color: #16a34a;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.frontend-contact-channel-visual {
    min-height: 230px;
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--frontend-contact-border);
    border-radius: 16px;
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.06) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.06) 75%),
        linear-gradient(45deg, rgba(148, 163, 184, 0.06) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.06) 75%),
        var(--frontend-contact-surface);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

.frontend-contact-empty {
    width: auto;
    max-width: 240px;
    padding: 18px;
    color: var(--frontend-contact-text-soft);
    font-size: 12px;
    line-height: 1.65;
}

.frontend-contact-qr {
    width: min(188px, 100%);
    max-width: 100%;
    display: block;
    border-color: var(--frontend-contact-border);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.frontend-contact-wechat {
    min-height: 50px;
    border-color: var(--frontend-contact-border);
    border-radius: 13px;
    background: var(--frontend-contact-surface);
}

.frontend-contact-wechat span {
    color: var(--frontend-contact-text-soft);
}

.frontend-contact-wechat strong {
    color: var(--frontend-contact-text);
}

.frontend-contact-copy {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 13px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.2);
    transition: filter 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.frontend-contact-copy svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.frontend-contact-copy:hover {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    filter: saturate(1.05) brightness(1.02);
    box-shadow: 0 13px 26px rgba(22, 163, 74, 0.27);
    transform: translateY(-1px);
}

.frontend-contact-dialog :where(
    .frontend-feedback-form,
    .frontend-feedback-history,
    .frontend-feedback-thread
) {
    width: min(700px, 100%);
    box-sizing: border-box;
    margin-inline: auto;
}

.frontend-contact-close:focus-visible,
.frontend-contact-tab:focus-visible,
.frontend-contact-copy:focus-visible,
.frontend-feedback-history-head button:focus-visible,
.frontend-feedback-history-meta button:focus-visible,
.frontend-feedback-thread-head > button:focus-visible,
.frontend-feedback-upload-item-actions button:focus-visible {
    outline: 3px solid rgba(91, 92, 226, 0.28);
    outline-offset: 3px;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-overlay {
    background: rgba(2, 6, 23, 0.78);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-dialog {
    --frontend-contact-surface: #171a22;
    --frontend-contact-surface-soft: #1d212b;
    --frontend-contact-surface-strong: #272c38;
    --frontend-contact-border: #343b49;
    --frontend-contact-border-strong: #465062;
    --frontend-contact-text: #f4f6fa;
    --frontend-contact-text-soft: #aeb7c7;
    --frontend-contact-accent: #9495ff;
    --frontend-contact-accent-soft: #2b2d55;
    border-color: var(--frontend-contact-border);
    background: var(--frontend-contact-surface);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-custom-service {
    --frontend-custom-bg:
        radial-gradient(circle at 98% 4%, rgba(129, 140, 248, 0.16), transparent 32%),
        linear-gradient(145deg, #20243a 0%, #262b49 54%, #2b3055 100%);
    --frontend-custom-border: rgba(165, 180, 252, 0.22);
    --frontend-custom-text: #f4f6ff;
    --frontend-custom-text-soft: #b8c0d8;
    --frontend-custom-badge-bg: rgba(255, 255, 255, 0.08);
    --frontend-custom-badge-border: rgba(165, 180, 252, 0.18);
    --frontend-custom-badge-text: #d9dcff;
    --frontend-custom-stage-text: #aeb6d0;
    --frontend-custom-item-bg: rgba(255, 255, 255, 0.055);
    --frontend-custom-item-border: rgba(165, 180, 252, 0.12);
    --frontend-custom-marker-bg: rgba(103, 232, 249, 0.11);
    --frontend-custom-marker-text: #89e6f4;
    --frontend-custom-note-bg: rgba(2, 6, 23, 0.16);
    --frontend-custom-note-border: rgba(165, 180, 252, 0.12);
    --frontend-custom-note-text: #c9d0e3;
    --frontend-custom-ring: rgba(165, 180, 252, 0.08);
    --frontend-custom-ring-soft: rgba(165, 180, 252, 0.015);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-head {
    border-bottom-color: var(--frontend-contact-border);
    background:
        radial-gradient(circle at 86% -20%, rgba(129, 140, 248, 0.18), transparent 38%),
        linear-gradient(180deg, #1a1d26 0%, #171a22 100%);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-kicker {
    border-color: rgba(148, 149, 255, 0.22);
    background: var(--frontend-contact-accent-soft);
    color: #c7c8ff;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-contact-title,
    .frontend-contact-channel-head strong,
    .frontend-contact-wechat strong
) {
    color: var(--frontend-contact-text);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) :where(
    .frontend-contact-desc,
    .frontend-contact-empty,
    .frontend-contact-wechat span
) {
    color: var(--frontend-contact-text-soft);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-close {
    border-color: var(--frontend-contact-border);
    background: rgba(39, 44, 56, 0.82);
    color: var(--frontend-contact-text-soft);
    box-shadow: none;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-close:hover {
    border-color: var(--frontend-contact-border-strong);
    background: var(--frontend-contact-surface-strong);
    color: var(--frontend-contact-text);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-tabs {
    border-color: var(--frontend-contact-border);
    background: #14171e;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-tab:hover {
    background: rgba(39, 44, 56, 0.72);
    color: var(--frontend-contact-text);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-tab.is-active {
    border-color: transparent;
    background: var(--frontend-contact-surface-strong);
    color: var(--frontend-contact-text);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-channel {
    border-color: var(--frontend-contact-border);
    background: var(--frontend-contact-surface-soft);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-channel-head > svg {
    background: #163525;
    color: #6ee7a0;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-channel-head span {
    color: #6ee7a0;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-channel-visual {
    border-color: var(--frontend-contact-border);
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.045) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.045) 75%),
        linear-gradient(45deg, rgba(148, 163, 184, 0.045) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.045) 75%),
        #14171e;
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

:is(html[data-theme="dark"], body.dark-mode, body.profile-dashboard-dark) .frontend-contact-wechat {
    border-color: var(--frontend-contact-border);
    background: #14171e;
}

@media (max-width: 760px) {
    .frontend-contact-overlay {
        align-items: flex-end;
        padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    }

    .frontend-contact-dialog {
        width: 100%;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 22px 22px 16px 16px;
    }

    .frontend-contact-head {
        padding: 20px 20px 15px;
    }

    .frontend-contact-tabs {
        margin: 11px 14px 0;
    }

    .frontend-contact-body {
        padding: 16px 14px 18px;
    }

    .frontend-contact-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .frontend-contact-contact-grid.is-single {
        grid-template-columns: minmax(0, 1fr);
    }

    .frontend-contact-custom-service,
    .frontend-contact-channel {
        min-height: 0;
    }

    .frontend-contact-custom-service {
        padding: 20px;
    }

    .frontend-contact-channel {
        padding: 18px;
    }

    .frontend-contact-channel-visual {
        min-height: 200px;
    }
}

@media (max-width: 520px) {
    .frontend-contact-head {
        gap: 14px;
        padding: 18px 17px 14px;
    }

    .frontend-contact-kicker {
        min-height: 22px;
        font-size: 10px;
    }

    .frontend-contact-title {
        font-size: 20px;
    }

    .frontend-contact-desc {
        font-size: 12px;
    }

    .frontend-contact-close {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .frontend-contact-tabs {
        gap: 3px;
        margin: 9px 10px 0;
        padding: 3px;
        border-radius: 13px;
    }

    .frontend-contact-tab {
        min-height: 40px;
        padding: 0 7px;
        border-radius: 10px;
        font-size: 12px;
    }

    .frontend-contact-body {
        padding: 13px 10px max(14px, env(safe-area-inset-bottom));
    }

    .frontend-contact-contact-grid {
        gap: 12px;
    }

    .frontend-contact-custom-service {
        gap: 15px;
        padding: 17px;
        border-radius: 16px;
    }

    .frontend-contact-custom-service-top {
        align-items: center;
        gap: 10px;
    }

    .frontend-contact-custom-service-badge,
    .frontend-contact-custom-service-stage {
        min-height: 25px;
        font-size: 11px;
    }

    .frontend-contact-custom-service-stage {
        text-align: right;
    }

    .frontend-contact-custom-service-copy {
        gap: 7px;
    }

    .frontend-contact-custom-service-copy h3 {
        font-size: 22px;
        line-height: 1.3;
    }

    .frontend-contact-custom-service-copy p {
        font-size: 13px;
        line-height: 1.65;
    }

    .frontend-contact-custom-service-items {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    .frontend-contact-custom-service-items li {
        min-height: 40px;
        padding: 9px 10px;
        font-size: 13px;
    }

    .frontend-contact-custom-service-note {
        align-items: flex-start;
        padding: 11px 12px;
        font-size: 12px;
    }

    .frontend-contact-channel {
        gap: 12px;
        padding: 15px;
        border-radius: 17px;
    }

    .frontend-contact-channel-visual {
        min-height: 180px;
    }

    .frontend-contact-qr {
        width: min(164px, 100%);
    }

    .frontend-contact-wechat {
        min-height: 48px;
    }

    .frontend-contact-copy {
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frontend-contact-overlay.is-open .frontend-contact-dialog {
        animation: none;
    }

    .frontend-contact-close,
    .frontend-contact-tab,
    .frontend-contact-copy {
        transition: none;
    }

    .frontend-contact-close:hover,
    .frontend-contact-copy:hover {
        transform: none;
    }
}
