@charset "UTF-8";
/* ============================================================
 *  AIShow · assets/css/style.css
 *  黑白极简主题 · 首页样式
 * ------------------------------------------------------------
 *  配套：index.php（结构）/ assets/js/app.js（交互）
 *  主题：html[data-theme="light" | "dark"]
 * ============================================================ */

/* ============================================================
   基础 / 主题变量
   ============================================================ */
:root {
    --bg:            #ffffff;
    --bg-soft:       #fbfbfb;
    --bg-hover:      #f5f5f5;
    --bg-active:     #f0f0f0;
    --border:        #ececec;
    --border-2:      #e2e2e2;
    --border-hover:  #cfcfcf;
    --text:          #111111;
    --text-2:        #6b6b6b;
    --text-3:        #a3a3a3;
    --meteor-tail:   rgba(17, 17, 17, .22);
    --meteor-head:   rgba(17, 17, 17, .58);
    --shadow:        0 10px 30px rgba(0, 0, 0, .07);
    --radius:        10px;
    --sidebar-w:     380px;   /* ⭐ 2026-10-01 用户要求：菜单开宽，大类（模型）名称必须一行显示不截断
                                  ⭐ 2026-10-04 再次加宽 300→340：最长的小类名（如
                                  「SeeDance2.0官方接口满参 － 官方接口」24 字）实测 300px 下会折成两行，
                                  340px 配合去掉 720P 徽标后可完整单行显示
                                  ⭐ 2026-10-07 再加宽 340→380：部分浏览器/缩放仍折行，确保长模型名一行放下 */
    --topbar-h:      58px;
}
html[data-theme="dark"] {
    --bg:            #0c0c0c;
    --bg-soft:       #141414;
    --bg-hover:      #1a1a1a;
    --bg-active:     #202020;
    --border:        #232323;
    --border-2:      #2c2c2c;
    --border-hover:  #454545;
    --text:          #f2f2f2;
    --text-2:        #a1a1a1;
    --text-3:        #6d6d6d;
    --meteor-tail:   rgba(255, 255, 255, .26);
    --meteor-head:   rgba(255, 255, 255, .68);
    --shadow:        0 10px 30px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.ico { flex: 0 0 auto; display: block; }

/* ============================================================
   背景：流星在随机位置划过（JS 每 2~3 秒生成一颗）
   ============================================================ */
.starfield {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.meteor {
    position: absolute;
    left: var(--x, 20%);
    top: var(--y, 20%);
    width: var(--len, 140px);
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--meteor-tail) 58%,
        var(--meteor-head) 100%);
    opacity: 0;
    transform: rotate(var(--angle, 32deg)) translate(0, 0);
    animation: meteor-fly var(--dur, 1.3s) cubic-bezier(.32, 0, .68, 1) forwards;
    will-change: transform, opacity;
}

@keyframes meteor-fly {
    0%   { opacity: 0;  transform: rotate(var(--angle, 32deg)) translate(0, 0) scaleX(.55); }
    14%  { opacity: 1; }
    70%  { opacity: .95; }
    100% { opacity: 0;  transform: rotate(var(--angle, 32deg)) translate(var(--dx, 420px), 0) scaleX(.88); }
}

/* ============================================================
   布局骨架
   ============================================================ */
.app {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 60;
    transition: transform .25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--topbar-h);
    padding: 0 18px;
    flex: 0 0 auto;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--text);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background-color .25s ease, color .25s ease;
}

.brand-logo svg { display: block; }

.brand-name {
    font-size: 17px;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.brand-name b  { font-weight: 700; }
.brand-name span { font-weight: 400; color: var(--text-2); letter-spacing: .08em; }

.nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* ⭐ 2026-10-10 滚动条变细（二次修正，真机注入实验定案）。
       实测坑一：Chromium 写了 `scrollbar-width: thin` 会盖掉 `::-webkit-scrollbar{width:6px}`。
       实测坑二（Chrome 154 真机）：新版 Chrome/Edge（Fluent 滚动条）**整条忽略
          ::-webkit-scrollbar 自定义** —— CSSOM 里 6px 规则在、却仍画 15px 原生条（基线实测 sbW=15）；
          注入标准 `scrollbar-width: thin` 后立刻变 10px → 标准属性是新版上唯一生效的路。
       → 结论：标准 thin 无条件给（Chrome/Edge/Firefox 全走 thin，10px 明显细于 15px）；
          ::-webkit-scrollbar 6px 留作不支持 scrollbar-width 的旧内核兜底，两者共存不冲突。 */
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 17, 17, .18) transparent;
}
html[data-theme="dark"] .nav { scrollbar-color: rgba(255, 255, 255, .20) transparent; }
.nav::-webkit-scrollbar { width: 6px; height: 6px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb {
    background: rgba(17, 17, 17, .18);
    border-radius: 999px;
    transition: background .2s ease;
}
.nav::-webkit-scrollbar-thumb:hover { background: rgba(17, 17, 17, .34); }
.nav::-webkit-scrollbar-corner { background: transparent; }
html[data-theme="dark"] .nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .20); }
html[data-theme="dark"] .nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .36); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    /* 一级菜单（视频生成 / 图片生成 / 音乐生成 …）：15px / 500 字重 / --text-2 深灰。
       ⭐⭐ 2026-10-03 19:10 用户反馈「字体模糊看不清」→ 由极浅灰改为深灰。
       历史：#b0b0b6 → color-mix(text-3 70%,bg)（都太浅）→ 现 --text-2(#6b6b6b 浅色 / #a1a1a1 暗色)。
       悬停与当前选中仍变 --text 最深 + 600，两级靠深浅/缩进区分。 */
    color: var(--text-2);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: background-color .15s ease, color .15s ease;
}
.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}
.nav-item.is-active {
    background: var(--bg-hover);
    color: var(--text);
    font-weight: 600;
}
.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    border-radius: 2px;
    background: var(--text);
}
.nav-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 12px;
}

.sidebar-foot {
    flex: 0 0 auto;
    padding: 14px 18px 18px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 12px;
    letter-spacing: .02em;
}

/* ---------- 主区域 ---------- */
.main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px 0 16px;
    background: var(--bg); /* 回退：不支持 color-mix 时用纯色 */
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--text-2);
}
.burger:hover { border-color: var(--border-hover); color: var(--text); }

/* ----- 滚动公告 ----- */
.notice {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.notice-badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid var(--border-2);
    color: var(--text-3);
    font-size: 12px;
    letter-spacing: .04em;
}
.notice-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
}
.notice-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: notice-roll 38s linear infinite;
    will-change: transform;
}
.notice-viewport:hover .notice-track { animation-play-state: paused; }
.notice-item {
    color: var(--text-2);
    font-size: 13px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    gap: 26px;
}
.notice-item::after {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-3);
    opacity: .55;
}
@keyframes notice-roll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----- 顶栏右侧操作区 ----- */
.top-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 通用按钮：白底 + 浅灰描边 + 深灰内容 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: border-color .16s ease, color .16s ease, background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}
.btn:active { transform: translateY(1px); }
.btn.is-icon { padding: 0; width: 34px; }
.btn .num {
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-weight: 600;
}

/* 大按钮（Hero） */
.btn-lg {
    height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 14.5px;
    gap: 9px;
}
.btn-lg:hover {
    border-color: var(--text);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.btn-lg:active { transform: translateY(0); }

/* ----- 主题开关 SWITCH ----- */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 11px 0 9px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    transition: border-color .16s ease, color .16s ease;
}
.switch:hover { border-color: var(--border-hover); color: var(--text); }
.switch-track {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: var(--bg-active);
    border: 1px solid var(--border-2);
    flex: 0 0 auto;
    transition: background-color .22s ease, border-color .22s ease;
}
.switch-knob {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-2);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), background-color .22s ease;
}
html[data-theme="dark"] .switch-track {
    background: #ffffff;
    border-color: #ffffff;
}
html[data-theme="dark"] .switch-knob {
    transform: translateX(16px);
    background: #111111;
}
.switch-label { font-size: 13px; font-weight: 500; }

/* ----- 用户区 ----- */
.user-wrap { position: relative; }

/* ⭐ 2026-09-30 用户要求：弹窗开着时再打开用户下拉，下拉要显示在弹窗**上面**。
   .topbar（sticky+z-index:50）自身是堆叠上下文，内部的 .user-menu z 再高也被锁在 50 层；
   所以在下拉打开期间把整个 topbar 抬到弹窗(.pop z=200)之上。弹窗顶边=顶栏下沿+8px，
   两者不重叠，顶栏抬高无副作用；登录遮罩(z=200 全屏)只在未登录出现，那时没有下拉。 */
.topbar:has(.user-wrap.open) { z-index: 260; }

.user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px 0 12px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    transition: border-color .16s ease, color .16s ease;
}
.user-btn:hover { border-color: var(--border-hover); color: var(--text); }
.user-btn .uname {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-btn .role {
    font-size: 11px;
    color: var(--text-3);
    border-left: 1px solid var(--border-2);
    padding-left: 8px;
    margin-left: 1px;
    letter-spacing: .02em;
}
.user-btn .arrow {
    transition: transform .2s ease;
    color: var(--text-3);
}
.user-wrap.open .user-btn .arrow { transform: rotate(180deg); }

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-active);
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    flex: 0 0 auto;
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    /* ⭐ 2026-09-30 用户要求：弹窗（.pop z=200）开着时再打开用户下拉，下拉要显示在弹窗**上面**
       （否则下拉被弹窗挡住）。toast=300 仍最高。 */
    z-index: 260;
}
.user-wrap.open .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-menu a {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13.5px;
    transition: background-color .14s ease, color .14s ease;
}
.user-menu a:hover { background: var(--bg-hover); color: var(--text); }
.user-menu .sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* ⭐2026-10-08 手机 H5 顶栏精简：主题/语言/客服/价格收进用户下拉（.m-only 仅手机显示） */
.user-menu .m-only { display: none; }

/* ⭐2026-10-08 手机 H5 顶栏短积分：桌面显示完整数字（#topCredits），≤620px 换 X.X万（.num-short） */
.num-short { display: none; }

/* ============================================================
   内容区
   ============================================================ */
.content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 32px 40px;
    min-height: calc(100vh - var(--topbar-h));
}

.hero {
    width: 100%;
    max-width: 820px;
    text-align: center;
}

.hero-title {
    margin: 0;
    font-size: clamp(38px, 6.4vw, 64px);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.06;
}
.hero-title .thin { font-weight: 200; color: var(--text-3); }

.hero-sub {
    margin: 18px auto 0;
    max-width: 460px;
    color: var(--text-2);
    font-size: 15px;
    letter-spacing: .02em;
}

/* ----- Hero 按钮组 ----- */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 76px;
}

.footnote {
    margin-top: 64px;
    color: var(--text-3);
    font-size: 12px;
    letter-spacing: .06em;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
    .user-btn .role { display: none; }
    .btn .txt-sm { display: none; }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0, 0, 0, .12);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .main { margin-left: 0; }
    .burger { display: inline-flex; }
    .content { padding: 40px 20px 32px; }

    /* 顶栏换行：第一行 = 汉堡 + 操作按钮，第二行 = 全宽滚动公告 */
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 9px 12px;
        row-gap: 8px;
    }
    .burger      { order: 1; }
    .top-actions { order: 2; margin-left: auto; }
    .notice      { order: 3; flex: 1 1 100%; }

    .btn .txt-sm { display: none; }
    .hide-sm     { display: none; }

    /* ⭐2026-10-08 手机 H5 顶栏只留：汉堡 + 积分 + 充值 + 用户名；
       主题/语言/公告隐藏（主题/语言/客服/价格进用户下拉 .m-only），充值文字保留 */
    .notice { display: none; }
    #themeSwitch, #langSwitch { display: none; }
    .btn.keep-txt .txt-sm { display: inline; }
    .user-menu a.m-only { display: flex; align-items: center; }

    .hero-actions { margin-top: 56px; }
    .hero-actions .btn-lg { flex: 1 1 calc(50% - 6px); }
}

@media (max-width: 620px) {
    .top-actions { gap: 5px; }
    .user-btn .uname { max-width: 72px; }
    /* ⭐2026-10-08 用户反馈「登录后顶部的排版很乱」：长积分数字把顶栏挤爆 → 换短格式并收紧内边距 */
    #topCredits { display: none; }
    .num-short { display: inline; }
    .top-actions .btn, .top-actions .user-btn { padding-left: 8px; padding-right: 8px; }
    .top-actions .num { font-size: 12.5px; }

    .hero-actions { flex-direction: column; margin-top: 48px; }
    .hero-actions .btn-lg { width: 100%; flex: 0 0 auto; }

    .footnote { margin-top: 44px; }
}

/* 遮罩 */
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
    z-index: 55;
}
body.nav-open .scrim { opacity: 1; visibility: visible; }

/* ⭐ 2026-10-08 手机 H5 侧栏关闭按钮：仅移动端显示（桌面端侧栏常驻，不需要）。
   定位在侧栏右上角，点击调用 closeNav() 收起侧栏。 */
.side-x { display: none; }
@media (max-width: 900px) {
    .side-x {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; top: 11px; right: 11px;
        width: 36px; height: 36px; padding: 0;
        border: 0; border-radius: 9px; background: transparent;
        color: var(--ink); cursor: pointer; z-index: 6;
    }
    .side-x:hover { background: var(--bg-hover); }
    .side-x svg { width: 20px; height: 20px; }
}

/* ============================================================
   ⭐ 2026-10-01 用户要求：点侧栏「模型名（大类）」→ 动画弹出该模型的
   渠道（小类）列表；点右上角 × 或再点一次模型名关闭（带动画收起）。
   点渠道条目 → 跳到该渠道的工作台（&model=xx&chan=ID）。
   ============================================================ */
.chanpop {
    position: fixed;
    inset: 0;
    /* ⭐ 2026-10-01 用户要求：弹窗贴着侧栏大类名弹出，不再居中。
       卡片坐标由 app.js 按「被点模型名」的 rect 设置（贴其右侧、纵向对齐并防溢出）。
       ⭐ z-index 低于侧栏(.sidebar 60)：弹窗开着时侧栏模型名仍可再点一次关闭。 */
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s;
}
.chanpop.on { opacity: 1; visibility: visible; pointer-events: auto; }
.chanpop.out { opacity: 0; visibility: visible; pointer-events: none; }
.chanpop-mask {
    position: absolute; inset: 0;
    /* ⭐ 2026-10-05 用户反馈「弹窗排版很奇怪，UI 和背景改一下」：
       原来是一层均匀的 rgba(0,0,0,.32) 灰纱，整页被压暗、弹窗边界发灰、和黑白调性不搭。
       改法：① 遮罩加深并加 backdrop-filter 轻微模糊 —— 背景退到后面，弹窗主体自然浮起来；
            ② 卡片改纯白 + 更实的描边与阴影，边界干净，不再糊在灰底里。 */
    background: rgba(22, 22, 24, .46);
    -webkit-backdrop-filter: blur(2px) saturate(115%);
    backdrop-filter: blur(2px) saturate(115%);
}
.chanpop-card {
    position: fixed;                 /* ⭐ 贴着触发项：坐标由 JS 写入 top/left */
    left: calc(var(--sidebar-w, 300px) + 10px);   /* JS 未就绪时的兜底位 */
    top: 120px;
    /* ⭐ 2026-10-05 用户反馈「排版很奇怪」：卡太窄（410px）导致模型介绍（后台填的玩法说明，
       通常几百字）被挤成一小条、右边大片留白。放宽到 560px，并给介绍/列表各自留足呼吸空间。 */
    width: min(560px, 92vw);
    max-height: min(76vh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow), 0 30px 80px rgba(0, 0, 0, .28);
    transform: translateY(16px) scale(.94);
    opacity: 0;
    transition: transform .24s cubic-bezier(.34, 1.35, .64, 1), opacity .2s ease;
}
.chanpop.on .chanpop-card { transform: translateY(0) scale(1); opacity: 1; }
.chanpop.out .chanpop-card { transform: translateY(12px) scale(.95); opacity: 0; }
/* ⭐ 窄屏：侧栏是抽屉（点完已收起），弹窗回退为居中，忽略 JS 写入的坐标 */
@media (max-width: 900px) {
    .chanpop {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .chanpop-card { position: relative; left: auto; top: auto; }
}
.chanpop-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.chanpop-head-tx { flex: 1 1 auto; min-width: 0; }
.chanpop-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
/* ⭐ 2026-10-04 用户反馈（截图）：模型介绍「太浅看不清 + 被截断只显示半句」。
   改法：① 颜色由 --text-3(#a3a3a3) 提到 --text-2(#6b6b6b)，白底上清晰可读；
        ② 去掉 2 行截断，完整显示（后台填多长就显示多长，弹窗卡片高度自适应）；
        ③ 字号 12 → 12.5px、行高 1.6，窄屏下仍完整换行。
   ⭐ 2026-10-05 用户再反馈「弹窗排版很奇怪」：介绍已从头部 flex 拆成独立区块（.chanpop-descwrap），
   下面是配套样式：独占整行 + 浅底说明区 + 独立滚动，卡片加宽后不再限宽 360px。 */
.chanpop-descwrap {
    flex: 0 1 auto;
    /* 自己滚动：介绍很长时不把下面的渠道列表挤没；渠道列表另有自己的滚动区 */
    max-height: 34vh;
    overflow-y: auto;
    margin: 12px 16px 4px;
    padding: 13px 15px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.chanpop-descwrap[hidden] { display: none; }
.chanpop-desclab {
    display: inline-block;
    margin-bottom: 7px;
    padding: 2px 9px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-2);
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.chanpop-sub.chanpop-desc {
    color: var(--text-2);
    line-height: 1.75; font-size: 12.5px;
    white-space: normal; overflow: visible; text-align: left;
    /* ⭐ 不再限宽 360px —— 卡片已加宽到 560px，介绍独占整行 */
    max-width: none;
    word-break: break-word; overflow-wrap: anywhere;
}
/* 暗色主题下介绍再提亮一档，保证可读 */
html[data-theme="dark"] .chanpop-sub.chanpop-desc,
body.dark .chanpop-sub.chanpop-desc { color: var(--text-2); }
.chanpop-x {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-2);
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: .15s;
}
.chanpop-x:hover { color: var(--text); border-color: var(--border-hover); background: var(--bg-hover); }
.chanpop-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chanpop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color .14s ease, border-color .14s ease;
}
.chanpop-item:hover { background: var(--bg-hover); border-color: var(--border-hover); }
/* ⭐ 2026-10-05：卡片加宽了，渠道名不必再截断成一行省略号 —— 完整显示更清楚 */
.chanpop-item .ci-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ⭐2026-10-08 用户要求：渠道条目右侧显示该渠道积分（按秒渠道 = X积分/秒，按次 = X积分/次） */
.chanpop-item .ci-price { flex: 0 0 auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
/* ⭐2026-10-08 用户反馈「弹窗里大类名左边被挡住看不到全名」：标题改可换行，长名完整显示 */
.chanpop-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    overflow: visible;
    white-space: normal;
    word-break: break-word;
}
.chanpop-item .ci-dft {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--text-2);
    border: 1px solid var(--border-2);
    border-radius: 999px;
    padding: 1px 8px;
}
/* ⭐ 2026-10-15 用户要求：渠道为「内测（beta=1）」时打徽标，暖色以示区分（与全站琥珀色口径一致） */
.chanpop-item .ci-test {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.6;
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, .45);
    background: rgba(217, 119, 6, .10);
    border-radius: 999px;
    padding: 1px 8px;
}
.chanpop-item .ci-go { flex: 0 0 auto; color: var(--text-3); font-size: 14px; }
.chanpop-empty { padding: 30px 10px; text-align: center; color: var(--text-3); font-size: 13px; }

@media (min-width: 901px) {
    .scrim { display: none; }
}

/* ============================================================
   侧栏：分组菜单 + 模型子项
   ============================================================ */
.nav-gap { height: 10px; }

.nav-group { display: flex; flex-direction: column; }

.nav-parent {
    cursor: pointer;
    user-select: none;
    font-size: 14px;   /* ⭐ 2026-10-01 层级：菜单名15 > 大类14 > 小类13 */
}
.nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-sign {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    color: var(--text-3);
    transition: color .16s ease;
}
.nav-parent:hover .nav-sign { color: var(--text); }
.nav-sign--lock { opacity: .55; }

/* ⭐⭐ 2026-10-05 修「点了 A 大类，B 大类看着也是选中的」：
   .nav-parent（分组标题，如「视频生成」）与 .nav-subitem（具体模型行）**用的是同一套 .is-active 样式**
   （同为 var(--bg-hover) 背景 + 左侧竖条），肉眼几乎分不出差别 →
   分组里有 5 个模型行时，点任意一个，**整组看起来全被选中**（用户截图实测）。
   这里：当分组内**确实有模型行被选中**时（:has 命中），父级只保留左侧竖条作分组指示、
   **去掉背景与加粗**，把「选中」的视觉重量全部让给当前那一个模型行。
   浏览器不支持 :has 的老内核自动忽略本段，维持旧观感，不影响功能。 */
.nav-group:has(.nav-subitem.is-active) > .nav-parent.is-active {
    background: transparent;
    font-weight: 400;
}
.nav-group:has(.nav-subitem.is-active) > .nav-parent.is-active:hover {
    background: var(--bg-hover);
}

.nav-sub {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 4px 0;
}
.nav-group.is-open .nav-sub { display: flex; }

.nav-subitem {
    cursor: pointer;
    display: flex;
    align-items: center;
    /* ⭐ 2026-10-04：名称过长时允许换行（不再被截断）。flex-wrap 让文字折行后，
       徽标（sub-badge）会落到第二行，而不是被挤到容器外看不见。 */
    flex-wrap: wrap;
    gap: 3px 8px;
    /* ⭐ 2026-10-04：原来固定 height:32px 会把换行后的第二行裁掉 → 改 min-height 让它随文字撑高 */
    min-height: 32px;
    padding: 5px 10px 5px 0;
    margin-left: 12px;   /* ⭐ 2026-10-01 用户要求小类左移与图标对齐（原30px） */
    border-radius: 7px;
    color: var(--text-2);
    font-size: 13px;
    position: relative;
    transition: background-color .14s ease, color .14s ease;
}
.nav-subitem::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 50%;
    width: 1px;
    background: var(--border-2);
}
.nav-subitem::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    width: 6px;
    height: 1px;
    background: var(--border-2);
}
.nav-subitem:hover { background: var(--bg-hover); color: var(--text); }
.nav-subitem.is-active {
    background: var(--bg-hover);
    color: var(--text);
    font-weight: 500;
}
.nav-subitem.is-active::before,
.nav-subitem.is-active::after { background: var(--text-3); }

.sub-plus {
    flex: 0 0 auto;
    width: 12px;
    margin-left: 0;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1;
}
.nav-subitem.active .sub-plus { color: var(--text); }
/* ⭐⭐ 2026-10-04 用户要求：左侧菜单「视频生成」等大类下的小类，**名称要一行完整显示**。
   原来这里 `text-overflow: ellipsis` 会把长名称截成「SeeDance2.0官方接口满参 － 官方…」。
   改法：去掉截断与 nowrap，文字过长时**自动换行**（一行放不下就折到第二行，不省略、不裁切），
   并给 .nav-subitem 去掉固定 height 32px、改 min-height，让它能随两行文字自然撑高。
   flex 子项换行的坑：flex 容器默认 `min-width:auto`，子项会被内容撑破 → 补 min-width:0。 */
/* ⭐⭐ 2026-10-22 用户要求：大类名一行放不下就**折成两行**（不再靠溢出/横向滚动）。
   原 white-space:nowrap 会让英文长名溢出容器被侧栏裁掉；改 normal + break-word 自然折行，
   中文短名不受影响（仍一行）。 */
.sub-name { flex: 1 1 auto; min-width: 0; overflow: visible; white-space: normal; overflow-wrap: break-word; word-break: normal; line-height: 1.45; }
/* ⭐ 2026-10-08 英文版侧栏模型名：中文分段（.mn-zh 含 name_html 配色）与英文（.mn-en 纯文本 name_en）
   双 span，由 i18n.js 设在 <html> 的 lang 属性切换显隐；name_en 缺失时不加 .has-en，中文照常显示。 */
.sub-name .mn-en { display: none; }
html[lang="en"] .sub-name.has-en .mn-zh { display: none; }
html[lang="en"] .sub-name.has-en .mn-en { display: inline; }

.sub-badge {
    flex: 0 0 auto;
    font-size: 10px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    border: 1px solid var(--border-2);
    color: var(--text-3);
    letter-spacing: .02em;
}

/* 侧栏底部用户 */
.sf-user { display: flex; align-items: center; gap: 9px; }
.sf-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--text); color: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex: 0 0 auto;
}
.sf-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sf-name { color: var(--text); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-sub  { color: var(--text-3); font-size: 11px; }
.sf-guest { color: var(--text-3); }
.sf-guest a { color: var(--text-2); text-decoration: underline; }

/* ============================================================
   内容区：文档模式
   ============================================================ */
.content.is-doc {
    display: block;
    align-items: stretch;
    justify-content: flex-start;
    padding: 30px 32px 60px;
}

.doc { width: 100%; max-width: 1060px; margin: 0 auto; }

.doc-head { margin-bottom: 22px; }
.doc-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc-head-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.doc-head-btns .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.doc-head-btns .btn-cta { box-shadow: none; }
.doc-title { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.doc-desc  { margin: 8px 0 0; max-width: 660px; color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.doc-p     { margin: 10px 0; color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.doc-mut   { color: var(--text-3); }
.doc-h2    { margin: 0 0 12px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

.doc-grid { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 30px; align-items: start; }
.doc-toc {
    position: sticky;
    top: calc(var(--topbar-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.doc-toc a {
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text-2);
    font-size: 13px;
    transition: background-color .14s ease, color .14s ease;
}
.doc-toc a:hover { background: var(--bg-hover); color: var(--text); }

.doc-body { min-width: 0; }
.doc-sec { margin-bottom: 34px; scroll-margin-top: calc(var(--topbar-h) + 16px); }

/* 卡片 */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13.5px; font-weight: 600; }
.card-body  { padding: 16px 18px; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child  { margin-bottom: 0; }

/* ============================================================
   表格 / 代码块
   ============================================================ */
.tbl {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 13px;
}
.tbl th, .tbl td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.65;
}
.tbl th {
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    background: var(--bg-soft);
}
.tbl td { color: var(--text-2); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: none; }
.tbl code { font-size: 12.5px; }
.ta-r { text-align: right !important; }
.tbl-cap { margin: 14px 0 7px; font-size: 12px; color: var(--text-3); letter-spacing: .03em; }

code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--text);
    background: var(--bg-hover);
    padding: 1px 5px;
    border-radius: 5px;
}

.code {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow-x: auto;
    line-height: 1.7;
}
.code code {
    background: none;
    padding: 0;
    color: var(--text-2);
    font-size: 12.5px;
    white-space: pre;
}
.code-hl { color: var(--text); font-weight: 600; }

.api-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 12px;
}
.api-line code { background: none; padding: 0; font-size: 14px; }
.method {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--text);
    color: var(--bg);
}
.method--get { background: var(--bg-active); color: var(--text); border: 1px solid var(--border-2); }

.lnk { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.lnk:hover { color: var(--text-2); }

/* 「注册 · 登录」之间的小圆点分隔 */
.hint-dot { display: inline-block; margin: 0 7px; color: var(--text-3); }

.note-strip {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    background: var(--bg-soft);
    color: var(--text-3);
    font-size: 12.5px;
    line-height: 1.7;
}

.empty { padding: 26px 0; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============================================================
   小元素：chip / 按钮变体 / 输入框
   ============================================================ */
.chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1;
    border: 1px solid var(--border-2);
    color: var(--text-3);
    background: var(--bg);
}
.chip--on    { color: var(--text); border-color: var(--border-hover); }
.chip--off   { color: var(--text-3); }
.chip--plain { background: var(--bg-soft); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-danger:hover { border-color: #d8a9a9; color: #b3413a; box-shadow: none; }
.btn-block { width: 100%; }
.btn-cta { height: 42px; font-size: 14px; font-weight: 600; }
.btn-cta:hover { border-color: var(--text); color: var(--text); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: none;
    color: var(--text-3);
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border); }

.inp {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--border-2);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.inp::placeholder { color: var(--text-3); }
.inp:focus { border-color: var(--text-3); box-shadow: 0 0 0 3px var(--bg-active); }

/* ============================================================
   弹窗
   ============================================================ */
[hidden] { display: none !important; }

.pop {
    position: fixed;
    z-index: 200;
    top: 0;
    right: 0;
}
.pop-card {
    width: 344px;
    max-width: calc(100vw - 20px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 54px rgba(0, 0, 0, .15), 0 2px 8px rgba(0, 0, 0, .05);
    animation: pop-in .17s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}
.pop--wide .pop-card { width: 430px; }
@keyframes pop-in {
    from { opacity: 0; transform: translateY(-8px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px 13px 16px;
    border-bottom: 1px solid var(--border);
}
.pop-title { font-size: 13.5px; font-weight: 600; }
.pop-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: none;
    color: var(--text-3);
    transition: background-color .14s ease, color .14s ease;
}
.pop-x:hover { background: var(--bg-hover); color: var(--text); }

.pop-body { padding: 15px 16px 17px; }
.pop-body > :first-child { margin-top: 0; }

/* ⭐ 2026-10-04 用户要求「积分弹窗一个页面显示全部」：弹层贴在顶栏下方、内容一多就被
   视口底边截断且够不着（fixed 定位页面滚不动）。现在把卡片限高到视口内、正文内部滚动 ——
   最近任务 + 最近流水全部可达，不再有"下半截看不到"的内容。只作用于积分弹窗，其它弹层不变。 */
#pop-credits .pop-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 88px);   /* 顶栏(~58px) + 弹层上边距 8px + 底部留 22px */
}
#pop-credits .pop-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* 登录 / 注册：居中模态 */
.pop--modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .30);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.pop--modal .pop-card {
    width: 392px;
    max-width: 100%;
    animation: modal-in .2s cubic-bezier(.2, .8, .2, 1);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 表单 ---------- */
.fld {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.fld-ico {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    color: var(--text-3);
    pointer-events: none;
}
.fld input {
    width: 100%;
    height: 44px;
    padding: 0 13px 0 38px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    background: var(--bg);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.fld input::placeholder { color: var(--text-3); }
.fld input:focus { border-color: var(--text-3); box-shadow: 0 0 0 3px var(--bg-active); }

.fld--cap input { padding-right: 116px; }
.cap-img {
    position: absolute;
    right: 4px;
    width: 106px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-2);
    background: var(--bg);
    cursor: pointer;
    object-fit: cover;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 10px;
    font-size: 12.5px;
    color: var(--text-2);
}
.auth-row--center { justify-content: center; gap: 6px; margin-top: 12px; margin-bottom: 0; }
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.chk input { width: 14px; height: 14px; accent-color: #111; margin: 0; cursor: pointer; }
html[data-theme="dark"] .chk input { accent-color: #f2f2f2; }

.form-msg {
    min-height: 18px;
    margin: 2px 0 9px;
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.5;
}
.form-msg.is-err { color: #b3413a; }
.form-msg.is-ok  { color: #2e7d5b; }

.auth-foot {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
}
.auth-foot b { color: var(--text-2); }

/* ---------- 充值 / 积分 ---------- */
.rc-balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 13px 15px;
    margin-bottom: 14px;
    border-radius: 11px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}
.rc-bal-label { color: var(--text-3); font-size: 12.5px; }
.rc-bal-num { color: var(--text); font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.steps {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.steps li { display: flex; align-items: center; gap: 9px; }
.steps-i {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    color: var(--text-3);
    font-size: 10.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps-t { color: var(--text-2); font-size: 12.5px; }

.sub-title {
    margin: 0 0 9px;
    font-size: 12px;
    color: var(--text-3);
    letter-spacing: .03em;
}

.face-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 54px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    background: var(--bg);
    color: var(--text-2);
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.face:hover { border-color: var(--border-hover); color: var(--text); }
.face.is-on { border-color: var(--text); color: var(--text); background: var(--bg-hover); }
.face-num { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.face-unit { font-size: 10.5px; color: var(--text-3); }

.rc-row { display: flex; gap: 8px; }
.rc-row .inp { flex: 1 1 auto; }
.rc-row .btn { height: 38px; flex: 0 0 auto; }

.kv-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.kv-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    transition: background-color .14s ease;
}
.kv-row:hover { background: var(--bg-hover); }
.kv-k { flex: 0 0 74px; color: var(--text-3); font-size: 12.5px; }
.kv-v { flex: 1 1 auto; color: var(--text); font-size: 13px; word-break: break-all; }
.kv-copy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border: none; border-radius: 6px; background: none;
    color: var(--text-3);
}
.kv-copy:hover { background: var(--bg-active); color: var(--text); }

/* ---------------- 单价页：渠道接口价格表 ---------------- */
.ch-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.ch-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}
.ch-stat-k { font-size: 12px; color: var(--text-3); }
.ch-stat-v {
    color: var(--text);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.ch-stat-v i {
    margin-left: 5px;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 400;
    color: var(--text-3);
}

.ch-wrap { overflow-x: auto; }
.ch-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ch-tbl th {
    padding: 0 10px 9px;
    border-bottom: 1px solid var(--border);
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}
.ch-tbl td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.ch-tbl tbody tr:last-child td { border-bottom: none; }
.ch-tbl tbody tr:hover { background: var(--bg-hover); }
.ch-tbl .ta-r { text-align: right; }

.ch-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-weight: 600;
}
.ch-intro {
    display: block;
    margin-top: 5px;
    max-width: 380px;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.55;
}
.ch-specs { display: flex; flex-wrap: wrap; gap: 5px; max-width: 330px; }
.ch-spec {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid var(--border-2);
    border-radius: 5px;
    color: var(--text-3);
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
}
.ch-mut { color: var(--text-3); }
.ch-price {
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.ch-unit { display: block; margin-top: 3px; color: var(--text-3); font-size: 11px; }
.sub-badge--mut { border-style: dashed; }

.rule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rule-i {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 9px;
    background: var(--bg-soft);
}
.rule-t { color: var(--text); font-size: 12.5px; font-weight: 600; }
.rule-d { color: var(--text-3); font-size: 12px; line-height: 1.6; }

@media (max-width: 760px) {
    .ch-stats { grid-template-columns: 1fr; }
    .rule-grid { grid-template-columns: 1fr; }
    .ch-intro { max-width: none; }
}

.mini-row, .flow {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 2px;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border);
}
.mini-row:last-child, .flow:last-child { border-bottom: none; }
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: 0 0 auto; }
.mini-dot--success { background: #2e7d5b; }
.mini-dot--failed  { background: #b3413a; }
.mini-dot--running { background: #b58a2e; }
.mini-t { flex: 0 0 34px; color: var(--text); }
.mini-s { flex: 1 1 auto; color: var(--text-3); }
.mini-w { flex: 0 0 auto; color: var(--text-3); font-variant-numeric: tabular-nums; }

.flow-t { flex: 0 0 42px; color: var(--text); }
.flow-r { flex: 1 1 auto; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-a { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.flow-a.plus  { color: #2e7d5b; }
.flow-a.minus { color: var(--text-2); }
.flow-w { flex: 0 0 auto; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ============================================================
   API 密钥
   ============================================================ */
.key-list { display: flex; flex-direction: column; }
.key-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}
.key-row:first-child { padding-top: 4px; }
.key-row:last-child { border-bottom: none; padding-bottom: 0; }
.key-main { min-width: 0; flex: 1 1 auto; }
.key-line1 { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.key-name { font-size: 13.5px; font-weight: 600; }
.key-line2 { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; }
.key-code {
    font-size: 12.5px;
    color: var(--text-2);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 4px 9px;
    border-radius: 7px;
    letter-spacing: .02em;
    word-break: break-all;
}
.key-meta { font-size: 11.5px; color: var(--text-3); }
.key-ops { display: flex; gap: 6px; flex: 0 0 auto; }

/* ============================================================
   轻提示
   ============================================================ */
.toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    font-size: 13px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    animation: toast-in .2s ease;
    max-width: min(420px, calc(100vw - 32px));
    text-align: center;
    line-height: 1.5;
}
.toast--err { background: #b3413a; color: #fff; }
.toast--ok  { background: #2e7d5b; color: #fff; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* 首页补充 */
.hero-hint { margin: 22px 0 0; color: var(--text-3); font-size: 13px; }

/* ============================================================
   响应式补充
   ============================================================ */
@media (max-width: 900px) {
    .content.is-doc { padding: 22px 18px 48px; }
    .doc-grid { grid-template-columns: 1fr; gap: 18px; }
    .doc-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .doc-toc a { background: var(--bg-soft); border: 1px solid var(--border); padding: 5px 10px; font-size: 12px; }
    .doc-title { font-size: 22px; }
    .key-row { flex-direction: column; }
    .key-ops { width: 100%; }
    .pop .pop-card { width: min(344px, calc(100vw - 20px)); }
    .pop--wide .pop-card { width: min(430px, calc(100vw - 20px)); }
}

@media (max-width: 620px) {
    .face-grid { grid-template-columns: repeat(3, 1fr); }
    .content.is-doc { padding: 18px 14px 44px; }
}

/* 降低动效偏好：关掉公告滚动与流星 */
@media (prefers-reduced-motion: reduce) {
    .notice-track { animation: none; }
    .meteor       { display: none; }
    .pop-card, .toast { animation: none; }
}

/* ============================================================
   工作台 studio.php —— 仅保留页面外壳布局
   ------------------------------------------------------------
   对话框 / 记录卡 / hero 等全部工作台视觉在 assets/css/workbench.css
   （该文件只在 studio.php 加载，作用域限定在 .wb 下）
   ============================================================ */
:root {
    --ink:      #111111;   /* 强调色（浅色主题=黑） */
    --ink-fg:   #ffffff;
    --ink-soft: rgba(17, 17, 17, .06);
}
html[data-theme="dark"] {
    --ink:      #f5f5f5;
    --ink-fg:   #0c0c0c;
    --ink-soft: rgba(255, 255, 255, .08);
}

/* 工作台占满内容区（不再居中留白），内部由 .wb 自己排版 */
.content:has(> .wb) {
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    height: calc(100vh - var(--topbar-h));
    min-height: 420px;
    overflow: hidden;
}
@media (max-width: 900px) {
    .content:has(> .wb) {
        height: auto;
        min-height: calc(100vh - var(--topbar-h));
        overflow: visible;
    }
}
/* ============================================================
   管理后台 admin/
   ============================================================ */
body.adm {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.adm-side {
    flex: 0 0 218px;
    width: 218px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    height: 100vh;
}
.adm-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    height: var(--topbar-h);
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}
.adm-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--ink-fg);
}
.adm-brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.adm-brand-name span { color: var(--text-3); font-weight: 500; font-size: 12px; margin-left: 5px; }

.adm-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
}
.adm-navitem {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 36px;
    padding: 0 11px;
    border-radius: 9px;
    color: var(--text-2);
    font-size: 13.5px;
    transition: background-color .14s ease, color .14s ease;
}
.adm-navitem:hover { background: var(--bg-hover); color: var(--text); }
.adm-navitem.is-on { background: var(--bg-active); color: var(--text); font-weight: 620; }
.adm-nav-gap { height: 8px; }
.adm-nav-cap { padding: 9px 11px 4px; color: var(--text-3); font-size: 11px; letter-spacing: .06em; }

.adm-side-foot {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.adm-back { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.adm-back:hover { color: var(--text); }

.adm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.adm-top {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
}
.adm-burger {
    display: none;
    width: 34px; height: 34px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-2);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text-2);
}
.adm-title { font-size: 15px; font-weight: 650; }
.adm-top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.adm-who { color: var(--text-3); font-size: 12.5px; }

.adm-body {
    padding: 20px 22px 60px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1280px;
    width: 100%;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(162px, 1fr)); gap: 12px; }
.stat-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-soft); }
.stat-card.is-ink { background: var(--ink); border-color: var(--ink); }
.stat-k { color: var(--text-3); font-size: 12px; }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin-top: 4px; line-height: 1.2; }
.stat-s { color: var(--text-3); font-size: 11.5px; margin-top: 3px; }
.stat-card.is-ink .stat-k,
.stat-card.is-ink .stat-s { color: var(--ink-fg); opacity: .82; }
.stat-card.is-ink .stat-v { color: var(--ink-fg); }

.adm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.adm-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.adm-f-t { font-size: 12px; color: var(--text-3); }
.adm-f.wide { grid-column: 1 / -1; }
.adm-inp {
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    border: 1px solid var(--border-2);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 100%;
}
.adm-inp:focus { border-color: var(--text-3); }
textarea.adm-inp { height: auto; padding: 9px 11px; line-height: 1.6; resize: vertical; }
select.adm-inp { appearance: none; }
.adm-inp--sm { height: 30px; font-size: 12.5px; }
.adm-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); height: 34px; }

.adm-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-toolbar .adm-inp { max-width: 240px; }
.adm-toolbar .spacer { flex: 1 1 auto; }

.adm-pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding-top: 12px; }
.adm-pager a, .adm-pager span {
    height: 28px;
    min-width: 28px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 12.5px;
}
.adm-pager a:hover { border-color: var(--border-hover); color: var(--text); }
.adm-pager .is-on { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.adm-pager .is-off { opacity: .4; }

.adm-flash { padding: 10px 13px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--bg-soft); font-size: 13px; }
.adm-flash.err { border-color: rgba(190, 70, 60, .45); }
.adm-flash.ok  { border-color: rgba(45, 140, 100, .45); }

.adm-note { color: var(--text-3); font-size: 12px; line-height: 1.6; }
.adm-403 { max-width: 430px; margin: 12vh auto; text-align: center; padding: 0 20px; }
.adm-403 h1 { font-size: 18px; margin: 14px 0 6px; }
.adm-403 p { color: var(--text-3); font-size: 13px; margin: 0 0 16px; }

.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .adm-cols { grid-template-columns: 1fr; } }

.adm-tagline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.adm-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--bg-active);
    color: var(--text-2);
}

@media (max-width: 900px) {
    .adm-side {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 70;
        transform: translateX(-104%);
        transition: transform .24s ease;
        box-shadow: none;
        width: 250px;
        flex-basis: 250px;
        height: 100dvh;
    }
    body.adm.nav-open .adm-side { transform: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); }
    .adm-mask { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 65; display: none; }
    body.adm.nav-open .adm-mask { display: block; }
    .adm-burger { display: inline-flex; }
    .adm-body { padding: 16px 14px 60px; }
}

/* ============================================================
   人像修改(AI) & 价格页 v2（2026-09-30 Wave 9f）
   ============================================================ */
/* 人像修改(AI) hero 价格牌 */
.face-hero-price {
    display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
    padding: 12px 18px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--bg-soft); white-space: nowrap;
}
.face-hero-price b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.face-hero-price i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
@media (max-width: 720px) { .face-hero-price { align-items: flex-start; } }

/* 价格页 v2：模型分组 + 渠道行 + 规格档标签 */
.pl-model { padding: 14px 0 6px; border-bottom: 1px solid var(--border); }
.pl-model:last-child { border-bottom: none; padding-bottom: 2px; }
.pl-model-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pl-model-name { font-size: 13.5px; font-weight: 650; color: var(--text); }
.pl-chan { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 5px 0; }
.pl-chan-name { flex: 0 0 168px; font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.pl-chan-name .pl-def { font-style: normal; font-weight: 600; font-size: 10.5px; color: var(--text); border: 1px solid var(--border-2); border-radius: 999px; padding: 0 7px; line-height: 1.7; }
.pl-tiers { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pl-tier {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-soft); padding: 3px 9px;
    font-size: 11.5px; color: var(--text-3);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pl-tier b { font-weight: 650; color: var(--text); font-size: 12.5px; }
@media (max-width: 720px) {
    .pl-chan-name { flex: 1 1 100%; }
}
.pl-base-note { font-size: 11.5px; color: var(--text-3); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; line-height: 1.7; }
.pl-base-note b { color: var(--text-2); }

/* ⭐2026-10-08 暗色模式原生 select 的 option 弹层白底白字修复：
   Windows Chrome 的下拉弹层用 UA 白底 + 继承 select 文字色（暗色下是白字）→ 白字白底看不见。
   显式给 option/optgroup 配主题色：暗色=深底浅字，浅色=白底黑字（变量回落保底）。 */
select option, select optgroup {
    background: var(--bg-soft, #ffffff);
    color: var(--text, #111111);
}

/* ============================================================
   ⭐ 2026-10-22 侧栏优化：分组箭头（旋转动画）+ 大类前发光球 + 长名两行悬挂对齐
   用户要求：去掉 +/− 与树线；大类前放一个好看的（带动画）元素；名称一行放不下就两行，
   第二行与首行文字左对齐。
   ============================================================ */
/* 分组：+ / − → 旋转箭头 */
.nav-chev{ width:16px; height:16px; flex:none; margin-left:auto; position:relative;
  opacity:.55; transition:transform .28s cubic-bezier(.2,.7,.3,1), opacity .2s; }
.nav-chev::before{ content:""; position:absolute; left:4.5px; top:5.5px; width:6.5px; height:6.5px;
  border-right:1.7px solid currentColor; border-bottom:1.7px solid currentColor;
  transform:rotate(45deg); border-radius:1px; }
.nav-group.is-open > .nav-parent .nav-chev{ transform:rotate(180deg); opacity:.85; }
.nav-parent:hover .nav-chev{ opacity:1; }

/* 大类：去掉 + 与树线，改成渐变发光球（呼吸动画，hover 放大） */
.nav-subitem{ align-items:flex-start; flex-wrap:nowrap; gap:9px; padding:6px 10px 6px 0; }
.nav-subitem::before, .nav-subitem::after{ content:none !important; }
.sub-plus{ display:none !important; }
.sub-orb{ width:9px; height:9px; border-radius:50%; flex:none; margin-top:6px; position:relative;
  background:linear-gradient(135deg,#7c5cff,#4dabf7 60%,#22d3ee);
  box-shadow:0 0 0 3px rgba(124,92,255,.14);
  animation:orbBreath 2.6s ease-in-out infinite; }
.sub-orb::after{ content:""; position:absolute; inset:-3px; border-radius:50%;
  border:1px solid rgba(124,92,255,.35); animation:orbRing 2.6s ease-out infinite; }
.sub-orb.k-image{ background:linear-gradient(135deg,#22d3ee,#34d399 70%); box-shadow:0 0 0 3px rgba(34,211,238,.16); }
.sub-orb.k-image::after{ border-color:rgba(34,211,238,.38); }
.sub-orb.k-audio{ background:linear-gradient(135deg,#f59e0b,#f97316 70%); box-shadow:0 0 0 3px rgba(245,158,11,.16); }
.sub-orb.k-audio::after{ border-color:rgba(245,158,11,.38); }
.sub-orb.k-chat, .sub-orb.k-language{ background:linear-gradient(135deg,#10b981,#84cc16 70%); box-shadow:0 0 0 3px rgba(16,185,129,.16); }
.sub-orb.k-chat::after, .sub-orb.k-language::after{ border-color:rgba(16,185,129,.38); }
.nav-subitem:hover .sub-orb{ transform:scale(1.22); }
.nav-subitem.is-active .sub-orb{ box-shadow:0 0 0 4px rgba(124,92,255,.22), 0 0 12px rgba(124,92,255,.45); }
@keyframes orbBreath{ 0%,100%{ filter:brightness(1); transform:scale(1); } 50%{ filter:brightness(1.25); transform:scale(1.12); } }
@keyframes orbRing{ 0%{ transform:scale(.85); opacity:.55; } 70%{ transform:scale(1.5); opacity:0; } 100%{ opacity:0; } }
@media (prefers-reduced-motion:reduce){
  .sub-orb, .sub-orb::after, .nav-chev{ animation:none !important; transition:none !important; }
}
/* 大类名称：一行放不下折两行，第二行与首行文字左对齐（悬挂缩进） */
.sub-name{ flex:1 1 auto; min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.nav-subitem .sub-badge{ flex:none; margin-left:auto; align-self:flex-start; margin-top:2px; }
