body {
    background-color: #f4f6fb;
    -webkit-tap-highlight-color: transparent;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%237c4dff" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.radio-custom:checked + div {
    border-color: #7c4dff;
    background-color: #f8f5ff;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.1);
}

.radio-custom:checked + div .radio-circle {
    border-color: #7c4dff;
}

.radio-custom:checked + div .radio-circle::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: #7c4dff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.input-error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.input-error-text i {
    margin-right: 0.25rem;
}

.error-hidden {
    display: none !important;
}

.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Tailwind loading fallback: ensure page remains stable across browsers/network */
.survey-page {
    margin: 0;
    color: #1e293b;
    min-height: 100vh;
}

.survey-page header {
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.survey-page header img {
    height: 34px;
    width: auto;
    display: block;
}

.survey-page main {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 16px 96px;
    box-sizing: border-box;
}

.survey-page form {
    display: block;
}

.survey-page .form-group label {
    display: block;
}

.survey-page #group-q1 > div:nth-of-type(1) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.survey-page #group-q2 > div:nth-of-type(1) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.survey-page #group-q1 label > div,
.survey-page #group-q2 label > div {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.25s ease;
    background: #fff;
    box-sizing: border-box;
}

.survey-page #group-q1 .radio-circle,
.survey-page #group-q2 .radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    border: 2px solid #cbd5e1;
    position: relative;
    box-sizing: border-box;
}

.survey-page #group-q1 label > div {
    display: block;
}

.survey-page #group-q1 label > div > div:first-child {
    display: flex;
    align-items: flex-start;
}

.survey-page #group-q2 label > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    min-height: 132px;
}

.survey-page #group-q2 label > div .radio-circle {
    margin-bottom: 8px;
}

.survey-page #group-q2 label > div > div:nth-child(2) {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 8px !important;
    font-size: 16px !important;
}

.survey-page #group-q2 label > div > span:last-child {
    font-size: 14px !important;
    line-height: 1.25;
    white-space: nowrap;
}

.survey-page #wechatId {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px 14px 44px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.3;
    outline: none;
}

.survey-page #wechatId:focus {
    border-color: #7c4dff;
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
    background: #fff;
}

.survey-page #submitBtn {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 16px 18px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .survey-page main {
        padding: 28px 24px 96px;
    }

    .survey-page header img {
        height: 40px;
    }

    .survey-page #group-q2 > div:nth-of-type(1) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .survey-page #group-q2 label > div {
        padding: 16px;
        min-height: 0;
    }

    .survey-page #group-q2 label > div > div:nth-child(2) {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 8px !important;
        font-size: 20px !important;
    }

    .survey-page #group-q2 label > div > span:last-child {
        font-size: 14px !important;
    }
}

@media (min-width: 992px) {
    .survey-page #group-q1 > div:nth-of-type(1) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
