:root {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #222222;
    --muted: #6b7280;
    --line: #e3e8ef;
    --brand: #2196f3;
    --brand-dark: #1769aa;
    --soft: #ffffff;
    --danger: #b45309;
    --composer-height: 132px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
}

button,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

button:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: .5;
}

[hidden] {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: 70px;
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
    align-items: center;
    padding: 8px 18px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.headbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.headbar.right {
    justify-content: flex-end;
}

.side-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand {
    min-width: 0;
}

.brand-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brand-logo {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    object-fit: cover;
    flex: 0 0 auto;
}

.brand-copy {
    min-width: 0;
    text-align: center;
}

.brand h1 {
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
}

.brand p {
    margin: 0;
    font-size: 12px;
    line-height: 18px;
    color: var(--muted);
}

#status {
    display: none;
    margin-top: 1px;
    font-size: 11px;
    line-height: 14px;
    color: var(--brand-dark);
}

.icon-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #333333;
}

.icon-button:hover,
.login-button:hover,
.plain-action:hover,
.history-link:hover {
    color: var(--brand);
}

.menu-button {
    font-size: 20px;
}

.login-button,
.plain-action,
.history-link {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.login-button {
    min-width: 42px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #333333;
    border-radius: 16px;
    padding: 2px 8px;
    background: #ffffff;
}

.login-button.is-user {
    border-color: transparent;
    border-radius: 0;
    padding: 0;
}

.top-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.workspace {
    min-height: 100vh;
    padding-top: 70px;
}

.conversation {
    height: calc(100vh - 70px - var(--composer-height));
    min-height: 280px;
    overflow: auto;
    padding: 18px 16px 22px;
    background: #ffffff;
}

.suggestions {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 38px 16px;
    text-align: center;
}

.welcome {
    margin: 0 0 15px;
    color: #333333;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
}

.suggestion-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.suggestion-grid button {
    min-height: 28px;
    max-width: 100%;
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--brand);
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand);
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    line-height: 20px;
    box-shadow: none;
}

.suggestion-grid button:hover {
    background: var(--brand);
    color: #ffffff;
}

.message {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.62;
    word-break: break-word;
    position: relative;
}

.message.user {
    flex-direction: row-reverse;
    padding-left: 20%;
    padding-right: 50px;
    margin-bottom: 54px;
}

.message.assistant {
    color: #1f2937;
    padding-left: 50px;
    padding-right: 20%;
    margin-bottom: 38px;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble {
    position: relative;
    max-width: 100%;
    padding: 10px 15px;
    border-radius: 16px 16px 16px 4px;
    background: rgba(0, 0, 0, .05);
    color: #1f2937;
}

.message.user .message-bubble {
    background: #e1f5fe;
    border: 0;
    border-radius: 16px 16px 4px 16px;
    white-space: pre-wrap;
}

.message.user .message-avatar {
    background: #ff4c00;
    color: #ffffff;
}

.copyBox {
    position: absolute;
    right: 0;
    bottom: -28px;
    text-align: right;
    display: block;
}

.message.pending .copyBox {
    display: none;
}

.message-time {
    position: absolute;
    left: 0;
    bottom: -27px;
    color: #8b8f99;
    font-size: 13px;
    line-height: 24px;
    white-space: nowrap;
}

.message.pending .message-time {
    display: none;
}

.message-copy-btn,
.copyBox .copyBtn {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: #333333;
    cursor: pointer;
    line-height: 30px;
}

.message-copy-btn svg,
.copyBox .copyBtn svg,
.editbtn svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.repeatBox {
    position: absolute;
    left: 0;
    bottom: -40px;
    text-align: left;
}

.editbtn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: #333333;
    cursor: pointer;
}

.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}

.icon-pencil {
    width: 24px;
    height: 24px;
    background: url("../image/pencil.png") no-repeat center;
    background-size: 18px auto;
}

.message.pending {
    color: var(--muted);
    margin-bottom: 14px;
}

.message.error {
    color: var(--danger);
}

.message.error .message-bubble {
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.loading-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.loading-text {
    line-height: 22px;
}

.loading-dots {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9ca3af;
    animation: loading-bounce 1s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
    animation-delay: .1s;
}

.loading-dots span:nth-child(3) {
    animation-delay: .2s;
}

.loading-dots span:nth-child(4) {
    animation-delay: .3s;
}

.loading-dots span:nth-child(5) {
    animation-delay: .4s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .45;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.message p:first-child {
    margin-top: 0;
}

.message p:last-child,
.message-bubble > p:last-of-type,
.message-bubble > ul:last-of-type,
.message-bubble > ol:last-of-type {
    margin-bottom: 0;
}

.message pre {
    max-width: 100%;
    overflow: auto;
    padding: 12px;
    border-radius: 6px;
    background: #111827;
    color: #f9fafb;
}

.message code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.message table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.message-images img {
    width: 92px;
    height: 92px;
    border-radius: 8px;
    object-fit: cover;
    cursor: zoom-in;
}

.message-files {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.message-files a {
    display: inline-flex;
    max-width: 360px;
    padding: 7px 9px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    color: var(--brand-dark);
    background: #fff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generated-files {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.generated-file-link {
    display: inline-grid;
    max-width: 360px;
    padding: 9px 11px;
    border: 1px solid #cfe0f6;
    border-radius: 7px;
    background: #f8fbff;
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    text-align: left;
}

.generated-file-link.loading,
.generated-file-link:disabled {
    cursor: wait;
    opacity: .72;
}

.generated-file-link span {
    color: var(--muted);
    font-size: 12px;
}

.generated-file-link strong {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draw-result {
    margin: 8px 0;
}

.draw-prompt {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.message img,
.message svg,
.message canvas,
.message video {
    max-width: 100%;
    height: auto;
}

.message iframe,
.message object,
.message embed {
    max-width: 100%;
}

.message svg {
    display: block;
}

.message th,
.message td {
    border: 1px solid var(--line);
    padding: 6px 8px;
}

.math-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.composer {
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    min-height: 120px;
    max-height: 48vh;
    overflow: visible;
    padding: 5px 20% 15px;
    border-top: 1px solid #e5e5ea;
    background: #ffffff;
}

.attach-row:empty {
    display: none;
}

.attach-row {
    max-width: 100%;
    margin: 0 auto 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-chip {
    position: relative;
    width: 64px;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.image-chip.uploading {
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-size: 12px;
}

.image-chip.uploading::before {
    content: "";
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
    border: 2px solid #cfe7ff;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.file-chip {
    max-width: 280px;
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 22px;
    align-items: center;
    gap: 7px;
    padding: 5px 6px 5px 10px;
    border: 1px solid #d8e4f2;
    border-radius: 8px;
    background: #ffffff;
}

.file-chip a {
    min-width: 0;
    color: #1f2937;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-chip span {
    color: var(--muted);
    font-size: 12px;
}

.file-chip button {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, .68);
    line-height: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.image-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.image-chip button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .68);
    color: #ffffff;
    line-height: 20px;
    font-size: 14px;
}

.input-box {
    max-width: 100%;
    min-height: 50px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 50px;
    align-items: center;
    gap: 8px;
    padding: 5px 0 5px 12px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.input-box.is-expanded {
    align-items: end;
}

.input-box.has-upload {
    grid-template-columns: 36px 1fr 50px;
    padding-left: 0;
}

.add-image,
.voice-button,
.send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.add-image {
    position: relative;
    font-size: 24px;
    color: #8a96a8;
}

.add-image::after {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: min(320px, 76vw);
    padding: 7px 9px;
    border-radius: 10px;
    background: #1f2937;
    color: #fff;
    content: attr(data-tip);
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease;
    z-index: 120;
}

.add-image:hover::after,
.add-image:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.add-image.uploading {
    color: var(--brand);
}

.send-button {
    background: var(--brand);
    color: #ffffff;
    line-height: 1;
    flex: 0 0 auto;
    box-shadow: 0 2px 5px rgba(33, 150, 243, .35);
}

.send-button svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.send-button:hover {
    background: var(--brand-dark);
}

.right-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.voice-button {
    background: url("../image/ai-icon/icon-voice.png") no-repeat center;
    background-size: 22px 22px;
}

textarea {
    width: 100%;
    min-height: 40px;
    height: 40px;
    max-height: 220px;
    resize: none;
    overflow-y: auto;
    border: 0;
    border-radius: 20px;
    outline: none;
    padding: 8px 12px;
    background: #f2f2f7;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
}

textarea::placeholder {
    color: #9aa6b7;
    opacity: 1;
}

.control-row {
    max-width: 100%;
    margin: 7px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.control-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.history-link,
.plain-action {
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--brand);
}

.history-link svg,
.plain-action svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-link:hover,
.plain-action:hover {
    border-color: #cfe7ff;
    background: var(--soft);
}

.toggle-button,
.select-control,
.draw-settings label {
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
}

.think-help {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.think-help:hover {
    background: var(--brand-dark);
}

.toggle-button.active {
    border-color: var(--brand);
    background: var(--soft);
    color: var(--brand-dark);
}

.toggle-button:disabled,
.select-control.disabled,
.draw-settings.is-hidden,
#voiceChatButton:disabled {
    display: none;
}

.keep-button::before {
    content: "";
    width: 15px;
    height: 15px;
    display: inline-block;
    background: url("../image/message.png") no-repeat center;
    background-size: contain;
}

.select-control span,
.draw-settings span {
    color: var(--muted);
}

.select-control,
.draw-settings label {
    position: relative;
}

.select-control.is-custom,
.draw-settings label.is-custom {
    padding-right: 8px;
}

.select-control select,
.draw-settings label select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select-trigger {
    min-width: 76px;
    height: 26px;
    max-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    outline: none;
    background: transparent;
    color: #222222;
    padding: 0;
    font-size: 12px;
    line-height: 26px;
    white-space: nowrap;
}

.custom-select-trigger::after {
    content: "";
    width: 0;
    height: 0;
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #8a96a8 transparent transparent;
    flex: 0 0 auto;
    transition: transform .16s ease;
}

.custom-select-trigger.is-open::after {
    transform: rotate(180deg);
}

.custom-select-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-menu {
    position: fixed;
    z-index: 420;
    min-width: 150px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: min(320px, calc(100vh - 24px));
    overflow: auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
}

.custom-select-menu[hidden] {
    display: none;
}

.custom-select-option {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    text-align: left;
}

.custom-select-option:hover,
.custom-select-option.active {
    background: var(--brand);
    color: #ffffff;
}

.draw-settings {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.draw-settings label {
    padding-right: 4px;
    opacity: .62;
}

.side-overlay {
    display: none;
}

.side-overlay.open {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: block;
    background: rgba(15, 23, 42, .3);
}

.side-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    width: 280px;
    max-width: 86vw;
    padding: 15px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: 10px 0 30px rgba(15, 23, 42, .12);
}

.side-panel.open {
    transform: translateX(0);
}

.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.side-brand {
    font-weight: 600;
}

.about-list {
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.about-list button {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid #eef2f7;
    border-radius: 999px;
    background: #ffffff;
    color: #333333;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 3px 9px rgba(15, 23, 42, .05);
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.about-list button:hover {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(33, 150, 243, .18);
}

.about-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .32);
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 310;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .32);
}

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 330;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .76);
}

.preview-modal img {
    max-width: min(980px, 92vw);
    max-height: 88vh;
    border-radius: 8px;
    background: #ffffff;
}

.preview-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, .92);
}

.user-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 320;
    width: 380px;
    max-width: 92vw;
    padding: 0 0 15px;
    border-left: 1px solid var(--line);
    background: #ffffff;
    box-shadow: -8px 0 20px rgba(0, 0, 0, .08);
    overflow: auto;
}

.drawer-head {
    height: 54px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 0;
}

.drawer-head strong {
    justify-self: center;
    color: #111111;
    font-size: 18px;
    font-weight: 500;
}

.drawer-head .icon-button,
.drawer-admin-link {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #555555;
    text-decoration: none;
    font-size: 24px;
}

.drawer-head .icon-button {
    justify-self: start;
}

.drawer-admin-link {
    justify-self: end;
    font-size: 0;
}

.drawer-admin-link svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drawer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 15px 18px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 0;
    color: inherit;
    text-decoration: none;
}

.drawer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ff4c00;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.drawer-user-main {
    min-width: 0;
    flex: 1;
}

.drawer-name {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    margin-top: 3px;
}

.drawer-email {
    color: #000000;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-arrow {
    color: #9ca3af;
    font-size: 22px;
}

.drawer-vip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 14px 15px 28px;
    padding: 12px;
    border-bottom: 0;
    border-radius: 6px;
    background: #f3f3f3;
}

.drawer-vip-text {
    flex: 1;
    min-width: 0;
    color: #000000;
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-vip-button {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 12px;
    border-radius: 22px;
    background: linear-gradient(to right, #ffd700, #e5b500);
    color: #000000;
    white-space: nowrap;
}

.drawer-list {
    display: grid;
    gap: 0;
    margin-bottom: 0;
    border-top: 12px solid #f3f3f3;
    border-bottom: 1px solid #eeeeee;
}

.drawer-list a {
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 28px 0 15px;
    border-bottom: 1px solid #eeeeee;
    border-radius: 0;
    background: #ffffff;
    color: #333333;
    text-decoration: none;
    position: relative;
}

.drawer-list a:last-child {
    border-bottom: 0;
}

.drawer-list a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 8px;
    height: 8px;
    border-top: 1px solid #555555;
    border-right: 1px solid #555555;
    transform: translateY(-50%) rotate(45deg);
}

.drawer-list a:hover {
    color: #333333;
}

.drawer-share {
    padding: 28px 15px 22px;
    border-top: 12px solid #f3f3f3;
    border-bottom: 1px solid #eeeeee;
    border-radius: 0;
    background: #ffffff;
    margin-bottom: 15px;
}

.drawer-share-ad {
    margin: 0 auto 18px;
    text-align: center;
}

.drawer-share-ad img {
    width: 180px;
    max-width: 78%;
}

.drawer-share-code {
    display: none;
}

.drawer-share-code img {
    width: 190px;
    max-width: 100%;
}

.drawer-share-title {
    margin: 10px 0 18px;
    color: #333333;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    text-align: center;
}

.drawer-share-row {
    display: grid;
    grid-template-columns: 1fr 74px;
    gap: 10px;
}

.drawer-share-row input {
    min-width: 0;
    height: 36px;
    border: 1px solid #999999;
    border-radius: 18px;
    padding: 0 10px;
    background: #ffffff;
}

.drawer-share-row button {
    height: 36px;
    border-radius: 18px;
    background: var(--brand);
    color: #ffffff;
    font-size: 14px;
}

.drawer-logout {
    width: calc(100% - 30px);
    height: 44px;
    margin: 0 15px;
    border-radius: 22px;
    background: var(--brand);
    color: #ffffff;
}

.pay-modal[hidden] {
    display: none;
}

.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 360;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .38);
}

.pay-card {
    width: min(520px, 100%);
    max-height: min(680px, 90vh);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 52px rgba(15, 23, 42, .28);
    overflow: hidden;
}

.pay-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
}

.pay-head strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.pay-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.pay-body {
    padding: 16px 18px;
    overflow: auto;
}

.pay-section-title {
    margin: 0 0 10px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.fee-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.fee-card {
    position: relative;
    min-height: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.fee-card.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.fee-card.recommended::after {
    content: "推荐";
    position: absolute;
    top: -8px;
    right: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ff3b65;
    color: #ffffff;
    font-size: 11px;
}

.fee-name {
    font-weight: 600;
}

.fee-price {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 700;
}

.fee-price span {
    font-size: 12px;
    font-weight: 500;
}

.fee-save {
    min-height: 18px;
    color: var(--muted);
    font-size: 12px;
}

.fee-save s {
    margin-right: 5px;
}

.pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pay-method {
    width: auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: #374151;
}

.pay-method.active {
    border-color: var(--brand);
    background: var(--soft);
    color: var(--brand-dark);
}

.pay-method img {
    height: 30px;
    max-width: 132px;
    object-fit: contain;
}

.pay-message {
    min-height: 22px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.pay-message.error {
    color: var(--danger);
}

.pay-message.success {
    color: #047857;
}

.pay-foot {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--line);
}

.pay-submit {
    width: 100%;
    height: 44px;
    border-radius: 18px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 600;
}

.pay-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.pay-loading {
    grid-column: 1 / -1;
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.login-card {
    width: min(430px, calc(100% - 24px));
    display: grid;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .22);
    overflow: hidden;
}

@media (max-width: 640px) {
    .fee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.login-head,
.login-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-head {
    min-height: 30px;
    justify-content: flex-end;
    padding: 10px 12px 0;
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 2px 28px 18px;
    color: #555555;
    font-size: 18px;
}

.login-brand img {
    width: 54px;
    height: 54px;
    border-radius: 0;
    object-fit: cover;
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 28px 14px;
}

.email-login-pane,
.wechat-login-pane,
.wechat-bind-panel {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.wechat-login-pane {
    justify-items: center;
}

.wechat-bind-panel {
    padding: 0 28px 14px;
}

.login-card.is-binding-wechat .login-layout,
.login-card.is-binding-wechat .login-footer-row,
.login-card.is-binding-wechat .login-methods {
    display: none;
}

.wechat-login-title,
.wechat-bind-title {
    color: #111827;
    font-weight: 700;
    font-size: 18px;
}

.wechat-login-lead,
.wechat-bind-lead {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
}

.wechat-qr {
    width: 218px;
    height: 218px;
    display: grid;
    place-items: center;
    justify-self: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.wechat-qr img {
    width: 196px;
    height: 196px;
    object-fit: contain;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.wechat-qr.has-overlay img {
    filter: blur(3px);
    opacity: 0.26;
    transform: scale(0.98);
}

.wechat-qr-overlay {
    position: absolute;
    inset: 12px;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.84);
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.wechat-qr-overlay.is-waiting {
    color: #b45309;
}

.wechat-qr-overlay.is-error {
    color: #374151;
}

.wechat-qr-overlay.is-refresh {
    color: rgba(0, 0, 0, .52);
    font-size: 66px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.inline-code-row {
    display: grid;
    grid-template-columns: 1fr 108px;
    gap: 8px;
}

.inline-code-row button {
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
}

.login-card label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.login-card input {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 19px;
    padding: 0 10px;
    outline: none;
}

.login-submit {
    height: 38px;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
}

.login-links a {
    color: var(--brand);
    text-decoration: none;
    font-size: 13px;
}

.login-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 28px 20px;
    color: #555555;
    font-size: 14px;
}

.login-footer-row a,
.login-footer-row button {
    color: #555555;
    text-decoration: none;
    font-size: 14px;
}

.login-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 20px 22px;
    border-top: 1px solid rgba(0, 0, 0, .1);
    color: #666666;
}

.login-methods > div {
    flex: 0 0 100%;
    text-align: center;
}

.method-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #cfd6df;
    border-radius: 50%;
    background: #ffffff;
}

.method-icon[hidden] {
    display: none;
}

.method-icon.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, .1);
}

.method-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.form-message {
    min-height: 18px;
    margin: 0 20px 24px;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.about-modal[hidden] {
    display: none;
}

.about-card {
    width: min(560px, 100%);
    max-height: min(620px, 86vh);
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .22);
}

.about-card-head {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
}

.about-card-body {
    max-height: calc(min(620px, 86vh) - 48px);
    overflow: auto;
    padding: 20px 22px;
    color: #374151;
    line-height: 1.7;
    font-size: 14px;
}

.about-card-body h1,
.about-card-body h2,
.about-card-body h3 {
    color: #111827;
    line-height: 1.35;
}

.about-card-body h1 {
    margin: 0 0 18px;
    font-size: 22px;
    text-align: center;
}

.about-card-body h2 {
    margin: 22px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--brand);
    font-size: 17px;
}

.about-card-body h3 {
    margin: 18px 0 8px;
    font-size: 15px;
}

.about-card-body p {
    margin: 8px 0;
}

.about-card-body ul,
.about-card-body ol {
    margin: 8px 0 12px;
    padding-left: 22px;
}

.about-card-body li {
    margin: 5px 0;
}

.about-card-body.think-help-body h2 {
    margin-top: 0;
    font-size: 20px;
    text-align: left;
}

.about-card-body.think-help-body h3 {
    margin: 18px 0 8px;
    padding-left: 10px;
    border-left: 3px solid var(--brand);
    color: #111827;
    font-size: 16px;
}

.about-card-body.think-help-body p {
    margin: 0 0 12px;
    color: #374151;
    line-height: 1.75;
}

.about-card-body a {
    color: var(--brand);
}

.about-card-body .footer,
.about-card-body .contact {
    margin-top: 18px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.about-card-body .shareBox {
    display: grid;
    gap: 12px;
}

.about-card-body .sharecode,
.about-card-body .shareTitle,
.about-card-body .text-center {
    text-align: center;
}

.about-card-body .codeImg {
    width: 170px;
    max-width: 100%;
}

.about-card-body .shareInput {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 0 8px;
}

.about-card-body .copyBtn {
    height: 34px;
    min-width: 52px;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
}

.about-card-body .flex {
    display: flex;
    gap: 8px;
    align-items: center;
}

.about-card-body .flex-1 {
    flex: 1;
    min-width: 0;
}

@media (max-width: 760px) {
    :root {
        --composer-height: 164px;
    }

    .topbar {
        height: 64px;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 4px;
        padding: 7px 9px;
    }

    .workspace {
        padding-top: 64px;
    }

    .brand-title {
        gap: 6px;
    }

    .brand-logo {
        width: 22px;
        height: 22px;
    }

    .brand h1 {
        font-size: 17px;
        line-height: 22px;
    }

    .brand p {
        font-size: 11px;
        line-height: 15px;
    }

    #status {
        display: none;
    }

    .login-button {
        min-width: 40px;
        max-width: 86px;
        height: 34px;
        min-height: 34px;
        padding: 0 4px;
        font-size: 13px;
    }

    #topUserName {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .top-user-avatar {
        width: 24px;
        height: 24px;
    }

    .conversation {
        height: calc(100vh - 64px - var(--composer-height));
        height: calc(100dvh - 64px - var(--composer-height));
        padding: 12px 10px 16px;
    }

    .suggestions {
        padding: 12px 0 16px;
    }

    .welcome {
        max-width: 92vw;
        margin: 0 auto 12px;
        padding: 0;
        font-size: 14px;
        line-height: 1.7;
    }

    .suggestion-grid {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 8px;
        max-width: 92vw;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
    }

    .suggestion-grid button {
        width: auto;
        min-height: 28px;
        padding: 3px 10px;
        border-radius: 999px;
        text-align: center;
        font-size: 14px;
        line-height: 20px;
    }

    .composer {
        min-height: 150px;
        max-height: 62vh;
        max-height: 62dvh;
        overflow-y: auto;
        padding: 8px;
    }

    .attach-row,
    .input-box,
    .control-row {
        max-width: 100%;
    }

    .input-box {
        grid-template-columns: 1fr 38px;
        gap: 6px;
        padding: 5px 6px;
        border-radius: 0;
    }

    .message {
        width: calc(100% - 12px);
    }

    .message.user {
        padding-left: 12%;
        padding-right: 0;
        margin-bottom: 54px;
    }

    .message.assistant {
        padding-left: 0;
        padding-right: 12%;
    }

    .input-box.has-upload {
        grid-template-columns: 34px 1fr 38px;
    }

    .draw-settings {
        flex-wrap: wrap;
    }

    .add-image,
    .voice-button,
    .send-button {
        width: 34px;
        height: 34px;
    }

    .control-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        gap: 7px;
    }

    .control-actions {
        margin-left: auto;
        padding-left: 8px;
    }

    .select-control,
    .toggle-button,
    .draw-settings label {
        height: 30px;
        padding: 0 8px;
    }

    textarea,
    select,
    input,
    .login-card input,
    .drawer-share-row input,
    .shareInput {
        font-size: 16px;
    }

    .custom-select-trigger,
    .custom-select-option {
        font-size: 16px;
    }

    .custom-select-trigger {
        max-width: 180px;
    }

    .login-modal,
    .pay-modal,
    .about-modal {
        align-items: end;
        place-items: end center;
        padding: 10px;
    }

    .login-card,
    .pay-card,
    .about-card {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 12px 12px 8px 8px;
    }

    .login-card {
        overflow: auto;
    }

    .login-brand {
        padding: 0 20px 16px;
        gap: 12px;
    }

    .login-layout {
        padding: 0 20px 14px;
    }

    .wechat-bind-panel {
        padding: 0 20px 14px;
    }

    .wechat-qr {
        width: min(218px, 70vw);
        height: min(218px, 70vw);
    }

    .wechat-qr img {
        width: min(196px, 63vw);
        height: min(196px, 63vw);
    }

    .login-head,
    .login-links {
        gap: 10px;
    }

    .login-footer-row {
        padding: 4px 20px 18px;
    }

    .pay-card {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .pay-head {
        padding: 15px 15px 12px;
    }

    .pay-body {
        padding: 14px 15px;
    }

    .fee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .fee-card {
        min-height: 98px;
        padding: 11px 9px;
    }

    .pay-foot {
        padding: 12px 15px 15px;
    }

    .about-card-body {
        max-height: calc(100vh - 92px);
        max-height: calc(100dvh - 92px);
        padding: 16px;
    }
}

@media (max-width: 390px) {
    .topbar {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        padding-inline: 7px;
    }

    .brand p {
        display: none;
    }

    .login-button {
        max-width: 72px;
    }

    .suggestion-grid button {
        max-width: 100%;
    }
}
