.page-shell {
    position: relative;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    z-index: 5;
    display: flex;
    flex-direction: column;
    width: 292px;
    margin: 14px 0 14px 14px;
    padding: 18px;
    border: 1px solid rgba(232, 238, 247, .9);
    border-radius: var(--radius-lg);
    background: var(--card);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.side-head,
.brand,
.topbar,
.top-actions,
.side-footer,
.chat-row {
    display: flex;
    align-items: center;
}

.side-head,
.topbar,
.side-footer {
    justify-content: space-between;
}

.brand {
    gap: 12px;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #dbe9ff;
    border-radius: 16px;
    background: linear-gradient(145deg, #e9f7ff, #fff);
    box-shadow: inset 0 0 18px rgba(49, 108, 255, .1);
}

.logo-mark span {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #316cff, #6ad5ff, #316cff);
    mask: radial-gradient(circle at center, transparent 7px, #000 8px);
}

.brand strong {
    display: block;
    font-size: 17px;
    letter-spacing: .2px;
}

.brand em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.new-chat {
    width: 100%;
    height: 46px;
    margin: 24px 0 22px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 14px 34px rgba(49, 108, 255, .26);
}

.nav-block {
    margin-top: 6px;
}

.nav-block p {
    margin: 0 0 10px 8px;
    color: var(--muted-2);
    font-size: 12px;
}

.chat-row {
    width: 100%;
    gap: 10px;
    padding: 12px;
    border: 0;
    border-radius: 15px;
    color: #40506a;
    text-align: left;
    background: transparent;
}

.chat-row.active {
    color: #1e4db7;
    background: #f0f6ff;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(49, 108, 255, .12);
}

.dot.muted {
    background: #b8c4d6;
    box-shadow: none;
}

.capability {
    padding: 11px 12px;
    border-radius: 14px;
    color: #64748b;
    font-size: 14px;
}

.side-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: #94a0b2;
    font-size: 12px;
}

.chat-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 72px;
    padding: 0 34px;
}

.model-pill,
.user-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.model-pill {
    gap: 9px;
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line);
    color: #36506f;
    background: rgba(255, 255, 255, .68);
    backdrop-filter: blur(18px);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 7px rgba(36, 196, 107, .12);
}

.top-actions {
    gap: 14px;
}

.top-actions a {
    color: #5c6b82;
    font-size: 14px;
}

.user-chip {
    padding: 7px 11px;
    border: 1px solid #d8e8ff;
    color: var(--blue);
    background: #edf5ff;
}

.hero {
    width: min(920px, 100%);
    margin: 64px auto 10px;
    padding: 0 28px;
    text-align: center;
    animation: rise .55s ease both;
}

.hero-logo {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 28px;
}

.hero-ring,
.hero-core {
    position: absolute;
}

.hero-ring {
    inset: 0;
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(236, 247, 255, .84));
    box-shadow: 0 24px 60px rgba(68, 120, 255, .18), inset 0 0 0 1px #deedff;
}

.hero-core {
    inset: 24px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #1f67ff, #68d7ff, #8d7cff, #1f67ff);
    box-shadow: 0 12px 32px rgba(49, 108, 255, .28);
}

.hero-core::after {
    position: absolute;
    inset: 11px;
    content: "";
    border-radius: 50%;
    background: #fff;
}

.hero h1 {
    margin: 0 0 16px;
    color: #14213d;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -1.8px;
}

.hero p {
    width: min(650px, 100%);
    margin: 0 auto;
    color: #6b7890;
    font-size: 16px;
    line-height: 1.9;
}

.prompt-grid {
    display: grid;
    width: min(760px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 34px auto 0;
}

.prompt-grid button {
    padding: 17px 18px;
    border: 1px solid rgba(222, 232, 246, .9);
    border-radius: 20px;
    text-align: left;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 12px 38px rgba(24, 45, 82, .06);
    transition: .18s ease;
}

.prompt-grid button:hover {
    transform: translateY(-2px);
    border-color: #c7dcff;
    box-shadow: 0 18px 48px rgba(49, 108, 255, .13);
}

.prompt-grid b {
    display: block;
    margin-bottom: 7px;
    color: #1f2d46;
}

.prompt-grid span {
    color: #8490a3;
    font-size: 13px;
}

.messages {
    width: min(900px, 100%);
    flex: 1;
    margin: 0 auto;
    padding: 18px 30px 150px;
}

.msg {
    display: flex;
    gap: 13px;
    margin: 22px 0;
    animation: rise .28s ease both;
}

.msg.user {
    justify-content: flex-end;
}

.avatar {
    display: grid;
    flex: none;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #dcecff;
    border-radius: 14px;
    color: var(--blue);
    font-weight: 900;
    background: linear-gradient(145deg, #eef8ff, #fff);
}

.msg.user .avatar {
    order: 2;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #64baff);
}

.bubble {
    max-width: min(680px, 74%);
    padding: 15px 17px;
    border: 1px solid rgba(231, 238, 248, .9);
    border-radius: 20px;
    color: #26364f;
    line-height: 1.75;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-soft);
}

.msg.user .bubble {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #5aaeff);
    box-shadow: 0 16px 38px rgba(49, 108, 255, .22);
}

.typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8aa1bd;
    animation: bounce 1s infinite;
}

.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

.composer-wrap {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 306px;
    padding: 22px 34px 20px;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0), rgba(247, 250, 255, .94) 34%, #f7faff 100%);
}

.composer {
    display: flex;
    width: min(860px, 100%);
    gap: 12px;
    align-items: flex-end;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid #dde8f7;
    border-radius: 26px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 55px rgba(31, 54, 96, .14);
}

.composer textarea {
    flex: 1;
    min-height: 28px;
    max-height: 160px;
    padding: 10px 8px 8px 12px;
    border: 0;
    color: #1f2d46;
    line-height: 1.55;
    resize: none;
    outline: none;
    background: transparent;
}

.composer button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 12px 28px rgba(49, 108, 255, .24);
}

.composer button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.disclaimer {
    margin: 10px 0 0;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

.desktop-hidden,
.mobile-only {
    display: none;
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        inset: 10px auto 10px 10px;
        transform: translateX(-112%);
        transition: .22s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-only,
    .desktop-hidden {
        display: inline-grid;
    }

    .composer-wrap {
        left: 0;
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .top-actions {
        gap: 10px;
    }

    .hero {
        margin-top: 38px;
    }

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

    .bubble {
        max-width: 84%;
    }

    .messages {
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* ==============================
   Responsive: desktop / tablet / phone
   ============================== */

@media (min-width: 1280px) {
    .sidebar {
        width: 308px;
        margin: 18px 0 18px 18px;
        padding: 20px;
    }

    .composer-wrap {
        left: 326px;
    }

    .hero {
        margin-top: 82px;
    }

    .messages {
        width: min(960px, 100%);
    }
}

@media (min-width: 861px) and (max-width: 1180px) {
    .sidebar {
        width: 252px;
        padding: 16px;
    }

    .brand strong {
        font-size: 16px;
    }

    .chat-main {
        min-width: 0;
    }

    .topbar {
        padding: 0 24px;
    }

    .hero {
        margin-top: 48px;
    }

    .hero h1 {
        font-size: clamp(30px, 4.2vw, 44px);
    }

    .prompt-grid {
        width: min(680px, 100%);
    }

    .composer-wrap {
        left: 266px;
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (max-width: 860px) {
    .page-shell {
        display: block;
    }

    .sidebar {
        z-index: 30;
        width: min(302px, calc(100vw - 24px));
        margin: 0;
        box-shadow: 0 28px 90px rgba(15, 23, 42, .22);
    }

    .sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 24;
        display: none;
        background: rgba(15, 23, 42, .18);
    }

    body.sidebar-open .sidebar-mask {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 12;
        height: 62px;
        background: rgba(247, 250, 255, .76);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(230, 237, 247, .78);
    }

    .model-pill {
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }

    .top-actions a[href*="deepseek"] {
        display: none;
    }

    .hero-logo {
        width: 88px;
        height: 88px;
        margin-bottom: 22px;
    }

    .hero-core {
        inset: 20px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.75;
    }

    .composer {
        border-radius: 22px;
    }

    .composer-wrap {
        padding-bottom: calc(14px + var(--safe-bottom));
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 0 12px;
    }

    .top-actions {
        gap: 8px;
    }

    .top-actions a,
    .user-chip {
        font-size: 12px;
    }

    .top-actions a[data-guest]:nth-of-type(2) {
        display: none;
    }

    .hero {
        margin-top: 28px;
        padding: 0 18px;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.16;
    }

    .hero p {
        font-size: 14px;
    }

    .prompt-grid {
        gap: 10px;
        margin-top: 24px;
    }

    .prompt-grid button {
        padding: 14px 15px;
        border-radius: 18px;
    }

    .prompt-grid span {
        display: none;
    }

    .messages {
        padding: 12px 12px 132px;
    }

    .msg {
        gap: 9px;
        margin: 16px 0;
    }

    .avatar {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 13px;
    }

    .bubble {
        max-width: calc(100vw - 92px);
        padding: 12px 14px;
        border-radius: 18px;
        font-size: 14px;
        line-height: 1.72;
    }

    .composer-wrap {
        padding: 12px 10px calc(12px + var(--safe-bottom));
    }

    .composer {
        gap: 8px;
        padding: 8px;
        border-radius: 20px;
    }

    .composer textarea {
        padding: 9px 6px 7px 10px;
        font-size: 14px;
    }

    .composer button {
        width: 40px;
        height: 40px;
        border-radius: 15px;
    }

    .disclaimer {
        padding: 0 10px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .model-pill {
        max-width: 136px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hero h1 {
        font-size: 27px;
    }

    .prompt-grid button:nth-child(n+3) {
        display: none;
    }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 920px) {
    .hero {
        margin-top: 18px;
    }

    .hero-logo,
    .hero p {
        display: none;
    }

    .prompt-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: min(900px, 100%);
    }

    .prompt-grid button {
        padding: 12px;
    }

    .prompt-grid span {
        display: none;
    }
}

.session-list {
    display: grid;
    gap: 6px;
}

.session-empty {
    padding: 12px;
    color: var(--muted-2);
    font-size: 13px;
}

.chat-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 11px;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(48, 111, 255, .18);
}

.hero-avatar {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(48, 111, 255, .24);
    border: 1px solid rgba(255, 255, 255, .82);
}

.avatar.avatar-img {
    object-fit: cover;
    font-size: 0;
}

.customer-service {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px 0 14px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #316cff, #6bbcff);
    box-shadow: 0 18px 42px rgba(49, 108, 255, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.customer-service:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 52px rgba(49, 108, 255, .36);
}

.service-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
}

.service-text {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .customer-service {
        right: 16px;
        bottom: 86px;
        width: 52px;
        min-height: 52px;
        padding: 0;
        justify-content: center;
    }

    .service-text {
        display: none;
    }

    .service-icon {
        background: transparent;
    }
}

.side-service {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 16px;
    color: #1f3b6d;
    text-decoration: none;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(210, 225, 250, .9);
    box-shadow: 0 10px 24px rgba(41, 91, 180, .08);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.side-service:hover {
    transform: translateY(-2px);
    border-color: rgba(49, 108, 255, .32);
    background: #fff;
}

.side-service-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #316cff, #6bbcff);
    box-shadow: 0 10px 22px rgba(49, 108, 255, .22);
}

/* 强制限制后台上传图片尺寸，防止原图撑爆页面 */
.brand .logo-img,
.side-head .logo-img {
    display: block !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 14px !important;
    object-fit: cover !important;
}

.hero .hero-avatar {
    display: block !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    margin: 0 auto 28px !important;
    border-radius: 34px !important;
    object-fit: cover !important;
}

.msg .avatar.avatar-img {
    display: flex !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border-radius: 14px !important;
    object-fit: cover !important;
}

/* 固定聊天页布局：消息区独立滚动，避免内容变长后整体页面下滑 */
html {
    height: 100%;
}

body.chat-page {
    height: 100%;
    overflow: hidden;
}

.page-shell {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
}

.sidebar {
    height: calc(100vh - 28px) !important;
    overflow: hidden !important;
}

.session-list {
    max-height: 28vh;
    overflow-y: auto;
    padding-right: 4px;
}

.chat-main {
    position: relative;
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh !important;
    min-height: 0 !important;
    flex-direction: column;
    overflow: hidden !important;
}

.topbar {
    flex: 0 0 auto;
}

.hero {
    flex: 0 0 auto;
}

.messages {
    width: min(900px, 100%) !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 18px 30px 170px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.composer-wrap {
    z-index: 20;
}

@media (max-width: 860px) {
    .sidebar {
        height: auto !important;
        overflow-y: auto !important;
    }

    .messages {
        padding-right: 16px !important;
        padding-left: 16px !important;
        padding-bottom: 160px !important;
    }
}


/* 手机端滚动修复：只锁聊天页外层，消息区/侧边栏允许触摸滑动 */
.chat-page .messages,
.chat-page .sidebar,
.session-list {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 860px) {
    body.chat-page {
        position: fixed;
        inset: 0;
        width: 100%;
        overflow: hidden;
    }

    .chat-page .page-shell,
    .chat-page .chat-main {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }

    .chat-page .messages {
        height: auto !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        touch-action: pan-y;
    }

    .chat-page .hero {
        max-height: calc(100dvh - 210px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chat-page .sidebar.open {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* 手机端视觉密度优化：整体缩小一点，侧边栏按钮更精致 */
@media (max-width: 860px) {
    .chat-page .page-shell {
        font-size: 14px;
    }

    .topbar {
        height: 54px;
        padding: 0 12px !important;
    }

    .model-pill {
        padding: 7px 11px;
        font-size: 12px;
    }

    .top-actions {
        gap: 7px !important;
        font-size: 12px;
    }

    .hero {
        margin-top: 22px !important;
        padding: 0 18px !important;
    }

    .hero .hero-avatar,
    .hero-logo {
        width: 76px !important;
        min-width: 76px !important;
        max-width: 76px !important;
        height: 76px !important;
        min-height: 76px !important;
        max-height: 76px !important;
        margin-bottom: 18px !important;
        border-radius: 24px !important;
    }

    .hero h1 {
        font-size: 26px !important;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    .prompt-grid {
        gap: 10px !important;
        margin-top: 22px !important;
    }

    .prompt-grid button {
        padding: 13px 14px !important;
        border-radius: 16px !important;
    }

    .prompt-grid b {
        font-size: 14px !important;
    }

    .prompt-grid span {
        font-size: 12px !important;
    }

    .messages {
        padding-top: 10px !important;
        padding-bottom: 138px !important;
    }

    .msg {
        gap: 9px !important;
        margin: 14px 0 !important;
    }

    .avatar,
    .msg .avatar.avatar-img {
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        border-radius: 12px !important;
        font-size: 12px !important;
    }

    .bubble {
        max-width: 82% !important;
        padding: 11px 13px !important;
        border-radius: 16px !important;
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    .composer-wrap {
        padding: 12px 12px 14px !important;
    }

    .composer {
        gap: 8px !important;
        padding: 8px !important;
        border-radius: 20px !important;
    }

    .composer textarea {
        min-height: 38px !important;
        font-size: 14px !important;
    }

    .composer button {
        width: 38px !important;
        height: 38px !important;
    }

    .disclaimer {
        margin-top: 7px !important;
        font-size: 11px !important;
    }

    .sidebar {
        width: min(82vw, 286px) !important;
        padding: 14px !important;
        border-radius: 22px !important;
    }

    .side-head {
        margin-bottom: 12px;
    }

    .brand {
        gap: 10px !important;
    }

    .brand .logo-img,
    .side-head .logo-img,
    .logo-mark {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        border-radius: 13px !important;
    }

    .brand strong {
        font-size: 15px !important;
    }

    .brand em {
        font-size: 11px !important;
    }

    .new-chat {
        height: 42px !important;
        margin: 14px 0 16px !important;
        border-radius: 15px !important;
        font-size: 14px !important;
        box-shadow: 0 12px 26px rgba(49, 108, 255, .2) !important;
    }

    .nav-block {
        margin-top: 10px !important;
    }

    .nav-block p {
        margin-left: 6px !important;
        margin-bottom: 8px !important;
        font-size: 11px !important;
        letter-spacing: .04em;
    }

    .chat-row,
    .capability,
    .side-service {
        min-height: 40px !important;
        padding: 9px 11px !important;
        border-radius: 14px !important;
        font-size: 13px !important;
        background: rgba(255, 255, 255, .58) !important;
        border: 1px solid rgba(218, 230, 247, .82) !important;
        box-shadow: 0 8px 20px rgba(31, 70, 130, .055) !important;
    }

    .chat-row {
        margin-bottom: 7px !important;
        color: #41516a !important;
    }

    .chat-row.active {
        color: #1e56d8 !important;
        background: linear-gradient(135deg, rgba(236, 245, 255, .96), rgba(255, 255, 255, .78)) !important;
        border-color: rgba(90, 154, 255, .36) !important;
    }

    .chat-row small {
        display: block;
        margin-top: 2px;
        color: #96a3b6;
        font-size: 11px;
    }

    .dot {
        width: 7px !important;
        height: 7px !important;
        box-shadow: 0 0 0 3px rgba(49, 108, 255, .1) !important;
    }

    .capability {
        margin-bottom: 7px;
        color: #6b7890 !important;
    }

    .side-service {
        gap: 9px !important;
        color: #23416f !important;
        text-decoration: none !important;
    }

    .side-service-icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 10px !important;
        box-shadow: 0 8px 18px rgba(49, 108, 255, .18) !important;
    }

    .side-footer {
        padding-top: 12px !important;
        font-size: 11px !important;
    }
}

/* iPhone/Safari 小屏再压缩一档，避免底部拥挤 */
@media (max-width: 640px) {
    .topbar {
        height: 48px !important;
        min-height: 48px !important;
    }

    .icon-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 14px !important;
    }

    .model-pill {
        padding: 6px 10px !important;
        font-size: 12px !important;
        transform: scale(.94);
    }

    .top-actions a,
    .user-chip {
        font-size: 12px !important;
    }

    .hero {
        margin-top: 16px !important;
        padding: 0 20px !important;
    }

    .hero .hero-avatar,
    .hero-logo {
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
        height: 68px !important;
        min-height: 68px !important;
        max-height: 68px !important;
        margin-bottom: 14px !important;
        border-radius: 22px !important;
    }

    .hero h1 {
        margin-bottom: 10px !important;
        font-size: 24px !important;
        line-height: 1.18 !important;
    }

    .hero p {
        font-size: 13px !important;
        line-height: 1.55 !important;
    }

    .prompt-grid {
        margin-top: 18px !important;
        gap: 9px !important;
    }

    .prompt-grid button {
        min-height: 56px !important;
        padding: 10px 14px !important;
        border-radius: 15px !important;
    }

    .prompt-grid b {
        font-size: 14px !important;
    }

    .prompt-grid span {
        display: none !important;
    }

    .composer-wrap {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    }

    .composer {
        min-height: 52px !important;
        border-radius: 18px !important;
    }

    .composer textarea {
        min-height: 34px !important;
        max-height: 86px !important;
        font-size: 13px !important;
    }

    .composer button {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
    }

    .disclaimer {
        display: none !important;
    }

    .customer-service {
        right: 18px !important;
        bottom: calc(92px + env(safe-area-inset-bottom)) !important;
        width: 46px !important;
        min-height: 46px !important;
        height: 46px !important;
        box-shadow: 0 14px 32px rgba(49, 108, 255, .28) !important;
    }

    .service-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .messages {
        padding-bottom: calc(116px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 390px) {
    .hero h1 {
        font-size: 22px !important;
    }

    .hero p {
        font-size: 12.5px !important;
    }

    .prompt-grid button {
        min-height: 52px !important;
    }
}

/* 更精致的移动端侧边栏触发按钮 */
.menu-trigger {
    position: relative;
    gap: 0 !important;
    border-color: rgba(220, 234, 255, .95) !important;
    background: rgba(255, 255, 255, .74) !important;
    box-shadow: 0 12px 30px rgba(43, 80, 140, .08) !important;
}

.menu-trigger::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8ca1bd;
    box-shadow: 0 10px 0 #8ca1bd;
}

.menu-trigger span {
    position: absolute;
    left: 18px;
    width: 13px;
    height: 2px;
    border-radius: 99px;
    background: #52657f;
}

.menu-trigger span:first-child {
    top: 14px;
}

.menu-trigger span:last-child {
    top: 24px;
    width: 16px;
}

.menu-trigger:hover,
.menu-trigger:active {
    background: #fff !important;
    border-color: rgba(49, 108, 255, .25) !important;
}

@media (max-width: 640px) {
    .menu-trigger::before {
        left: 10px;
        top: 11px;
    }

    .menu-trigger span {
        left: 17px;
    }

    .menu-trigger span:first-child {
        top: 13px;
    }

    .menu-trigger span:last-child {
        top: 23px;
    }
}
