/* ============================================================
 * Enterprise Blue SaaS Theme — 前台兑换页
 * 设计令牌沿用旧变量名，确保所有 inline style="var(--xxx)" 仍生效
 * ============================================================ */
.wechat-browser,
.wechat-browser body {
    overflow: hidden;
}

.wechat-browser-guide[hidden] {
    display: none;
}

.wechat-browser-guide {
    position: fixed;
    inset: 0;
    z-index: 100000;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(20px, env(safe-area-inset-top)) 24px 32px;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    outline: none;
}

.wechat-guide-content {
    max-width: 520px;
    margin-left: auto;
    text-align: right;
}

.wechat-guide-arrow {
    display: block;
    width: 110px;
    height: 130px;
    margin: 0 0 18px auto;
    color: #c4b5fd;
}

.wechat-guide-label {
    margin: 0 0 12px;
    color: #c4b5fd;
    font-size: 14px;
}

.wechat-guide-content h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(24px, 6vw, 32px);
}

#wechatGuideDescription {
    font-size: 17px;
    line-height: 2;
}

.wechat-guide-menu {
    display: inline-block;
    padding: 0 10px;
    border: 1px solid #64748b;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1.4;
}

.wechat-guide-alternative {
    margin-top: 24px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.8;
}

:root {
    /* 主色 */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.18);
    --accent: #2563eb;
    --accent-soft: #eff6ff;
    --accent-glow: rgba(37, 99, 235, 0.18);

    /* 中性色 */
    --bg-page: #f4f7fb;
    --bg-dark: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #f1f5f9;
    --glass: #ffffff;
    --glass-border: #e5e7eb;
    --border-strong: #cbd5e1;
    --divider: #eef2f7;

    /* 文本 */
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-dim: #64748b;
    --text-muted: #94a3b8;

    /* 状态色 */
    --success: #10b981;
    --success-soft: #ecfdf5;
    --error: #ef4444;
    --error-soft: #fef2f2;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --info: #0ea5e9;
    --info-soft: #f0f9ff;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-focus: 0 0 0 4px rgba(37, 99, 235, 0.14);

    /* 圆角 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ============ 全局滚动条 ============ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 2px solid var(--bg-page);
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

* {
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

/* ============ 装饰背景（极淡蓝色光晕） ============ */
.background-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(at 12% 8%, rgba(37, 99, 235, 0.10) 0px, transparent 45%),
        radial-gradient(at 88% 6%, rgba(14, 165, 233, 0.08) 0px, transparent 45%),
        radial-gradient(at 90% 92%, rgba(37, 99, 235, 0.08) 0px, transparent 45%),
        radial-gradient(at 5% 95%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
        var(--bg-page);
    pointer-events: none;
}

.blob {
    display: none;
}

@keyframes rotate {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

/* ============ 主容器（卡片） ============ */
.glass-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    animation: fadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-container::before {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 64px;
    height: 64px;
    background: var(--primary-soft);
    border: 1px solid #dbeafe;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
}

.logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
}

.logo svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-main);
    margin-bottom: 6px;
    background: none;
    -webkit-text-fill-color: var(--text-main);
}

header p {
    color: var(--text-dim);
    font-size: 14px;
}

/* ============ 输入框 ============ */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input,
textarea,
select {
    display: block;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    box-shadow: var(--shadow-sm);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-focus);
}

#tokenInput,
#sessionInput {
    padding-bottom: 50px;
    min-height: 120px;
}

textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

textarea::-webkit-scrollbar {
    display: block;
    width: 8px;
}

/* ============ 主按钮 ============ */
button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--primary);
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
    gap: 8px;
}

button:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: none;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
    background: var(--text-muted);
}

button:disabled::after {
    display: none;
}

button::after {
    display: none;
}

/* 次要按钮 */
.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text-main);
    box-shadow: none;
}

/* ============ 辅助卡片 ============ */
.helper-box {
    background: var(--primary-soft);
    border: 1px solid #dbeafe;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 0;
    text-align: center;
    color: var(--text-secondary);
}

.get-token-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.textarea-wrapper {
    position: relative;
    width: 100%;
    display: flex;
}

.get-token-btn-floating {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s, color 0.15s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.get-token-btn-floating::after {
    display: none;
}

.get-token-btn-floating:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
}

.get-token-btn-floating:active {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff !important;
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
}

.get-token-btn-floating:focus-visible {
    outline: none;
    color: #ffffff !important;
    box-shadow: var(--shadow-focus), 0 2px 6px rgba(37, 99, 235, 0.2);
}

.get-token-btn-floating svg {
    width: 14px;
    height: 14px;
}

.hint {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.hint b {
    color: var(--primary);
}

.notice-box {
    margin: 12px 0;
    padding: 12px 14px;
    background: var(--warning-soft);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    text-align: left;
}

.notice-box p {
    color: #92400e !important;
    font-size: 13px !important;
    line-height: 1.55;
    margin: 0 !important;
}

.notice-box b {
    color: #b45309;
}

/* ============ 任务进度 ============ */
.task-progress {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.task-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.task-progress-header b {
    color: var(--primary);
    text-shadow: none;
    font-weight: 700;
}

.task-progress-track {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
    border: none;
}

.task-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    box-shadow: none;
    transition: width 0.5s ease;
}

.task-progress-bar.error {
    background: linear-gradient(90deg, var(--error), #fb923c);
    box-shadow: none;
}

.status-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    line-height: 1.55;
}

@keyframes slideUp {
    from { transform: translateY(8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.status-success {
    background: var(--success-soft);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-error {
    background: var(--error-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    margin: 0;
    flex: 0 0 auto;
}

.btn-secondary .loader {
    border-color: rgba(15, 23, 42, 0.18);
    border-top-color: var(--primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ Tab 导航 ============ */
.main-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 1px;
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: var(--primary);
    text-transform: uppercase;
}

/* ============ 公共运行时面板（右侧并发槽） ============ */
.public-runtime-panel {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    width: 220px;
    z-index: 5;
}

.public-runtime-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.public-runtime-title {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.public-runtime-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: left;
    color: var(--text-main);
}

.public-runtime-meta {
    color: var(--text-dim);
    font-size: 12px;
    text-align: left;
    line-height: 1.45;
}

.public-slot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
}

.public-slot-box {
    height: 12px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--surface-soft);
    transition: 0.2s ease;
}

.public-slot-box.idle {
    background: var(--surface-soft);
    border-color: var(--glass-border);
}

.public-runtime-panel.load-low .public-runtime-value {
    color: var(--success);
}

.public-runtime-panel.load-low .public-slot-box.occupied {
    background: var(--success);
    border-color: #6ee7b7;
}

.public-runtime-panel.load-mid .public-runtime-value {
    color: #d97706;
}

.public-runtime-panel.load-mid .public-slot-box.occupied {
    background: var(--warning);
    border-color: #fcd34d;
}

.public-runtime-panel.load-high .public-runtime-value {
    color: var(--error);
}

.public-runtime-panel.load-high .public-slot-box.occupied {
    background: var(--error);
    border-color: #fca5a5;
}

.tab-nav {
    display: flex;
    gap: 4px;
    background: var(--surface-soft);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: none;
}

.tab-btn:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
    box-shadow: none;
    transform: none;
}

.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.tab-btn:disabled {
    background: transparent;
    color: var(--text-muted);
}

/* ============ 查询结果 ============ */
.query-result-box {
    margin-top: 20px;
    background: var(--surface-soft);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    animation: slideUp 0.3s ease;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span:first-child {
    color: var(--text-dim);
    font-size: 14px;
    white-space: nowrap;
}

.result-item b,
.result-item span:last-child {
    color: var(--text-main);
    font-size: 14px;
    font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
    font-variant-numeric: tabular-nums;
    text-align: right;
    word-break: break-all;
    margin-left: 12px;
}

.status-unused {
    color: var(--success) !important;
}

.status-used {
    color: var(--error) !important;
}

/* ============ 复制小按钮（结果页用） ============ */
.copy-btn-mini {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

.copy-btn-mini:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 6px var(--primary-glow);
    transform: none;
}

/* ============ Inline-style 兼容兜底 ============
 * index.html 里有大量历史 inline `style="background: rgba(255, 255, 255, 0.03)"` 等暗色覆层。
 * 在亮色主题下这些会变成"白上加白"看不见，用属性选择器统一替换为浅灰底。
 */
[style*="background: rgba(255,255,255,0.03)"],
[style*="background: rgba(255, 255, 255, 0.03)"],
[style*="background: rgba(255,255,255,0.05)"],
[style*="background: rgba(255, 255, 255, 0.05)"],
[style*="background: rgba(255,255,255,0.02)"],
[style*="background: rgba(255, 255, 255, 0.02)"],
[style*="background:rgba(255,255,255,0.03)"],
[style*="background:rgba(255, 255, 255, 0.03)"] {
    background: var(--surface-soft) !important;
}

[style*="border: 1px solid rgba(255,255,255,0.05)"],
[style*="border: 1px solid rgba(255, 255, 255, 0.05)"],
[style*="border: 1px solid rgba(255,255,255,0.08)"],
[style*="border: 1px solid rgba(255, 255, 255, 0.08)"],
[style*="border: 1px solid rgba(255,255,255,0.1)"],
[style*="border: 1px solid rgba(255, 255, 255, 0.1)"] {
    border-color: var(--glass-border) !important;
}

/* code / 等宽 inline 文本：在亮底下变成深灰 + 蓝字 */
code {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
    font-size: 0.92em;
}

/* index.html 里 `code` 直接 inline 颜色 #fff 的，强制覆盖回深色 */
code[style*="color: #fff"],
code[style*="color:#fff"],
code[style*="color: white"] {
    color: var(--primary) !important;
}

/* 链接默认企业蓝 */
a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

/* 选择文本时的高亮 */
::selection {
    background: var(--primary);
    color: #ffffff;
}

/* index.html 内联色覆盖：浅紫 / 浅蓝 / 浅红在白底改成深一档同色系 */
[style*="color: #818cf8"] { color: var(--primary) !important; }
[style*="color:#818cf8"] { color: var(--primary) !important; }
[style*="color: #6ee7b7"] { color: #047857 !important; }
[style*="color: #f87171"] { color: #b91c1c !important; }
[style*="color: #fbbf24"] { color: #b45309 !important; }
[style*="color: #fde68a"] { color: #b45309 !important; }
[style*="color: #fff"]:not(.btn-primary):not(button):not(.copy-btn-mini):not([style*="color: #fff5"]) {
    color: var(--text-main) !important;
}
[style*="color:#fff"]:not(.btn-primary):not(button):not(.copy-btn-mini) {
    color: var(--text-main) !important;
}

/* 查询/结果卡片里 inline 的暗色边框 */
[style*="border: 1px solid rgba(255,255,255,0.05)"] { border-color: var(--divider) !important; }
[style*="border: 1px solid rgba(255, 255, 255, 0.05)"] { border-color: var(--divider) !important; }
[style*="border-bottom: 1px solid rgba(255, 255, 255, 0.05)"] { border-bottom-color: var(--divider) !important; }
[style*="border-bottom: 1px solid rgba(255,255,255,0.05)"] { border-bottom-color: var(--divider) !important; }
[style*="border-top: 1px solid rgba(255, 255, 255, 0.05)"] { border-top-color: var(--divider) !important; }
[style*="border-top: 1px solid rgba(255,255,255,0.05)"] { border-top-color: var(--divider) !important; }

/* ============ 自助充值中心（仿 cdk.98-xj.com 布局） ============ */
body.recharge-page {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(at 10% 0%, rgba(37, 99, 235, 0.12) 0, transparent 42%),
        radial-gradient(at 90% 8%, rgba(14, 165, 233, 0.10) 0, transparent 40%),
        linear-gradient(180deg, #eef4ff 0%, var(--bg-page) 38%, #f8fafc 100%);
}

.page-shell {
    width: min(720px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
    animation: fadeIn 0.45s ease;
}

.site-hero {
    text-align: center;
    margin-bottom: 28px;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.site-hero h1 {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.hero-subtitle {
    max-width: 560px;
    margin: 0 auto 18px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.65;
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.feature-badge svg {
    width: 15px;
    height: 15px;
    color: var(--primary);
}

.recharge-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px 28px 24px;
    box-shadow: var(--shadow-lg);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.card-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-head p {
    color: var(--text-dim);
    font-size: 13px;
}

.flow-badge {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-soft);
    color: var(--text-dim);
    border: 1px solid var(--glass-border);
}

.flow-badge.pending { background: #f1f5f9; color: #64748b; }
.flow-badge.cdk_ok { background: var(--info-soft); color: #0369a1; border-color: #bae6fd; }
.flow-badge.running { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }
.flow-badge.success { background: var(--success-soft); color: #047857; border-color: #a7f3d0; }
.flow-badge.failed,
.flow-badge.manual { background: var(--error-soft); color: #b91c1c; border-color: #fecaca; }

.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--divider);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-item.active .step-num {
    background: var(--primary);
    color: #fff;
}

.step-item.done .step-num {
    background: var(--success);
    color: #fff;
}

.step-item.active,
.step-item.done {
    color: var(--text-main);
}

.step-line {
    width: 36px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 8px;
    flex-shrink: 0;
}

.notice-banner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: var(--warning-soft);
    border: 1px solid #fde68a;
}

.notice-banner svg {
    width: 18px;
    height: 18px;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}

.notice-banner p {
    margin: 0;
    color: #92400e;
    font-size: 13px;
    line-height: 1.55;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.session-submit-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.online-payment-coming {
    min-height: 220px;
    padding: 40px 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 10px;
}

.online-payment-coming svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.online-payment-coming strong {
    color: var(--text-main);
    font-size: 18px;
}

.online-payment-coming p {
    margin: 0;
    font-size: 13px;
}

.session-json-instruction {
    line-height: 1.65;
}

.session-json-instruction a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.field-hint {
    margin-top: -8px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

.cdk-confirmed {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--success-soft);
    border: 1px solid #a7f3d0;
    font-size: 13px;
    color: #065f46;
}

.cdk-confirmed .confirmed-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cdk-confirmed strong {
    font-weight: 700;
}

.cdk-confirmed code {
    background: rgba(255, 255, 255, 0.7);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 15px;
}

button.is-loading .btn-text {
    opacity: 0.85;
}

.task-progress-text {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.query-result-card {
    text-align: left;
    background: var(--surface-soft);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 4px 14px;
}

.query-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider);
    font-size: 14px;
}

.query-row:last-child {
    border-bottom: none;
}

.query-row span {
    color: var(--text-dim);
}

.query-row strong {
    color: var(--text-main);
    font-weight: 600;
}

.status-processing {
    color: var(--warning) !important;
}

.faq-panel {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.faq-panel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    list-style: none;
}

.faq-panel summary::-webkit-details-marker {
    display: none;
}

.faq-panel ul {
    margin: 12px 0 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-dim);
}

.recharge-page .public-runtime-panel {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .page-shell {
        width: calc(100% - 20px);
        padding: 24px 0 40px;
    }

    .recharge-card {
        padding: 20px 16px;
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-label {
        font-size: 12px;
    }

    .step-line {
        width: 20px;
    }
}

/* ============ 套餐说明 / 发票助手 ============ */
.plan-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.plan-card.highlight {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.plan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.plan-card h3 {
    font-size: 15px;
    font-weight: 700;
}

.plan-card p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
}

.plan-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.plan-tag.pro {
    background: var(--primary-soft);
    color: var(--primary);
}

.region-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.feature-badge.feature-link {
    text-decoration: none;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s;
}

.feature-badge.feature-link:hover {
    color: var(--primary);
    border-color: #bfdbfe;
}

.compact-hero {
    margin-bottom: 20px;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
}

.back-home-link:hover {
    color: var(--primary);
}

.subscription-card .guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

.guide-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.guide-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-step h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.guide-step p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dim);
}

.subscription-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subscription-query-section {
    margin-top: 4px;
}

.subscription-field-hint {
    margin-top: 10px;
    margin-bottom: 14px;
}

.subscription-query-actions {
    margin-top: 0;
}

.subscription-query-actions button {
    width: 100%;
}

button.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.is-loading .loader {
    display: block;
}

.subscription-result {
    margin-top: 18px;
}

.subscription-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.subscription-result-head h2 {
    font-size: 16px;
    margin: 0;
}

.subscription-billing-actions {
    margin-top: 14px;
}

.subscription-guide-panel {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--glass-border);
}

.subscription-guide-panel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 0;
}

.subscription-guide-panel[open] summary {
    margin-bottom: 12px;
}

.invoice-guide-panel .guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.action-link-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .plan-showcase {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * Midnight storefront — 兑换首页视觉改版
 * ============================================================ */
body.recharge-page {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-soft: rgba(139, 92, 246, 0.14);
    --primary-glow: rgba(139, 92, 246, 0.28);
    --bg-page: #070b14;
    --surface: #0f1728;
    --surface-soft: #131d31;
    --surface-hover: #17243b;
    --glass-border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(167, 139, 250, 0.48);
    --divider: rgba(148, 163, 184, 0.12);
    --text-main: #f8fafc;
    --text-secondary: #dbe4f3;
    --text-dim: #91a0b8;
    --text-muted: #64748b;
    --warning-soft: rgba(245, 158, 11, 0.09);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.14);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.36);
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        #070b14;
    background-size: 44px 44px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.storefront-glow {
    position: fixed;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .16;
    pointer-events: none;
    z-index: 0;
}

.storefront-glow-one { left: -220px; top: -220px; background: #7c3aed; }
.storefront-glow-two { right: -260px; top: 260px; background: #06b6d4; }

.recharge-page .page-shell {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 40px));
    padding: 28px 0 64px;
}

.public-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 68px;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .12em;
}

.public-brand:hover { color: #fff; }
.public-brand b { color: #a78bfa; }

.public-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    box-shadow: 0 8px 30px rgba(139, 92, 246, .3);
}

.public-brand-mark svg { width: 17px; }

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    color: #aab7ca;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(15, 23, 40, .55);
}

.topbar-link:hover { color: #fff; border-color: rgba(167, 139, 250, .45); }
.topbar-link svg { width: 15px; }

.recharge-page .site-hero {
    max-width: 800px;
    margin: 0 0 52px;
    text-align: left;
}

.recharge-page .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 0;
    color: #a78bfa;
    background: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.hero-eyebrow span {
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, #8b5cf6, #22d3ee);
}

.recharge-page .site-hero h1 {
    max-width: 780px;
    margin-bottom: 22px;
    color: #f8fafc;
    font-size: clamp(40px, 7vw, 68px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.055em;
}

.recharge-page .site-hero h1 em {
    color: transparent;
    background: linear-gradient(100deg, #c4b5fd 0%, #8b5cf6 42%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-style: normal;
}

.recharge-page .hero-subtitle {
    max-width: 650px;
    margin: 0 0 24px;
    color: #91a0b8;
    font-size: 16px;
    line-height: 1.8;
}

.recharge-page .feature-badges { justify-content: flex-start; gap: 8px; }

.recharge-page .feature-badge {
    padding: 7px 11px;
    color: #b9c4d5;
    border-color: rgba(148, 163, 184, .14);
    background: rgba(15, 23, 40, .62);
    box-shadow: none;
    font-size: 12px;
}

.recharge-page .feature-badge svg { color: #a78bfa; }

.recharge-page .plan-showcase { gap: 14px; margin-bottom: 15px; }

.recharge-page .plan-card {
    position: relative;
    min-height: 220px;
    padding: 24px 22px 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(19, 29, 49, .92), rgba(10, 17, 31, .92));
    box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
    transition: transform .25s ease, border-color .25s ease;
}

.recharge-page .plan-card::after {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    right: -60px;
    bottom: -70px;
    border-radius: 50%;
    background: #8b5cf6;
    filter: blur(55px);
    opacity: .12;
}

.recharge-page .plan-card:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, .44); }

.recharge-page .plan-card.highlight {
    border-color: rgba(139, 92, 246, .48);
    background: linear-gradient(150deg, rgba(46, 30, 78, .8), rgba(12, 19, 34, .95));
}

.plan-index {
    margin-bottom: 28px;
    color: rgba(167, 139, 250, .7);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: .14em;
}

.recharge-page .plan-card-head { margin-bottom: 12px; }
.recharge-page .plan-card h3 { color: #f8fafc; font-size: 17px; letter-spacing: -.02em; }
.recharge-page .plan-card p { color: #8492a8; font-size: 12px; line-height: 1.75; }
.recharge-page .plan-card p strong { color: #c4b5fd; }

.recharge-page .plan-tag {
    color: #aab7ca;
    background: rgba(148, 163, 184, .1);
    border: 1px solid rgba(148, 163, 184, .12);
}

.recharge-page .plan-tag.pro { color: #c4b5fd; background: rgba(139, 92, 246, .14); }

.plan-price {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

.plan-price[hidden] { display: none; }
.plan-price > span, .plan-price small { color: #64748b; font-size: 11px; }
.plan-price strong { color: #f8fafc; font-size: 23px; letter-spacing: -.04em; }
.plan-price strong i { font-style: normal; }
.price-currency { margin-right: 3px; color: #a78bfa; font-size: 13px; font-weight: 700; letter-spacing: 0; }

.recharge-page .region-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0 2px 28px;
    color: #64748b;
}

.recharge-page .region-hint svg { width: 14px; }

.recharge-page .recharge-card {
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    background: rgba(12, 20, 35, .88);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
    backdrop-filter: blur(18px);
}

.card-kicker {
    display: block;
    margin-bottom: 8px;
    color: #8b5cf6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.recharge-page .card-head h2 { color: #f8fafc; font-size: 25px; letter-spacing: -.035em; }
.recharge-page .card-head p { color: #8290a6; }
.recharge-page .flow-badge { color: #aab7ca; background: rgba(148, 163, 184, .08); }
.recharge-page .stepper { background: rgba(19, 29, 49, .75); border-color: rgba(148, 163, 184, .12); }
.recharge-page .step-num { background: #202d43; color: #8290a6; }
.recharge-page .step-item.active .step-num { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.recharge-page .step-line { background: #26334a; }
.recharge-page .notice-banner { border-color: rgba(245, 158, 11, .24); }
.recharge-page .notice-banner p { color: #d5a755; }
.recharge-page .notice-banner svg { color: #f59e0b; }

.recharge-page .tab-nav {
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, .12);
    background: #0a1220;
}

.recharge-page .tab-btn { color: #74839a; }
.recharge-page .tab-btn.active { color: #fff; background: #18243a; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.recharge-page .field-label { color: #cbd5e1; }
.recharge-page input,
.recharge-page textarea,
.recharge-page select { color: #eef2ff; background: #0a1220; border-color: rgba(148, 163, 184, .18); }
.recharge-page input::placeholder,
.recharge-page textarea::placeholder { color: #526178; }
.recharge-page input:focus,
.recharge-page textarea:focus { background: #0c1525; border-color: #8b5cf6; }

.recharge-page .btn-primary {
    border: 0;
    background: linear-gradient(100deg, #7c3aed, #6366f1 58%, #0891b2);
    box-shadow: 0 12px 30px rgba(99, 102, 241, .24);
}

.recharge-page .btn-primary:hover { background: linear-gradient(100deg, #8b5cf6, #6366f1 58%, #06b6d4); }
.recharge-page .btn-secondary { color: #aab7ca; background: #111b2d; border-color: rgba(148, 163, 184, .16); }
.recharge-page .get-token-btn-floating { color: #c4b5fd; background: #1b1530; border-color: rgba(139, 92, 246, .3); }
.recharge-page .faq-panel,
.recharge-page .public-runtime-panel { color: #b8c3d5; background: rgba(12, 20, 35, .82); border-color: rgba(148, 163, 184, .14); box-shadow: none; }
.recharge-page .faq-panel summary { color: #dbe4f3; }

@media (max-width: 760px) {
    .recharge-page .page-shell { width: min(100% - 24px, 1040px); padding-top: 18px; }
    .public-topbar { margin-bottom: 48px; }
    .topbar-link { padding: 8px; font-size: 0; }
    .topbar-link svg { margin: 0; }
    .recharge-page .site-hero h1 { font-size: clamp(36px, 12vw, 52px); }
    .recharge-page .plan-showcase { grid-template-columns: 1fr; }
    .recharge-page .plan-card { min-height: 0; }
    .plan-index { margin-bottom: 18px; }
    .recharge-page .recharge-card { padding: 24px 18px; }
    .recharge-page .region-hint { justify-content: flex-start; }
}

/* ==================== Landing storefront v2 ==================== */

html { scroll-behavior: smooth; }

body.recharge-page.landing-page {
    --landing-primary: #4f46f6;
    --landing-violet: #7c32f4;
    --landing-ink: #10182b;
    --landing-muted: #63718b;
    --landing-line: #e3e8f2;
    min-height: 100vh;
    color: var(--landing-ink);
    background:
        radial-gradient(circle at 12% 7%, rgba(92, 102, 246, .09), transparent 28%),
        radial-gradient(circle at 89% 25%, rgba(124, 50, 244, .07), transparent 25%),
        #f7f9fc;
    background-image:
        radial-gradient(circle at 12% 7%, rgba(92, 102, 246, .09), transparent 28%),
        radial-gradient(circle at 89% 25%, rgba(124, 50, 244, .07), transparent 25%);
}

.landing-page.contact-modal-open { overflow: hidden; }

.landing-page .page-shell {
    width: min(1180px, calc(100% - 40px));
    padding: 0 0 72px;
}

.landing-page .public-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100vw;
    min-height: 76px;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(229, 233, 241, .92);
    background: rgba(255, 255, 255, .9);
    box-shadow: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.landing-page .public-brand {
    color: #162036;
    font-size: 16px;
    letter-spacing: .08em;
}

.landing-page .public-brand:hover { color: #162036; }
.landing-page .public-brand b { color: var(--landing-primary); }

.landing-page .public-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.landing-page .public-brand-mark img {
    display: block;
    width: 38px;
    height: 38px;
}

.topbar-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.topbar-nav-links > a {
    color: #39455c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color .2s ease;
}

.topbar-nav-links > a:hover { color: var(--landing-primary); }

.contact-nav-btn,
.hero-primary,
.hero-secondary,
.subscribe-btn,
.contact-action-link,
.contact-copy-btn,
.contact-close {
    font: inherit;
}

.contact-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    color: #fff;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(110deg, #3167f5, #7d35f4);
    box-shadow: 0 12px 28px rgba(78, 70, 246, .22);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.contact-nav-btn svg { width: 16px; }
.contact-nav-btn:hover { transform: translateY(-1px); }

.landing-page .landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    align-items: center;
    max-width: none;
    min-height: 520px;
    margin: 0;
    padding: 74px 30px 70px;
    text-align: left;
}

.landing-page .hero-copy { position: relative; z-index: 2; }

.landing-page .hero-eyebrow {
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 13px;
    color: #4f46e5;
    border: 1px solid #dfe2ff;
    border-radius: 999px;
    background: #f1f2ff;
    font-size: 12px;
    letter-spacing: .02em;
}

.landing-page .hero-eyebrow svg { width: 15px; }

.landing-page .site-hero h1 {
    max-width: 760px;
    margin-bottom: 22px;
    color: #121a2d;
    -webkit-text-fill-color: #121a2d;
    font-size: clamp(45px, 5.5vw, 70px);
    line-height: 1.08;
    letter-spacing: -.055em;
}

.landing-page .site-hero h1 em {
    display: inline-block;
    color: transparent;
    background: linear-gradient(100deg, #3068f5 0%, #633cef 50%, #8a2be2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: .78em;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.landing-page .hero-subtitle {
    max-width: 690px;
    margin-bottom: 28px;
    color: #64718a;
    font-size: 16px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.hero-primary,
.hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 13px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.hero-primary {
    color: #fff;
    border: 0;
    background: linear-gradient(110deg, #4167f5, #7835f4);
    box-shadow: 0 14px 30px rgba(84, 64, 238, .22);
}

.hero-secondary {
    color: #35405a;
    border: 1px solid #dce2ed;
    background: rgba(255, 255, 255, .84);
}

.hero-primary svg,
.hero-secondary svg { width: 17px; }

.landing-page .feature-badges { gap: 16px; }

.landing-page .feature-badge {
    padding: 0;
    color: #68758d;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
}

.landing-page .feature-badge svg { color: #5565ef; width: 16px; }

.hero-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 350px;
}

.hero-visual::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 76, 240, .21), rgba(72, 104, 246, .04) 60%, transparent 70%);
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(92, 87, 235, .18);
    border-radius: 50%;
}

.orbit-one { width: 260px; height: 260px; transform: rotate(-18deg) scaleY(.58); }
.orbit-two { width: 340px; height: 340px; transform: rotate(28deg) scaleX(.58); }

.hero-ai-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 185px;
    height: 220px;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 32px;
    background: linear-gradient(145deg, #336bf6, #653eea 55%, #8a2be2);
    box-shadow: 0 35px 70px rgba(83, 61, 221, .3);
    transform: rotate(6deg);
}

.hero-ai-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.2), transparent 70%);
    transform: translateX(-70%);
}

.hero-ai-card span { font-size: 62px; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.hero-ai-card strong { margin-top: 10px; font-size: 18px; letter-spacing: .14em; }
.hero-ai-card small { margin-top: 7px; opacity: .72; font-size: 8px; letter-spacing: .22em; }

.pricing-section {
    scroll-margin-top: 94px;
    padding: 72px 0 42px;
}

.section-heading { margin-bottom: 34px; text-align: center; }
.section-heading > span { color: #5d51e8; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.section-heading h2 { margin: 9px 0 10px; color: #111a2d; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.04em; }
.section-heading p { color: #718099; font-size: 14px; }

.landing-page .plan-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    margin: 0;
}

.landing-page .plan-card,
.landing-page .plan-card.highlight {
    display: flex;
    flex: 0 1 calc((100% - 64px) / 5);
    flex-direction: column;
    min-width: 0;
    min-height: 610px;
    padding: 24px 12px 22px;
    overflow: visible;
    color: #182137;
    border: 1px solid #e0e5ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(23, 31, 54, .065);
}

.landing-page .plan-card[hidden] {
    display: none !important;
}

.landing-page .plan-card::after { display: none; }
.landing-page .plan-card:hover { transform: translateY(-5px); border-color: #aaa7ff; box-shadow: 0 24px 55px rgba(61, 55, 170, .12); }
.landing-page .plan-card.featured { border-color: #7169ff; box-shadow: 0 20px 48px rgba(78, 70, 246, .1); }

.landing-page .plan-card-head { margin: 0 0 19px; }
.landing-page .plan-card h3 { color: #141c30; font-size: 22px; line-height: 1.25; letter-spacing: -.035em; }

.landing-page .plan-tag,
.landing-page .plan-tag.pro {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    color: #5146df;
    border: 0;
    border-radius: 999px;
    background: #f0efff;
    font-size: 11px;
    font-weight: 800;
}

.landing-page .plan-price {
    display: flex;
    align-items: baseline;
    min-height: 59px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

.landing-page .plan-price[hidden] { display: none; }
.landing-page .plan-price strong { color: #111a2d; font-size: 48px; line-height: 1; letter-spacing: -.055em; }
.landing-page .plan-price small { margin-left: 7px; color: #71809a; font-size: 14px; }
.landing-page .price-currency { margin-right: 5px; color: #111a2d; font-size: 24px; }

.landing-page .plan-summary {
    min-height: 54px;
    margin: 0 0 20px;
    color: #697790;
    font-size: 13px;
    line-height: 1.75;
}

.plan-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 23px;
}

.plan-service-grid > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 92px;
    padding: 13px 10px;
    border: 1px solid #dfe4ff;
    border-radius: 14px;
    background: #f8f9ff;
}

.plan-service-grid svg { width: 18px; color: #574dec; }
.plan-service-grid b { margin-top: 7px; color: #202941; font-size: 12px; white-space: nowrap; }
.plan-service-grid small { margin-top: 4px; color: #8290a7; font-size: 10px; }

.plan-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.plan-benefits li { display: flex; align-items: center; gap: 8px; color: #526077; font-size: 12px; }
.plan-benefits svg { flex: 0 0 auto; width: 19px; height: 19px; padding: 4px; color: #564be9; border-radius: 50%; background: #e9ebff; stroke-width: 3; }

.subscribe-btn {
    width: 100%;
    min-height: 51px;
    margin-top: auto;
    color: #fff;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(105deg, #4f46e5, #7c32f4);
    box-shadow: 0 13px 26px rgba(82, 63, 225, .2);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.subscribe-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }

.landing-page .region-hint { justify-content: center; margin: 18px 0 0; color: #8a96aa; }

.landing-page .recharge-card {
    scroll-margin-top: 100px;
    max-width: 900px;
    margin: 54px auto 0;
    padding: 38px;
    color: #172037;
    border: 1px solid #e0e6f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(24, 34, 58, .09);
    backdrop-filter: none;
}

.landing-page .card-kicker { color: #6254e9; }
.landing-page .card-head h2 { color: #172037; }
.landing-page .card-head p { color: #77849a; }
.landing-page .flow-badge { color: #5f6e86; background: #f1f4f8; }
.landing-page .stepper { border-color: #e4e8f1; background: #f7f9fc; }
.landing-page .step-num { color: #70809a; background: #e8edf5; }
.landing-page .step-item.active .step-num { color: #fff; background: linear-gradient(135deg, #4f63ee, #7937ed); }
.landing-page .step-line { background: #dde3ee; }
.landing-page .notice-banner { border-color: #f1d99a; background: #fffaf0; }
.landing-page .notice-banner p { color: #93661d; }

.landing-page .tab-nav { border-color: #e1e6ef; background: #f3f5f9; }
.landing-page .tab-btn { color: #738098; }
.landing-page .tab-btn.active { color: #3e46c9; background: #fff; box-shadow: 0 5px 14px rgba(31,41,65,.07); }
.landing-page .session-submit-section { border-top-color: #e5e9f1; }
.landing-page .field-label { color: #334057; }
.landing-page input,
.landing-page textarea,
.landing-page select { color: #182137; border-color: #dce2ec; background: #fff; }
.landing-page input::placeholder,
.landing-page textarea::placeholder { color: #a0aabc; }
.landing-page input:focus,
.landing-page textarea:focus { border-color: #7469ee; background: #fff; box-shadow: 0 0 0 3px rgba(105, 91, 232, .09); }
.landing-page .btn-primary { background: linear-gradient(105deg, #4b5fed, #7937ed); box-shadow: 0 12px 26px rgba(75, 73, 223, .18); }
.landing-page .btn-primary:hover { background: linear-gradient(105deg, #5a6cf2, #863ff2); }
.landing-page .btn-secondary { color: #5f6b82; border-color: #dde3ec; background: #f7f9fc; }
.landing-page .get-token-btn-floating,
.landing-page .get-token-btn-floating:visited {
    color: #3730a3 !important;
    border-color: #c7d2fe;
    background: #e0e7ff;
    box-shadow: 0 3px 10px rgba(67, 56, 202, .18);
}
.landing-page .get-token-btn-floating:hover,
.landing-page .get-token-btn-floating:focus-visible {
    color: #fff !important;
    border-color: #4f46e5;
    background: #4f46e5;
}
.landing-page .get-token-btn-floating:active {
    color: #fff !important;
    border-color: #3730a3;
    background: #3730a3;
}
.landing-page .faq-panel,
.landing-page .invoice-guide-panel,
.landing-page .public-runtime-panel { max-width: 900px; margin-left: auto; margin-right: auto; color: #5d6a81; border-color: #e1e6ef; background: #fff; box-shadow: 0 14px 40px rgba(24, 34, 58, .05); }
.landing-page .faq-panel summary,
.landing-page .invoice-guide-panel summary { color: #29354b; }

/* Contact modal */
.contact-modal[hidden] { display: none; }
.contact-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.contact-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(10, 16, 31, .58); backdrop-filter: blur(7px); cursor: default; }
.contact-dialog { position: relative; width: min(780px, 100%); max-height: calc(100vh - 44px); overflow: auto; border-radius: 22px; background: #f5f7fb; box-shadow: 0 34px 100px rgba(5, 10, 24, .35); animation: contact-dialog-in .22s ease-out; }

@keyframes contact-dialog-in {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.contact-dialog-head {
    position: relative;
    min-height: 150px;
    padding: 25px 78px 25px 28px;
    overflow: hidden;
    color: #fff;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(110deg, #236cf4, #7441ed 72%, #8d38eb);
}

.contact-dialog-head::after { content: ''; position: absolute; width: 230px; height: 230px; right: 44px; top: -72px; border: 34px solid rgba(255,255,255,.08); border-radius: 50%; }
.contact-dialog-head > div { position: relative; z-index: 1; }
.contact-dialog-head span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 700; }
.contact-dialog-head span svg { width: 14px; }
.contact-dialog-head h2 { margin: 14px 0 7px; color: #fff; font-size: 26px; }
.contact-dialog-head p { max-width: 560px; color: rgba(255,255,255,.86); font-size: 13px; line-height: 1.65; }
.contact-close { position: absolute; z-index: 2; top: 20px; right: 20px; display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; padding: 0; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; background: rgba(255,255,255,.13); line-height: 0; cursor: pointer; }
.contact-close svg { display: block; flex: 0 0 auto; width: 19px; height: 19px; margin: 0; }

.contact-dialog-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 18px; }
.contact-dialog-body.contact-no-qr { grid-template-columns: minmax(0, 1fr); }
.contact-qr-card,
.contact-method-card,
.contact-service-card { border: 1px solid #e0e5ee; border-radius: 17px; background: #fff; box-shadow: 0 8px 25px rgba(27, 36, 59, .04); }
.contact-qr-card { display: flex; flex-direction: column; align-items: center; min-height: 365px; padding: 23px 20px; }
.contact-qr-card[hidden] { display: none; }
.contact-qr-card h3 { display: flex; align-items: center; gap: 8px; color: #151d31; font-size: 15px; }
.contact-qr-card h3 span { width: 10px; height: 10px; border-radius: 50%; background: #20b15a; box-shadow: 0 0 0 5px #e8f8ef; }
.contact-qr-frame { display: grid; place-items: center; width: 220px; height: 220px; margin: 20px 0 13px; padding: 8px; border: 1px solid #dbe2ed; border-radius: 17px; background: #fff; }
.contact-qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.contact-qr-card p { color: #77849a; font-size: 12px; line-height: 1.65; text-align: center; }
.contact-method-column { display: flex; flex-direction: column; gap: 12px; }
.contact-method-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 17px; }
.contact-method-card[hidden] { display: none; }
.contact-method-card > div:nth-child(2) { min-width: 0; }
.contact-method-card small { display: block; color: #69778e; font-size: 11px; }
.contact-method-card strong { display: block; margin-top: 5px; overflow: hidden; color: #172037; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.contact-method-icon { display: grid; place-items: center; width: 43px; height: 43px; color: #fff; border-radius: 12px; background: linear-gradient(135deg, #3470f5, #6543ee); }
.contact-method-icon.telegram { background: #2aabee; }
.contact-method-icon.wechat { background: #20b75a; }
.contact-method-icon.qq { background: #3470f5; font-size: 12px; }
.contact-method-icon svg { width: 20px; }
.contact-action-link,
.contact-copy-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 13px; border-radius: 10px; font-size: 11px; font-weight: 800; text-decoration: none; cursor: pointer; }
.contact-action-link { color: #fff; border: 0; background: linear-gradient(105deg, #4067f5, #7639ed); }
.contact-copy-btn { grid-column: 2 / -1; color: #3e49cf; border: 1px solid #dbe0f6; background: #f6f7ff; }
.contact-copy-btn:hover,
.contact-copy-btn:focus-visible { color: #fff; border-color: #4f46e5; background: #4f46e5; }
.contact-copy-btn:active { color: #fff; border-color: #3730a3; background: #3730a3; }
.contact-service-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 18px; }
.contact-service-card > div:last-child > small { color: #182137; font-size: 14px; font-weight: 800; }
.contact-service-card p { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: #637188; font-size: 11px; line-height: 1.55; }
.contact-service-card p svg { flex: 0 0 auto; width: 16px; color: #5460e8; }
.contact-empty { padding: 22px; color: #7b879a; border: 1px dashed #d5dce8; border-radius: 14px; background: #fff; text-align: center; font-size: 13px; }
.contact-empty[hidden] { display: none; }

@media (min-width: 1101px) {
    .landing-page .plan-card-head { min-height: 88px; }
    .landing-page .plan-card h3 { font-size: 20px; }
    .landing-page .plan-service-grid { gap: 6px; }
    .landing-page .plan-service-grid > span { padding: 12px 3px; }
    .landing-page .plan-service-grid b { font-size: 11px; }
}

@media (max-width: 1100px) {
    .landing-page .landing-hero { grid-template-columns: 1fr; min-height: auto; padding: 70px 18px 50px; }
    .hero-visual { display: none; }
    .landing-page .plan-showcase { max-width: 760px; margin: 0 auto; }
    .landing-page .plan-card,
    .landing-page .plan-card.highlight { flex-basis: calc((100% - 16px) / 2); min-height: 0; }
    .landing-page .plan-summary { min-height: 0; }
}

@media (max-width: 680px) {
    .landing-page .page-shell { width: 100%; padding-bottom: 42px; }
    .landing-page .public-topbar { min-height: 66px; margin-left: calc(50% - 50vw); padding: 0 16px; }
    .landing-page .public-brand span:last-child { display: none; }
    .topbar-nav-links { gap: 14px; }
    .topbar-nav-links > a { font-size: 12px; }
    .contact-nav-btn { padding: 10px 12px; font-size: 12px; }
    .contact-nav-btn svg { display: none; }
    .landing-page .landing-hero { padding: 55px 20px 42px; }
    .landing-page .site-hero h1 { font-size: clamp(38px, 12vw, 52px); }
    .landing-page .hero-subtitle { font-size: 14px; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .landing-page .feature-badges { flex-wrap: wrap; gap: 11px 16px; }
    .pricing-section { padding: 54px 14px 28px; }
    .landing-page .plan-showcase { max-width: 620px; }
    .section-heading { padding: 0 10px; }
    .landing-page .plan-card,
    .landing-page .plan-card.highlight { flex-basis: 100%; padding: 24px 18px 20px; }
    .landing-page .plan-card h3 { font-size: 20px; }
    .landing-page .recharge-card { margin: 34px 12px 0; padding: 25px 17px; border-radius: 20px; }
    .landing-page .faq-panel,
    .landing-page .invoice-guide-panel,
    .landing-page .public-runtime-panel { margin-left: 12px; margin-right: 12px; }
    .contact-modal { padding: 10px; }
    .contact-dialog { max-height: calc(100vh - 20px); border-radius: 18px; }
    .contact-dialog-head { min-height: 145px; padding: 23px 60px 22px 20px; border-radius: 18px 18px 0 0; }
    .contact-dialog-head h2 { font-size: 23px; }
    .contact-dialog-body { grid-template-columns: 1fr; padding: 12px; }
    .contact-qr-card { min-height: 0; }
    .contact-method-card { grid-template-columns: 43px minmax(0, 1fr); }
    .contact-method-card .contact-action-link { grid-column: 1 / -1; }
    .contact-copy-btn { grid-column: 1 / -1; }
}

/* Standalone subscription cancellation in the Session form. */
.session-json-instruction > span { display: block; margin-bottom: 9px; }
.session-json-instruction > span:last-child { margin-bottom: 0; }
.session-action-buttons { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.session-action-buttons > button { min-width: 0; }
#cancelRenewalBtn { color: #fff; border-color: #dc2626; background: #dc2626; }
#cancelRenewalBtn:hover:not(:disabled) { color: #fff; border-color: #b91c1c; background: #b91c1c; }
#cancelRenewalBtn:focus-visible { outline: 3px solid #fca5a5; outline-offset: 3px; }
#cancelRenewalBtn .loader { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
.cancel-renewal-result { padding: 20px; border: 1px solid #dce3ef; border-radius: 14px; background: #f8faff; color: #26354d; }
.cancel-renewal-result[hidden], .cancel-renewal-details[hidden], .cancel-renewal-server-message[hidden] { display: none; }
.cancel-renewal-result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cancel-renewal-result-header h3 { margin: 0; color: #26354d; font-size: 15px; }
.cancel-renewal-badge { flex-shrink: 0; padding: 4px 9px; border-radius: 7px; background: #e9eef8; color: #566784; font-size: 12px; font-weight: 600; }
.cancel-renewal-message { margin: 12px 0 0; line-height: 1.65; font-size: 13px; overflow-wrap: anywhere; }
.cancel-renewal-server-message { margin: 6px 0 0; color: #64748b; line-height: 1.65; font-size: 12px; overflow-wrap: anywhere; }
.cancel-renewal-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; margin: 17px 0 0; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.cancel-renewal-details dt { margin-bottom: 5px; color: #76849b; font-size: 12px; }
.cancel-renewal-details dd { margin: 0; color: #26354d; line-height: 1.55; font-size: 13px; overflow-wrap: anywhere; }
.cancel-renewal-result[data-state="success"] { border-color: #b6e3ce; background: #f3fcf7; }
.cancel-renewal-result[data-state="success"] .cancel-renewal-badge { color: #08734c; background: #d9f3e5; }
.cancel-renewal-result[data-state="unconfirmed"] { border-color: #f0d89a; background: #fffcf3; }
.cancel-renewal-result[data-state="unconfirmed"] .cancel-renewal-badge { color: #936619; background: #fff0c3; }
.cancel-renewal-result[data-state="error"] { border-color: #efcaca; background: #fff8f8; }
.cancel-renewal-result[data-state="error"] .cancel-renewal-badge { color: #b33f3f; background: #fde5e5; }
@media (max-width: 680px) {
    .session-action-buttons { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .cancel-renewal-result { padding: 16px 14px; }
    .cancel-renewal-details { grid-template-columns: minmax(0, 1fr); gap: 13px; }
}
