/* ==========================================================================
   AI 智能助手 · 前台公共样式
   ========================================================================== */
:root {
    --primary: #1668e3;
    --primary-d: #0f56c0;
    --primary-l: #eaf1fd;
    --teal: #0fa89a;
    --text: #1c2733;
    --text-2: #4b5b6d;
    --muted: #8494a8;
    --line: #e6ecf4;
    --bg: #f4f7fb;
    --card: #ffffff;
    --danger: #d9363e;
    --ok: #12925a;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(22, 60, 120, .07);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

img,
svg {
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ---------------------------------------------------------------- 按钮 */
.primary-btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2b7cf6, #1668e3);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .4px;
    transition: filter .18s, transform .1s;
}

.primary-btn:hover {
    filter: brightness(1.06);
}

.primary-btn:active {
    transform: scale(.985);
}

.primary-btn:disabled {
    background: #c5d2e3;
    cursor: not-allowed;
    filter: none;
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    transition: background .18s;
}

.icon-btn:hover {
    background: #f1f5fa;
}

.icon-btn:active {
    background: #e7eeff;
}

/* ---------------------------------------------------------------- 登录 / 注册 */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 20px 28px;
    background:
        radial-gradient(1200px 500px at 50% -180px, #dceafd 0%, rgba(244, 247, 251, 0) 70%),
        var(--bg);
}

.auth-top {
    text-align: center;
    margin-bottom: 26px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(22, 104, 227, .16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: .5px;
}

.auth-slogan {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: 18px;
    padding: 26px 22px 22px;
    box-shadow: var(--shadow);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 650;
}

.auth-desc {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.field input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    font-size: 14px;
    color: var(--text);
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.field input::placeholder {
    color: #b3c0d0;
}

.field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 104, 227, .1);
}

.code-row {
    display: flex;
    gap: 10px;
}

.code-row input {
    flex: 1;
    min-width: 0;
}

.code-btn {
    flex: none;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-l);
    border: 1px solid #cfe0f8;
    border-radius: 10px;
    white-space: nowrap;
    transition: background .18s, opacity .18s;
}

.code-btn:hover {
    background: #e0ebfd;
}

.code-btn:disabled {
    color: #9fb0c4;
    background: #f2f5f9;
    border-color: var(--line);
    cursor: not-allowed;
}

.form-msg {
    min-height: 18px;
    font-size: 13px;
    line-height: 1.6;
    margin: -4px 0 10px;
    color: var(--danger);
}

.form-msg.ok {
    color: var(--ok);
}

.form-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #a8071a;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 10px;
}

.auth-links {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-links a {
    color: var(--primary);
    font-weight: 500;
}

.auth-links .divider {
    margin: 0 8px;
    color: #c8d3e1;
}

.auth-foot {
    margin-top: 26px;
    text-align: center;
    font-size: 12px;
    color: #9aa8b8;
    line-height: 1.9;
}

/* ---------------------------------------------------------------- 聊天容器 */
.chat-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg);
}

.chat-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 56px;
    padding: 0 10px 0 6px;
    padding-top: env(safe-area-inset-top, 0);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    z-index: 3;
}

.brand-mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b7cf6, #0fa89a);
}

.brand-text {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 11px;
    border-radius: 15px;
    background: var(--primary-l);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.quota-pill.is-empty {
    background: #fff1f0;
    color: var(--danger);
}

.qp-label {
    color: inherit;
    opacity: .75;
}

.qp-value {
    font-weight: 700;
    font-size: 13px;
}

/* ---------------------------------------------------------------- 主内容 */
.chat-main {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 14px 6px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.welcome {
    padding: 26px 4px 8px;
}

.welcome-logo {
    margin-bottom: 16px;
}

.welcome-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: .4px;
}

.welcome-sub {
    margin: 0 0 22px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--muted);
}

.suggest {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 13px;
    text-align: left;
    background: #fff;
    border: 1px solid #eaf0f7;
    border-radius: 12px;
    transition: border-color .18s, box-shadow .18s, transform .1s;
}

.suggest-item:hover {
    border-color: #cddffb;
    box-shadow: 0 4px 14px rgba(22, 104, 227, .08);
}

.suggest-item:active {
    transform: scale(.99);
}

.si-t {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.si-d {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
}

/* ---------------------------------------------------------------- 消息 */
.messages {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 8px;
}

.messages:empty {
    display: none;
}

.msg {
    display: flex;
    flex-direction: column;
    animation: msgIn .22s ease-out;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.msg-user {
    align-items: flex-end;
}

.msg-user .bubble {
    max-width: 82%;
    padding: 11px 14px;
    border-radius: 14px 14px 4px 14px;
    background: linear-gradient(135deg, #2b7cf6, #1668e3);
    color: #fff;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg-ai {
    align-items: flex-start;
}

.msg-ai .ai-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    font-size: 12px;
    color: var(--muted);
}

.ai-avatar {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2b7cf6, #0fa89a);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .5px;
}

.msg-ai .bubble {
    width: 100%;
    max-width: 100%;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid #eaf0f7;
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 2px 8px rgba(22, 60, 120, .04);
    font-size: 14.5px;
    line-height: 1.78;
    color: #263341;
    word-break: break-word;
}

.msg-ai .bubble.is-error {
    border-color: #ffd6d6;
    background: #fff6f6;
    color: #b32b2b;
}

/* 元宝风「思考中」 */
.thinking {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 0;
    color: #6d7d90;
    font-size: 13.5px;
}

.thinking .dots {
    display: inline-flex;
    gap: 4px;
}

.thinking .dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2b7cf6;
    opacity: .4;
    animation: dotPulse 1.25s infinite ease-in-out;
}

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

@keyframes dotPulse {
    0%, 100% { opacity: .28; transform: translateY(0); }
    40%      { opacity: 1;   transform: translateY(-2px); }
}

/* 正文排版 */
.md {
    font-size: 14.5px;
    line-height: 1.78;
}

.md p {
    margin: 0 0 10px;
}

.md p:last-child {
    margin-bottom: 0;
}

.md h1,
.md h2,
.md h3,
.md h4 {
    margin: 14px 0 8px;
    font-size: 15.5px;
    font-weight: 650;
    line-height: 1.5;
}

.md h1 { font-size: 17px; }

.md ul,
.md ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

.md li {
    margin: 3px 0;
    line-height: 1.75;
}

.md blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    border-left: 3px solid #cfe0f8;
    background: #f7faff;
    color: #51637a;
    border-radius: 0 8px 8px 0;
}

.md a {
    color: var(--primary);
    word-break: break-all;
}

.md hr {
    height: 1px;
    margin: 14px 0;
    border: 0;
    background: #edf2f8;
}

.md table {
    width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
    font-size: 13px;
}

.md table th,
.md table td {
    padding: 7px 9px;
    border: 1px solid #e8eff8;
    text-align: left;
}

.md table th {
    background: #f7faff;
    font-weight: 600;
}

.md strong {
    font-weight: 650;
    color: #17212d;
}

.inline-code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #eff4fb;
    color: #1657b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

/* 代码框 */
.code-block {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0e1726;
    border: 1px solid #16223a;
}

.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: #16223a;
    color: #9db0cb;
    font-size: 12px;
    letter-spacing: .3px;
}

.code-lang {
    font-weight: 600;
    text-transform: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.code-copy {
    flex: none;
    padding: 3px 9px;
    font-size: 11.5px;
    color: #9db0cb;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    transition: background .18s, color .18s;
}

.code-copy:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.code-copy.is-copied {
    color: #6ee7b7;
    border-color: rgba(110, 231, 183, .35);
}

.code-body {
    margin: 0;
    padding: 13px 14px 15px;
    overflow-x: auto;
    color: #dbe6f5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.code-body code {
    font: inherit;
    color: inherit;
    background: none;
}

/* ---------------------------------------------------------------- 提示条 */
.site-notice {
    flex: none;
    margin: 0 14px 6px;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #7a5b12;
    background: #fff8e6;
    border: 1px solid #ffe9b3;
    border-radius: 9px;
}

.quota-alert {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 14px 8px;
    padding: 10px 13px;
    font-size: 13px;
    color: #a8071a;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 10px;
}

.quota-alert[hidden] {
    display: none;
}

.qa-link {
    flex: none;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: var(--danger);
    border-radius: 8px;
}

/* ---------------------------------------------------------------- 输入区 */
.composer {
    flex: none;
    padding: 8px 12px 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--line);
}

.composer-inner {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 6px 6px 6px 14px;
    background: #f7f9fd;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    transition: border-color .18s, background .18s;
}

.composer-inner:focus-within {
    border-color: #c3d7f7;
    background: #fff;
}

.chat-input {
    flex: 1;
    min-height: 30px;
    max-height: 132px;
    padding: 4px 0;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.62;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
    resize: none;
    overflow-y: auto;
}

.chat-input::placeholder {
    color: #aebbcb;
}

.send-btn {
    flex: none;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2b7cf6, #1668e3);
    color: #fff;
    transition: opacity .18s, transform .1s;
}

.send-btn:active {
    transform: scale(.95);
}

.send-btn:disabled {
    background: #cfdbeb;
    cursor: not-allowed;
}

.composer-tip {
    margin-top: 6px;
    text-align: center;
    font-size: 11px;
    color: #a8b5c5;
}

/* ---------------------------------------------------------------- 历史抽屉 */
.drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(16, 28, 48, .38);
    backdrop-filter: blur(1px);
    z-index: 20;
    opacity: 1;
    transition: opacity .22s;
}

.drawer-mask[hidden] {
    display: none;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 84%;
    max-width: 330px;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 21;
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 6px 0 30px rgba(16, 40, 80, .12);
    padding-top: env(safe-area-inset-top, 0);
}

.drawer.is-open {
    transform: translateX(0);
}

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

.drawer-title {
    font-size: 15px;
    font-weight: 650;
}

.drawer-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}

.drawer-close:hover {
    background: #f3f6fa;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
}

.history-empty {
    padding: 30px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px 12px;
    border-radius: 10px;
    transition: background .16s;
}

.history-item:hover {
    background: #f6f9fd;
}

.history-item.is-active {
    background: var(--primary-l);
}

.hi-btn {
    flex: 1;
    min-width: 0;
    padding: 2px 0;
    text-align: left;
    border: 0;
    background: transparent;
}

.hi-title {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hi-time {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #9dabbd;
}

.hi-del {
    flex: none;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b3c1d2;
    font-size: 15px;
    line-height: 1;
}

.hi-del:hover {
    background: #fff1f0;
    color: var(--danger);
}

.drawer-foot {
    flex: none;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
}

.clear-btn {
    width: 100%;
    padding: 11px;
    font-size: 13.5px;
    color: var(--danger);
    background: #fff5f5;
    border: 1px solid #ffd9d9;
    border-radius: 10px;
}

.clear-btn:hover {
    background: #ffecec;
}

.clear-btn:disabled {
    color: #b9c5d4;
    background: #f5f7fa;
    border-color: var(--line);
    cursor: not-allowed;
}

/* ---------------------------------------------------------------- 购买额度 */
.sub-shell {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.sub-header {
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 10px;
    padding-top: env(safe-area-inset-top, 0);
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 2;
}

.back-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--text-2);
    font-size: 26px;
    line-height: 1;
}

.back-btn:hover {
    background: #f2f6fb;
}

.sub-title {
    flex: 1;
    text-align: center;
    font-size: 15.5px;
    font-weight: 650;
}

.sub-right {
    width: 34px;
    flex: none;
}

.quota-hero {
    margin: 14px;
    padding: 22px 20px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2b7cf6 0%, #1668e3 55%, #0f8aa8 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(22, 104, 227, .22);
}

.qh-label {
    font-size: 12.5px;
    opacity: .85;
    letter-spacing: .4px;
}

.qh-value {
    margin: 8px 0 10px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.qh-value span {
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.qh-value em {
    font-style: normal;
    font-size: 13px;
    opacity: .85;
}

.qh-tip {
    font-size: 12px;
    opacity: .8;
}

.pay-notice {
    margin: 0 14px 6px;
    padding: 10px 13px;
    font-size: 13px;
    line-height: 1.6;
    border-radius: 10px;
    background: #eafaf2;
    border: 1px solid #b7ecd2;
    color: #0d7a4c;
}

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

.section-title {
    margin: 16px 16px 10px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px;
}

.sk-loading {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    background: #fff;
    border-radius: 12px;
}

.product-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    text-align: left;
    background: #fff;
    border: 1px solid #e8eef7;
    border-radius: 14px;
    transition: border-color .18s, box-shadow .18s, transform .1s;
}

.product-card:hover {
    border-color: #cfe0f8;
    box-shadow: 0 6px 18px rgba(22, 104, 227, .07);
}

.product-card.is-selected {
    border-color: var(--primary);
    background: #f7fbff;
    box-shadow: 0 0 0 3px rgba(22, 104, 227, .09);
}

.pc-left {
    flex: 1;
    min-width: 0;
}

.pc-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 650;
    color: var(--text);
}

.pc-badge {
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 500;
    color: #b25b00;
    background: #fff5e6;
    border: 1px solid #ffe2b8;
    border-radius: 5px;
}

.pc-quota {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--muted);
}

.pc-quota b {
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
}

.pc-price {
    flex: none;
    text-align: right;
    color: var(--danger);
    font-size: 19px;
    font-weight: 700;
}

.pc-price small {
    font-size: 13px;
    font-weight: 600;
    margin-right: 1px;
}

.paytypes {
    display: flex;
    gap: 10px;
    padding: 0 14px;
    flex-wrap: wrap;
}

.paytype {
    flex: 1;
    min-width: 100px;
    padding: 12px 10px;
    font-size: 13.5px;
    color: var(--text-2);
    background: #fff;
    border: 1px solid #e8eef7;
    border-radius: 11px;
    transition: border-color .18s, color .18s, background .18s;
}

.paytype.is-selected {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-l);
    font-weight: 600;
}

.buy-bar {
    margin: 16px 14px 0;
}

.buy-bar .primary-btn {
    margin: 0;
}

.pay-help {
    margin: 12px 16px 0;
    font-size: 12px;
    line-height: 1.7;
    color: #9aa8b8;
    text-align: center;
}

.site-foot {
    margin: 26px 16px calc(26px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 12px;
    color: #a8b5c5;
    line-height: 1.9;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 400px) {
    .suggest {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        padding-top: 36px;
    }

    .auth-card {
        padding: 22px 18px 18px;
    }
}

@media (min-width: 861px) {
    body.page-chat {
        background: #eef2f8;
    }

    .chat-shell {
        box-shadow: 0 0 0 1px rgba(20, 50, 90, .05), 0 18px 50px rgba(20, 50, 90, .07);
    }

    .chat-main {
        padding: 18px 22px 6px;
    }

    .composer {
        padding-left: 18px;
        padding-right: 18px;
    }
}
