:root {
    --primary: #d5717b;
    --primaryDark: #b65861;
    --text: #6b4a4f;
    --border: #ffe4e6;
    --pink-transparent: rgba(253, 242, 243, 0.85);
    --white-soft: rgba(255, 255, 255, 0.72);
    --shadow: 0 10px 30px rgba(107, 74, 79, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: none;
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

button,
textarea {
    font: inherit;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header.login-header {
    background-color: transparent;
    border-bottom: none;
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.site-header.login-header .brand .logo-img {
    height: 60px;
}

.site-header.new-header,
.site-header.profile-header,
.site-header.assistant-header {
    background-color: var(--pink-transparent);
    border-bottom: none;
    padding: 12px 0;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.site-header.new-header .header-inner,
.site-header.profile-header .header-inner,
.site-header.assistant-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header.new-header .brand .logo-img {
    height: 50px;
}

.site-header.new-header .nav {
    display: flex;
    gap: 30px;
}

.site-header.new-header .nav-link,
.back-link,
.contact-link,
.link,
.text-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}

.site-header.new-header .nav-link {
    font-size: 15px;
    padding: 0;
}

.site-header.new-header .nav-link:hover,
.back-link:hover,
.contact-link:hover,
.link:hover,
.text-action:hover {
    color: var(--primaryDark);
    transform: translateY(-1px);
}

.site-header.new-header .nav-icon,
.title-icon,
.contact-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.profile-header-left,
.assistant-header-left,
.profile-title,
.assistant-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-title,
.assistant-title {
    color: var(--primary);
    font-size: 18px;
    font-weight: 500;
}

.page {
    display: none;
}

.page.visible {
    display: block;
}

.full-screen-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.welcome-title {
    width: 100%;
    text-align: center;
    margin: 20px 0 20px;
    padding-top: 4px;
}

.welcome-title .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-title h1 {
    font-size: 54px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
}

.welcome-title p {
    font-size: 34px;
    color: var(--primary);
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.2;
}

.identity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .identity-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card.media,
.func-card,
.placeholder-card,
.chat-shell,
.consult-record,
.card-item {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card.media {
    position: relative;
    cursor: pointer;
}

.card.media img,
.func-card img,
.profile-menu img {
    width: 100%;
    height: auto;
    display: block;
}

.bottom-slogan {
    text-align: center;
    margin: 30px 0 40px;
}

.bottom-slogan p {
    font-size: 32px;
    color: white;
    font-weight: 500;
    font-style: italic;
}

#page-new-home {
    background: none;
}

#page-new-home .new-banner {
    display: flex;
    align-items: center;
    height: calc(100vh - 160px);
    position: relative;
    padding: 0;
}

.family-img {
    width: 36.5%;
    height: auto;
    object-fit: cover;
}

.banner-text {
    flex: 1;
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-text h2 {
    font-size: 50px;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    color: #333;
    font-weight: 700;
    padding-bottom: 10px;
}

.banner-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    height: 3px;
    background-color: var(--primary);
}

.banner-text p {
    font-size: 25px;
    margin-bottom: 10px;
    line-height: 1.8;
    color: #333;
}

.btn-view,
.btn-consult,
.btn-primary,
.btn-secondary,
.assistant-btn,
.chip {
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.btn-view,
.btn-secondary,
.chip,
.assistant-btn {
    background-color: var(--pink-transparent);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-view:hover,
.btn-secondary:hover,
.chip:hover,
.assistant-btn:hover {
    background-color: var(--primary);
    color: white;
}

.btn-view {
    padding: 16px 40px;
    font-size: 20px;
    position: absolute;
    right: 40px;
    bottom: 60px;
    z-index: 5;
}

.banner-arrow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--pink-transparent);
    color: var(--primary);
    border: none;
    font-size: 26px;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
}

.banner-dots .dot.active {
    background-color: var(--primary);
}

.new-cta {
    text-align: center;
}

.cta-container {
    background-color: var(--pink-transparent);
    padding: 20px 0;
    width: 100%;
    position: relative;
    z-index: 4;
}

.btn-consult,
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 14px 32px;
    font-size: 18px;
}

.btn-consult:hover,
.btn-primary:hover {
    background-color: var(--primaryDark);
}

.consult-note {
    color: var(--primary);
    font-size: 16px;
    opacity: 0.9;
    margin-top: 8px;
}

.profile-container {
    padding: 40px 24px 60px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.user-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    text-align: center;
}

.user-details p {
    margin-bottom: 8px;
    font-size: 18px;
}

.health-main {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.health-left,
.health-right {
    width: 45%;
    display: flex;
    flex-direction: column;
}

.card-item {
    flex: 1;
    background-color: var(--pink-transparent);
    padding: 24px;
    margin-bottom: 20px;
    min-height: 180px;
    position: relative;
}

.card-item:last-child {
    margin-bottom: 0;
}

.card-item h3 {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 18px;
}

.card-item p {
    margin-bottom: 6px;
    font-size: 16px;
}

.edit-link {
    position: absolute;
    bottom: 24px;
    right: 24px;
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
}

.function-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.func-card {
    cursor: pointer;
}

.func-card span {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: var(--pink-transparent);
    color: var(--primary);
}

.assistant-container {
    padding: 32px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
}

.assistant-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--white-soft);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.assistant-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.assistant-title-main {
    font-size: 30px;
    color: var(--primary);
    font-weight: 700;
}

.assistant-subtitle {
    margin-top: 8px;
    color: var(--text);
    opacity: 0.9;
}

.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    padding: 10px 16px;
    font-size: 15px;
}

.chat-shell,
.consult-record,
.placeholder-card {
    background: var(--white-soft);
    padding: 20px;
    backdrop-filter: blur(6px);
}

.chat-messages {
    min-height: 380px;
    max-height: 56vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
}

.bubble-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.message.bot .bubble-avatar {
    background: rgba(213, 113, 123, 0.18);
    color: var(--primary);
}

.message.user .bubble-avatar {
    background: rgba(107, 74, 79, 0.12);
    color: var(--text);
}

.bubble {
    max-width: min(78%, 640px);
    padding: 14px 16px;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(107, 74, 79, 0.08);
    white-space: pre-wrap;
}

.message.bot .bubble {
    background: #fff;
    color: var(--text);
    border-top-left-radius: 8px;
}

.message.user .bubble {
    background: linear-gradient(135deg, var(--primary), var(--primaryDark));
    color: white;
    border-top-right-radius: 8px;
}

.message-time {
    display: block;
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.7;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0 52px;
    color: var(--primary);
    font-size: 14px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: blink 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

.chat-composer {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

#chatInput {
    width: 100%;
    min-height: 56px;
    max-height: 150px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 14px 16px;
    color: var(--text);
    outline: none;
}

#chatInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(213, 113, 123, 0.15);
}

.composer-actions,
.record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.chat-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text);
    opacity: 0.72;
}

.record-item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.record-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.record-question-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.record-question {
    color: var(--primary);
    font-weight: 700;
    margin: 0;
}

.record-time {
    color: var(--text);
    opacity: 0.8;
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
}

.record-answer {
    margin-bottom: 0;
    line-height: 1.7;
    font-size: 15px;
}

.back-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    padding: 16px 0;
    font-size: 14px;
}

.sep {
    opacity: 0.6;
}

.muted {
    color: var(--primary);
    opacity: 0.8;
}

.simple-page {
    padding-bottom: 40px;
}

.placeholder-card {
    text-align: center;
    margin-top: 20px;
}

.placeholder-card h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.placeholder-card p {
    max-width: 680px;
    margin: 0 auto 18px;
}

@media (max-width: 768px) {
    .site-header.new-header .header-inner,
    .site-header.profile-header .header-inner,
    .site-header.assistant-header .header-inner {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .site-header.new-header .nav {
        gap: 15px;
        flex-wrap: wrap;
    }

    .site-header.new-header .nav-link {
        font-size: 13px;
    }

    .site-header.new-header .nav-icon {
        width: 20px;
        height: 20px;
    }

    .site-header.new-header .brand .logo-img {
        height: 40px;
    }

    .new-banner {
        flex-direction: column;
        height: auto !important;
        padding: 20px 0 80px;
    }

    .family-img {
        width: 100%;
        margin-bottom: 20px;
    }

    .banner-text {
        padding: 0 20px;
    }

    .banner-arrow {
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .banner-text h2 {
        font-size: 30px;
    }

    .banner-text p {
        font-size: 18px;
    }

    .btn-view {
        font-size: 16px;
        padding: 12px 32px;
        right: 20px;
        bottom: 20px;
    }

    .health-main,
    .assistant-hero,
    .record-question-row {
        flex-direction: column;
    }

    .health-left,
    .health-right {
        width: 100%;
    }

    .function-grid {
        grid-template-columns: 1fr;
    }

    .chat-messages {
        min-height: 320px;
    }

    .bubble {
        max-width: 88%;
    }

    .composer-actions,
    .record-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .site-header.login-header .brand .logo-img {
        height: 40px;
    }

    .welcome-title h1 {
        font-size: 32px;
    }

    .welcome-title p {
        font-size: 22px;
    }

    .bottom-slogan p {
        font-size: 22px;
    }

    .banner-text h2 {
        font-size: 24px;
    }

    .banner-text p {
        font-size: 16px;
    }

    .btn-view,
    .btn-consult,
    .assistant-btn,
    .btn-primary,
    .btn-secondary,
    .chip {
        font-size: 14px;
        padding: 10px 18px;
    }

    .assistant-title-main {
        font-size: 24px;
    }

    .assistant-avatar {
        width: 96px;
        height: 96px;
    }
}


.assistant-subtitle,
.quick-prompts {
    display: none !important;
}
