/* ============================================================
   连接设置 · 三大块（文字 / 语音 / 图像）
   宝宝 2026-11 定稿：三块直接铺开、左右两张卡就地展开、每块各自「启用 + 保存」
   本文件只放 .apic-* 前缀；原来的 .api-quad* 已随旧四块一起退役
   ============================================================ */

/* ---- 三大块外壳 ---- */
.apic-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.apic-block {
    background: var(--surface, #fff);
    border: 1px solid rgba(201, 168, 168, 0.28);
    border-radius: var(--radius-lg, 18px);
    padding: 14px 13px 13px;
    box-shadow: 0 2px 10px rgba(120, 90, 90, 0.04);
    min-width: 0;
}

.apic-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.apic-title {
    font-family: var(--font-serif, "Songti SC", serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary, #3a3232);
}

.apic-en {
    font-family: "Playfair Display", var(--font-serif, serif);
    font-style: italic;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: var(--text-muted, #a99);
    opacity: 0.85;
}

.apic-now {
    margin-left: auto;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary, #7a6f6f);
    max-width: 60%;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apic-now b {
    font-weight: 600;
    color: var(--rose, #C9A8A8);
}

.apic-bline {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text-muted, #a99);
}

/* ---- 左右两张卡 ---- */
.apic-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 10px;
    min-width: 0;
}

.apic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 11px 10px 10px;
    border: 1px solid rgba(201, 168, 168, 0.3);
    border-radius: var(--radius-md, 14px);
    background: rgba(255, 252, 251, 0.7);
    cursor: pointer;
    transition: border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-card:active {
    transform: scale(0.985);
}

.apic-card.on {
    border-color: var(--rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.1);
}

.apic-card.open {
    border-color: var(--gold, #C4A86A);
    box-shadow: 0 3px 14px rgba(196, 168, 106, 0.16);
}

.apic-card-top {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.apic-card-t {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #3a3232);
    white-space: nowrap;
}

.apic-card-on {
    display: none;
    margin-left: auto;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--rose, #C9A8A8);
    color: #fff;
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    flex: none;
}

.apic-card.on .apic-card-on {
    display: inline-block;
}

.apic-card-en {
    margin-top: 2px;
    font-family: "Playfair Display", var(--font-serif, serif);
    font-style: italic;
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--text-muted, #a99);
    opacity: 0.8;
}

.apic-card-line {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary, #7a6f6f);
    flex: 1 1 auto;
}

.apic-card-line b {
    font-weight: 600;
    color: var(--rose, #C9A8A8);
}

.apic-card-acts {
    display: flex;
    gap: 6px;
    margin-top: 9px;
}

.apic-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 27px;
    padding: 0 4px;
    border: 1px solid rgba(201, 168, 168, 0.55);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary, #7a6f6f);
    font-family: inherit;
    font-size: 11px;
    line-height: 25px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-btn:active {
    transform: scale(0.96);
}

/* 卡片里那颗主按钮：这一侧正在用 → 实心「正在用」；否则「启用」 */
.apic-btn-on {
    border-color: var(--rose, #C9A8A8);
    color: var(--rose, #C9A8A8);
}

.apic-card.on .apic-btn-on {
    background: var(--rose, #C9A8A8);
    border-color: var(--rose, #C9A8A8);
    color: #fff;
}

.apic-card.open .apic-btn-on {
    background: var(--rose, #C9A8A8);
    border-color: var(--rose, #C9A8A8);
    color: #fff;
}

/* ---- 就地展开的正文 ---- */
.apic-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.34s cubic-bezier(0.22, 0.68, 0.24, 1), opacity 0.26s ease, margin-top 0.3s ease;
    margin-top: 0;
    min-width: 0;
}

.apic-body.show {
    max-height: 2600px;
    opacity: 1;
    margin-top: 11px;
}

.apic-load,
.apic-empty {
    padding: 12px 10px;
    border-radius: var(--radius-md, 14px);
    background: rgba(201, 168, 168, 0.07);
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text-muted, #a99);
    text-align: center;
}

.apic-warn {
    margin-top: 8px;
    padding: 7px 9px;
    border-left: 2px solid var(--gold, #C4A86A);
    border-radius: 6px;
    background: rgba(196, 168, 106, 0.08);
    font-size: 11px;
    line-height: 1.65;
    color: var(--text-secondary, #7a6f6f);
}

/* 展开正文里那颗大按钮（只在「配置教程 / 一键配置」那张小抄里用：补全预设） */
.apic-big {
    display: block;
    width: 100%;
    margin-top: 11px;
    height: 38px;
    border: 1px solid var(--rose, #C9A8A8);
    border-radius: 999px;
    background: var(--rose, #C9A8A8);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-big:active {
    transform: scale(0.975);
}

.apic-big.on {
    background: transparent;
    color: var(--rose, #C9A8A8);
    box-shadow: inset 0 0 0 1px rgba(201, 168, 168, 0.4);
}

/* ---- 内置 · 家族卡 ---- */
/* 2026-11 甲方：「我想让 ta 是……」那一行太干、没有邀请感 → 改成一句衬线小引子，右边是那颗「?」。
   2026-11 宝宝实拍：引子下面那句解释（「挑一个合你心意的性情，剩下的交给它。」）啰嗦，连同
   `.apic-q-sub` 这条样式一起删掉。 */
.apic-qrow {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 12px;
}

.apic-q-l {
    flex: 1 1 auto;
    min-width: 0;
}

.apic-q-t {
    font-family: var(--font-serif, "Songti SC", serif);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.045em;
    color: var(--text-primary, #3a3232);
}

.apic-qrow .apic-q-btn {
    margin-top: 1px;
}

.apic-q-btn {
    width: 20px;
    height: 20px;
    flex: none;
    padding: 0;
    border: 1px solid rgba(201, 168, 168, 0.55);
    border-radius: 50%;
    background: transparent;
    color: var(--rose, #C9A8A8);
    font-family: var(--font-serif, serif);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}

.apic-fams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apic-fam {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid rgba(201, 168, 168, 0.28);
    border-radius: var(--radius-md, 14px);
    background: rgba(255, 252, 251, 0.6);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-fam:active {
    transform: scale(0.99);
}

.apic-fam.on {
    border-color: var(--rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.13);
    box-shadow: 0 2px 10px rgba(201, 168, 168, 0.16), inset 0 0 0 1px rgba(201, 168, 168, 0.42);
}

.apic-fam-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.apic-fam-name {
    font-family: var(--font-serif, "Songti SC", serif);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary, #3a3232);
    white-space: nowrap;
}

.apic-fam-rec {
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(196, 168, 106, 0.16);
    color: var(--gold-dark, #9a7f42);
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    flex: none;
}

.apic-fam-sign {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex: none;
}

/* 四个信号格：通的亮、慢的暗一半、断的全灭（不编数字，只用灯说话） */
.apic-signal {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.apic-signal i {
    display: block;
    width: 3px;
    border-radius: 1px;
    background: rgba(201, 168, 168, 0.3);
}

.apic-signal i:nth-child(1) { height: 3px; }
.apic-signal i:nth-child(2) { height: 5.5px; }
.apic-signal i:nth-child(3) { height: 8px; }
.apic-signal i:nth-child(4) { height: 11px; }

.apic-signal.ok i { background: var(--success, #A8C0A0); }

.apic-signal.slow i:nth-child(1),
.apic-signal.slow i:nth-child(2) { background: var(--gold, #C4A86A); }

.apic-signal.slow i:nth-child(3) { background: rgba(196, 168, 106, 0.45); }

.apic-signal.down i { background: rgba(168, 152, 152, 0.28); }

.apic-fam-lat {
    font-size: 9.5px;
    color: var(--text-muted, #a99);
    min-width: 26px;
    text-align: right;
}

.apic-fam-state {
    align-self: flex-start;
    font-size: 9.5px;
    letter-spacing: 0.04em;
    color: var(--success, #A8C0A0);
}

.apic-fam-state.slow { color: var(--gold-dark, #9a7f42); }
.apic-fam-state.down { color: var(--text-muted, #a99); }

.apic-fam-desc {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
}

.apic-fam-dl {
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-secondary, #7a6f6f);
    opacity: 0.92;
}

.apic-fam-cost {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    min-height: 13px;
}

/* 「一颗星」＝一段价，不做绝对金额（价目表没拉到就明说稍后显示） */
.apic-coin {
    width: 9px;
    height: 9px;
    flex: none;
    border: 1px solid var(--gold, #C4A86A);
    border-radius: 50%;
    opacity: 0.7;
}

.apic-star {
    width: 9px;
    height: 9px;
    border: 1px solid rgba(196, 168, 106, 0.45);
    border-radius: 50%;
    background: transparent;
}

.apic-star.on {
    background: var(--gold, #C4A86A);
    border-color: var(--gold, #C4A86A);
}

.apic-fam-cst {
    font-size: 9.5px;
    color: var(--text-muted, #a99);
}

/* 真实星光数（宝宝 2026-11-02 定：不再用相对三颗星，直接给数字，一眼看出贵多少） */
.apic-fam-cst-n {
    font-size: 9.5px;
    color: var(--text-muted, #a99);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* 【昂贵】小标签：一条超过 10 星光；跟「推荐」同款药丸，但用告警色，不抢主信息 */
.apic-fam-exp {
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(184, 98, 98, 0.14);
    color: #a8585a;
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    flex: none;
}

/* 「这会儿只能走贵的」：便宜线路全挂时才出现，必须让她一眼看见（2026-11-02 线上 10 星光实锤） */
.apic-fam-ups {
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(184, 98, 98, 0.12);
    color: #a8585a;
    font-size: 9px;
    line-height: 1.5;
    white-space: nowrap;
}

/* ---- 内置 · 生图档的横向选择 ---- */
.apic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apic-chip {
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid rgba(201, 168, 168, 0.42);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary, #7a6f6f);
    font-family: inherit;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.apic-chip.on {
    background: var(--rose, #C9A8A8);
    border-color: var(--rose, #C9A8A8);
    color: #fff;
}

/* ---- 自接 ---- */
.apic-ctop {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apic-ctop .apic-big {
    margin-top: 0;
}

.apic-tools {
    display: flex;
    gap: 7px;
}

.apic-tool {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(201, 168, 168, 0.42);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary, #7a6f6f);
    font-family: inherit;
    font-size: 11.5px;
    line-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-tool:active {
    transform: scale(0.97);
}

/* 点开中的工具（配置教程 / 一键配置）：同一时间只亮一颗 */
.apic-tool.on {
    border-color: var(--rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.12);
    color: var(--rose, #C9A8A8);
}

.apic-tool-wide {
    width: 100%;
    flex: none;
    margin-top: 8px;
}

/* ---- 漏配提醒：不再在顶部开一块红框，红边直接长在「那一格」身上，
        并在它下面就地写一句人话（2026-11 甲方图 8 那条） ---- */
.apic-miss-hint {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.55;
    color: var(--danger, #D8A898);
    letter-spacing: 0.01em;
}

.apic-miss-hint b {
    font-weight: 600;
}

/* 没配好的下拉：整颗框描红（不改原控件本身，只加一层） */
.api-dd.apic-miss,
select.apic-miss,
.apic-miss > .api-dd-trigger {
    border-color: rgba(216, 168, 152, 0.85) !important;
    box-shadow: 0 0 0 1px rgba(216, 168, 152, 0.16);
}

/* ---- 「现在真正在用」那一行 + 「正在用的型号已被站点下架」红条（2026-11-02 甲方定）----
   面板里存的和真正在跑的可能不是同一套（保存 vs 启用）；这一行把真相直接写出来，
   下架的型号就地给红条 + 一键换，绝不再让她「看着有、选了就 503」。 */
.apic-live-line {
    margin-top: 8px;
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-secondary, #7a6f6f);
    letter-spacing: 0.01em;
}

.apic-live-line b {
    font-weight: 600;
    color: var(--rose, #C9A8A8);
}

.apic-live-line .warn {
    color: var(--danger, #D8A898);
}

.apic-dead-banner {
    margin: 8px 0 2px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(216, 168, 152, 0.45);
    background: rgba(216, 168, 152, 0.12);
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--danger, #D8A898);
    letter-spacing: 0.01em;
}

.apic-dead-banner button {
    margin-top: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(216, 168, 152, 0.7);
    background: transparent;
    color: var(--danger, #D8A898);
    font-family: inherit;
    font-size: 10.5px;
    line-height: 24px;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-dead-banner button:active {
    transform: scale(0.97);
    background: rgba(216, 168, 152, 0.16);
}

/* 推荐站角标（管理中转站里 DeepSeek / 硅基流动，不可删） */
.apic-rec-badge {
    flex: none;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(196, 168, 106, 0.16);
    color: var(--gold-dark, #9a7f42);
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: 0.04em;
}

/* ---- 就地展开的小面板（教程 / 一键配置）---- */
.apic-inline {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.22, 0.68, 0.24, 1), opacity 0.24s ease, margin-top 0.28s ease;
    margin-top: 0;
}

.apic-inline.show {
    max-height: 2000px;
    opacity: 1;
    margin-top: 9px;
}

.apic-panel {
    padding: 11px 11px 12px;
    border: 1px solid rgba(201, 168, 168, 0.3);
    border-radius: var(--radius-md, 14px);
    background: rgba(255, 252, 251, 0.75);
}

.apic-panel-t {
    font-family: var(--font-serif, "Songti SC", serif);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary, #3a3232);
}

.apic-panel-line {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--text-muted, #a99);
}

.apic-panel-line b {
    font-weight: 600;
    color: var(--rose, #C9A8A8);
}

.apic-panel-row {
    display: flex;
    gap: 7px;
    margin-top: 8px;
}

.apic-step {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
}

.apic-step-n {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border: 1px solid rgba(201, 168, 168, 0.5);
    border-radius: 50%;
    color: var(--rose, #C9A8A8);
    font-size: 9.5px;
    line-height: 14px;
    text-align: center;
}

.apic-step-x {
    font-size: 11px;
    line-height: 1.65;
    color: var(--text-secondary, #7a6f6f);
    min-width: 0;
}

.apic-step-x b {
    font-weight: 600;
    color: var(--text-primary, #3a3232);
}

.apic-qrow2 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    min-width: 0;
}

.apic-qrow2-n {
    font-size: 11.5px;
    color: var(--text-primary, #3a3232);
    white-space: nowrap;
}

.apic-qrow2-s {
    font-size: 9.5px;
    color: var(--text-muted, #a99);
    white-space: nowrap;
}

.apic-qrow2-s.ok {
    color: var(--success, #A8C0A0);
}

.apic-qrow2 .apic-tool {
    flex: none;
    margin-left: auto;
    height: 24px;
    padding: 0 9px;
    font-size: 10.5px;
    line-height: 22px;
}

/* 一键配置的结果（就地显示，不弹窗） */
.apic-qres {
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(168, 192, 160, 0.09);
}

.apic-qres-t {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #3a3232);
}

.apic-qres-l {
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.65;
    color: var(--text-secondary, #7a6f6f);
}

.apic-qres-l b {
    font-weight: 600;
    color: var(--success, #A8C0A0);
}

.apic-qres-f {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.65;
    color: var(--danger, #D8A898);
}

/* ---- 「?」说明层（挂在 #app 内，限宽 480）---- */
.apic-help-ov {
    position: absolute;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 16px;
    background: rgba(58, 50, 50, 0.34);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.apic-help-ov.show {
    opacity: 1;
}

.apic-help-panel {
    width: 100%;
    max-width: 340px;
    max-height: 74%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg, 18px);
    background: var(--surface, #fff);
    box-shadow: 0 10px 34px rgba(90, 66, 66, 0.22);
    transform: translateY(8px) scale(0.985);
    transition: transform 0.26s cubic-bezier(0.22, 0.68, 0.24, 1);
}

.apic-help-ov.show .apic-help-panel {
    transform: translateY(0) scale(1);
}

.apic-help-head {
    display: flex;
    align-items: center;
    padding: 13px 14px 9px;
}

.apic-help-t {
    font-family: var(--font-serif, "Songti SC", serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #3a3232);
}

.apic-help-x {
    position: relative;
    margin-left: auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.apic-help-x::before,
.apic-help-x::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--text-muted, #a99);
}

.apic-help-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.apic-help-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.apic-help-body {
    padding: 2px 14px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.apic-help-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(201, 168, 168, 0.16);
}

.apic-help-row:last-child {
    border-bottom: none;
}

.apic-help-n {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--gold-dark, #9a7f42);
}

.apic-help-x2 {
    font-size: 11px;
    line-height: 1.72;
    color: var(--text-secondary, #7a6f6f);
}

/* ---- 窄屏（<350）：两张卡改上下排，按钮不挤 ---- */
@media (max-width: 349px) {
    .apic-pair {
        grid-template-columns: 1fr;
    }

    .apic-now {
        max-width: 100%;
        margin-left: 0;
        width: 100%;
        text-align: left;
    }

    .apic-card-acts {
        gap: 5px;
    }

    .apic-btn {
        font-size: 10.5px;
    }

    .apic-tools {
        flex-direction: column;
    }

    .apic-tool {
        width: 100%;
    }
}

/* ===== 内置语音的两档（TASK-MODEL-004-B3：标准音色 / 专属声音） =====
   只出现在「模型与连接 → 内置 · 语音」这一块里；显隐与文案全在 js/panels/panels-settings-models.js。
   色走主题令牌、细线、衬线小标题；窄屏两档上下排，不横向溢出。 */
.apic-voice-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(196, 168, 106, 0.3);
}

.apic-voice-t {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.apic-voice-t2 {
    margin: 11px 0 6px;
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.apic-voice-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.apic-voice-tier {
    flex: 1 1 calc(50% - 4px);
    min-width: 124px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid rgba(201, 168, 168, 0.34);
    border-radius: 12px;
    background: var(--surface-solid, #fffdfc);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-voice-tier:active {
    transform: scale(0.98);
}

.apic-voice-tier.on {
    border-color: var(--accent-rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.13);
    box-shadow: inset 0 0 0 1px rgba(201, 168, 168, 0.28);
}

/* 这一档现在用不了：还能点（点了如实告诉她），只是压暗 */
.apic-voice-tier.off {
    opacity: 0.68;
    border-style: dashed;
}

.apic-voice-tiername {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.apic-voice-tierline,
.apic-voice-tierhint {
    font-size: 10px;
    line-height: 1.5;
    color: var(--text-muted);
}

.apic-voice-tierhint {
    color: var(--gold-dark);
}

.apic-voice-now {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.apic-voice-now b {
    color: var(--accent-rose, #C9A8A8);
    font-weight: 600;
}

.apic-voice-presets .apic-chips {
    margin-top: 0;
}

.apic-voice-mine {
    display: flex;
    flex-direction: column;
}

/* ===== 一条「我的声音」＝ 名字（点了就换成它）+ 试听 / 改名 / 删除 三个小动作 ===== */
.apic-voice-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
    border: 1px solid rgba(201, 168, 168, 0.3);
    border-radius: 12px;
    background: rgba(255, 252, 251, 0.7);
    overflow: hidden;
    transition: border-color 0.22s ease, background 0.22s ease;
}

.apic-voice-item.on {
    border-color: var(--accent-rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.12);
}

.apic-voice-item > .apic-voice-row {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.apic-voice-acts {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    padding: 0 6px 5px;
}

.apic-voice-act {
    padding: 3px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 10.5px;
    letter-spacing: 0.3px;
    color: var(--text-secondary, #8A8278);
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-voice-act:active {
    transform: scale(0.94);
    background: rgba(201, 168, 168, 0.16);
}

.apic-voice-act.busy {
    opacity: 0.45;
}

.apic-voice-act.del {
    color: #B4736E;
}

/* 一档一整块：只显示当前选中那一档 */
.apic-voice-tierpanel {
    margin-top: 2px;
}

/* 浅灰小注（录音要求 / 星光怎么算 / 另一档还有几条） */
.apic-voice-note {
    margin: 6px 0 10px;
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-muted, #A9A29A);
}

.apic-voice-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(201, 168, 168, 0.3);
    border-radius: 12px;
    background: rgba(255, 252, 251, 0.7);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-voice-row:active {
    transform: scale(0.99);
}

.apic-voice-row.on {
    border-color: var(--accent-rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.12);
}

.apic-voice-row.off .apic-voice-rowname {
    color: var(--text-muted);
}

.apic-voice-rowname {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 属于哪一档：小小一枚，跟名字并排，不抢位置 */
.apic-voice-rowtier {
    flex: none;
    padding: 1px 5px;
    border: 1px solid rgba(196, 168, 106, 0.42);
    border-radius: 999px;
    font-size: 9.5px;
    color: var(--gold-dark);
    white-space: nowrap;
}

.apic-voice-rowtier:empty {
    display: none;
}

.apic-voice-rowtag {
    flex: none;
    font-size: 10px;
    color: var(--accent-rose, #C9A8A8);
}

/* 小标题后面那句浅灰说明（点一下就换成它的声音） */
.apic-voice-t3 {
    margin-left: 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-muted);
}

.apic-voice-rowtag:empty {
    display: none;
}

.apic-voice-empty {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* 窄屏（<370）：两档改成上下排，字不挤 */
@media (max-width: 369px) {
    .apic-voice-tier {
        flex: 1 1 100%;
    }
}

/* ===== B1/B2£¨2026-11£©£ºÁ½¸öÒôɫ¿â tab £« ÿÐÐһ¸öÊÔÌýСÈý½Ç =====
   ±ê׼Òôɫ¿â / ¸߼¶Òôɫ¿âÁ½¸ö tab£»tab Àï·֡¸ƽ̨ԤÉ衹Ó롸ÎҵĿË¡¡¹¡£
   խÆÁ£¨360 / 390 / 430£©һÂɲ»ºáÏòÒç³ö£ºtab ÓëÐж¼¿¿ flex + min-width:0 + ʡÂԺţ¬²»дËÀ¿í¶ȡ£ */
.apic-voice-tabs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.apic-voice-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(201, 168, 168, 0.34);
    border-radius: 12px;
    background: var(--surface-solid, #fffdfc);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-voice-tab:active {
    transform: scale(0.98);
}

.apic-voice-tab.on {
    border-color: var(--accent-rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.13);
    box-shadow: inset 0 0 0 1px rgba(201, 168, 168, 0.28);
}

.apic-voice-tab.off {
    opacity: 0.68;
    border-style: dashed;
}

.apic-voice-tabname {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-serif);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.apic-voice-tabsub {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
    line-height: 1.4;
    color: var(--text-muted, #A9A29A);
}

.apic-voice-tab .apic-voice-tierhint {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apic-voice-group {
    margin-top: 10px;
}

/* ---- һÐÐһ¸öԤÖÃÒôɫ£º×ó±ßÃû×֣¨µãÁ˾ͻ»³ÉËü£©£« ÓұßÊÔÌýСÈý½Ç ---- */
.apic-vp-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.apic-vp {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 2px 6px 2px 0;
    border: 1px solid rgba(201, 168, 168, 0.3);
    border-radius: 12px;
    background: rgba(255, 252, 251, 0.7);
    transition: border-color 0.22s ease, background 0.22s ease;
}

.apic-vp.on {
    border-color: var(--accent-rose, #C9A8A8);
    background: rgba(201, 168, 168, 0.12);
}

.apic-vp-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 8px 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.apic-vp-main:active {
    transform: scale(0.99);
}

.apic-vp-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-primary);
}

.apic-vp-tag {
    flex: none;
    font-size: 9.5px;
    color: var(--accent-rose, #C9A8A8);
}

.apic-vp-tag:empty {
    display: none;
}

/* ÊÔÌý£º×ԻæСÈý½ǣ¨ÏßÌõͼ±꣬²»ÊÇ emoji£©£»Éú³ÉÖÐתȦ£¬ʧ°ܱäºì²棬¾ø²»×ö¡¸¼ٲ¥·š¹ */
.apic-vp-play {
    flex: none;
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 168, 168, 0.42);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary, #8A8278);
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.apic-vp-play:active {
    transform: scale(0.92);
}

.apic-vp-play.voice-sample-playing {
    color: #fff;
    border-color: var(--accent-rose, #C9A8A8);
    background: var(--accent-rose, #C9A8A8);
}

.apic-vp-ico,
.apic-vp-ico svg {
    width: 15px;
    height: 15px;
    display: block;
}

.apic-vp-play.busy {
    color: transparent;
    border-color: rgba(201, 168, 168, 0.4);
}

.apic-vp-play.busy .apic-vp-ico {
    opacity: 0;
}

.apic-vp-play.busy::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -7px 0 0 -7px;
    border: 1.5px solid rgba(201, 168, 168, 0.35);
    border-top-color: var(--accent-rose, #C9A8A8);
    border-radius: 50%;
    animation: apic-vp-spin 0.85s linear infinite;
}

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

.apic-vp-play.err {
    color: #B4736E;
    border-color: #B4736E;
}

.apic-vp-play.err .apic-vp-ico {
    display: none;
}

.apic-vp-play.err::before,
.apic-vp-play.err::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 1.4px;
    background: #B4736E;
}

.apic-vp-play.err::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.apic-vp-play.err::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* խÆÁ£¨<370£©£ºtab Éϵĸ±±껻Ðв»¼·£¬Ãû×ÖҲ²»½ضϳÉһ¸öСµã */
@media (max-width: 369px) {
    .apic-voice-tab {
        padding: 7px 8px;
    }

    .apic-voice-tabname {
        font-size: 12px;
    }

    .apic-voice-tabsub {
        font-size: 9px;
    }
}
