/* ErisPulse Dashboard – settings (auto-split from dash.css, aligned with js/) */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}
.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bd);
    cursor: pointer;
    padding: 0;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}
.color-swatch:hover {
    transform: none;
}
.color-swatch.active {
    border-color: var(--tx-p);
    transform: none;
}
.color-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tx-s);
    cursor: pointer;
}
.color-custom input[type="color"] {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--bd);
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}
.color-custom input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}
.color-custom input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

/* 背景控制按钮组 */
.bg-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.bg-controls .btn {
    font-size: 12px;
    padding: 6px 10px;
}
.settings-check-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--tx-s);
    cursor: pointer;
}
.settings-check-row input {
    margin: 0;
}

.settings-foldout {
    margin: 4px 0 12px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    background: var(--bg-s);
    overflow: hidden;
}
.settings-foldout > summary {
    list-style: none;
    cursor: pointer;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-p);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.settings-foldout > summary::-webkit-details-marker {
    display: none;
}
.settings-foldout > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--tx-t);
    border-bottom: 2px solid var(--tx-t);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}
.settings-foldout[open] > summary::after {
    transform: rotate(45deg);
}
.settings-foldout-body {
    padding: 4px 14px 14px;
    border-top: 1px solid var(--bd);
}


/* 设置面板样式 */
.settings-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tx-t);
    margin-bottom: 16px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 17px;
    padding: 14px 0;
}

.settings-row + .settings-row {
    border-top: 1px solid color-mix(in srgb, var(--bd) 50%, transparent);
}

.settings-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-p);
    letter-spacing: -0.01em;
}

.settings-desc {
    font-size: 12px;
    color: var(--tx-s);
    margin-top: 3px;
    line-height: 1.4;
}

.settings-control {
    flex-shrink: 0;
}

.settings-select {
    padding: 7px 32px 7px 12px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-sm);
    background: var(--bg-s);
    color: var(--tx-p);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
}

.settings-select option {
    background: var(--bg-t);
    color: var(--tx-p);
}

/* 设置面板移动端适配 */

.settings-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.25s;
}

.settings-backdrop.show {
    display: block;
    opacity: 1;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1101;
    background: var(--bg-t);
    border-left: 1px solid var(--bd);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-panel.open {
    
}

.settings-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--bd);
    flex-shrink: 0;
}

.settings-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tx-p);
}

.settings-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.settings-panel-body::-webkit-scrollbar {
    width: 4px;
}

.settings-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-panel-body::-webkit-scrollbar-thumb {
    background: var(--bd);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .settings-panel {
        width: 100%;
        max-width: 100%;
    }

    .settings-panel-body {
        padding: 16px;
    }

    .settings-row {
        gap: 8px;
    }

    .settings-label {
        font-size: 13px;
    }

    .settings-desc {
        font-size: 11px;
    }

    .settings-select {
        max-width: 140px;
    }
}

/* ════════════════ 设置页：索引 + 详情两栏（OS 设置范式） ════════════════
   桌面（≥960px）：左侧分区菜单 sticky，右侧当前分区详情；
   移动（<960px）：单栏索引 → 点击行滑入详情，返回按钮退回索引 */
.settings-shell {
    display: block;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
}

.settings-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--tx-p);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.settings-nav-item:hover {
    background: var(--bg-s);
}

.settings-nav-item svg {
    width: 16px;
    height: 16px;
    color: var(--tx-t);
    flex: none;
}

.settings-nav-item.active {
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
}

.settings-nav-item.active svg {
    color: var(--accent);
}

.settings-nav-sep {
    height: 1px;
    margin: 10px 12px;
    background: color-mix(in srgb, var(--bd) 60%, transparent);
}

/* 兼容旧入口选择器（.pkg-tab[data-tab=...]）而携带 pkg-tab 类的导航项：
   双类优先级覆写回导航条目样式，不受 store.css 的 pkg-tab 排版影响 */
.settings-nav-item.pkg-tab {
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    gap: 10px;
}

/* 详情面板 */
.settings-detail {
    min-width: 0;
}

.settings-pane {
    display: none;
}

.settings-pane.active {
    display: block;
    animation: settingsPaneIn 0.18s var(--ease-smooth, ease) both;
}

@keyframes settingsPaneIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .settings-pane.active {
        animation: none;
    }
}

.settings-pane-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.settings-pane-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--tx-p);
}

.settings-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border: 1px solid var(--bd);
    border-radius: 10px;
    background: transparent;
    color: var(--tx-s);
    cursor: pointer;
}

.settings-back:hover {
    background: var(--bg-s);
    color: var(--tx-p);
}

.settings-back svg {
    width: 15px;
    height: 15px;
}

@media (min-width: 960px) {
    .settings-shell {
        display: grid;
        grid-template-columns: 264px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    .settings-nav {
        position: sticky;
        top: 14px;
        margin-bottom: 0;
    }
    /* 桌面顶级面板无需返回按钮（导航常驻）；子面板的返回仍可见 */
    .settings-back-top {
        display: none;
    }
}

@media (max-width: 959px) {
    .settings-detail {
        display: none;
    }
    .settings-shell.show-detail .settings-nav {
        display: none;
    }
    .settings-shell.show-detail .settings-detail {
        display: block;
    }
}

/* ── 行条目（OS 设置签名样式）：图标 + 标题/副标题 + 行内控件或值 + chevron ── */
.set-group {
    padding: 6px 8px;
    margin: 0 0 14px;
}

.set-group--flush {
    padding: 12px;
}

.set-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 10px;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

@media (pointer: coarse) {
    .set-row {
        min-height: 56px;
    }
}

.set-row + .set-row {
    border-top: 1px solid color-mix(in srgb, var(--bd) 50%, transparent);
}

button.set-row {
    cursor: pointer;
    border-radius: 10px;
}

button.set-row:hover {
    background: var(--bg-s);
}

.set-row--block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.set-ico {
    width: 28px;
    height: 28px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
    color: var(--accent);
}

.set-ico svg {
    width: 16px;
    height: 16px;
}

.set-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.set-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--tx-p);
    letter-spacing: -0.01em;
}

.set-sub {
    font-size: 12px;
    color: var(--tx-t);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.set-end {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.set-value {
    font-size: 13px;
    color: var(--tx-s);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.set-chevron {
    display: flex;
    color: var(--tx-t);
}

.set-chevron svg {
    width: 16px;
    height: 16px;
}

/* 强调色行内当前值色点 */
.accent-dot-row {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--bd);
}

/* 面板内既有内容块（令牌卡 / 更新卡 / 关于块）与行条目组的纵向节奏对齐 */
.settings-pane > #generalTokenCard {
    margin-bottom: 14px;
}
.settings-pane > #generalTokenCard .card {
    margin: 0;
}
.settings-pane .about-card:last-child,
.settings-pane .about-links {
    margin-bottom: 0;
}

.settings-card {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-card-body {
    padding: 4px 20px 16px;
}

.settings-card .card-header {
    padding: 14px 20px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--tx-s);
    text-transform: uppercase;
    border-bottom: none;
}

.settings-card .card-header svg {
    width: 16px;
    height: 16px;
    color: var(--tx-t);
}

/* 卡头右侧操作区：重置/入口按钮统一右对齐成组（标题在左，互不挤靠） */
.card-header-actions {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* 设置卡头：标题占满剩余空间，保证操作按钮严格右贴边 */
.settings-card .card-header > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 卡内小节标题（如「界面风格」「图案库」）：11px 大写宽字距，构成目录式层级 */
.settings-subhead {
    margin: 16px 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tx-t);
}

/* 双列选择器（皮肤卡等两选项场景）：瓦片上限 200px，禁止拉伸为横幅 */
.theme-selector.theme-selector--two {
    grid-template-columns: repeat(auto-fill, minmax(150px, 200px));
    justify-content: center;
}

/* ── 分段选择器（透感三档等互斥选项）── */
.settings-seg {
    display: inline-flex;
    border: 1px solid var(--bd);
    border-radius: var(--radius-sm);
    background: var(--bg-s);
    overflow: hidden;
}
.settings-seg button {
    appearance: none;
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 12px;
    font-family: inherit;
    color: var(--tx-s);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.settings-seg button + button {
    border-left: 1px solid var(--bd);
}
.settings-seg button:hover {
    color: var(--tx-p);
}
.settings-seg button.active {
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
    color: var(--accent);
    font-weight: 600;
}

/* ════════════════ 背景与透感（所见即所得预览卡） ════════════════ */
.bg-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 860px) {
    .bg-workspace {
        grid-template-columns: 300px minmax(0, 1fr);
        align-items: start;
    }
}

/* 预览区：背景图 + 模拟卡片表面（表面 token 与全局一致，透感模式自动呈现半透明） */
.bg-preview {
    position: relative;
    height: 180px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    background: var(--bg-s);
    overflow: hidden;
}
.bg-preview-img {
    position: absolute;
    inset: 0;
    background-position: center;
    background-color: var(--bg-s);
}
.bg-preview-sample {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    pointer-events: none;
}
.bps-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
    padding: 12px 14px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-sm);
    background: var(--bg-t);
}
.bps-title {
    width: 58%;
    height: 8px;
    border-radius: var(--radius-xs);
    background: var(--tx-p);
    opacity: 0.75;
}
.bps-line {
    width: 100%;
    height: 5px;
    border-radius: var(--radius-xs);
    background: var(--tx-t);
    opacity: 0.45;
}
.bps-line-short {
    width: 70%;
}
.bps-btn {
    width: 46px;
    height: 16px;
    margin-top: 2px;
    border-radius: var(--radius-xs);
    background: var(--accent-fill);
}
.bg-preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tx-s);
    border: 1px dashed var(--bd);
    border-radius: var(--radius-md);
    background: var(--bg-s);
}
.bg-preview-empty-desc {
    font-size: 11px;
    font-weight: 400;
    color: var(--tx-t);
}

/* 控制列：按钮组 + 设置行（横贯卡内限宽，避免控件行过长） */
.bg-controls-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 620px;
}

/* OLED 提示条（OLED + 背景图同时开启时） */
.bg-oled-hint {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wr-c);
    background: var(--wr-bg);
    border: 1px solid var(--wr-bd);
    border-radius: var(--radius-sm);
}

/* 图案库：小图平铺缩略图（瓦片上限 72px，随容器自适应列数） */
.bg-pattern-block {
    margin-top: 4px;
}
.bg-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 72px));
    gap: 8px;
}
.bg-pattern-thumb {
    height: 48px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-sm);
    background-color: var(--bg-s);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease;
}
.bg-pattern-thumb:hover {
    border-color: var(--tx-t);
}
.bg-pattern-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

/* ════════════════ 强调色卡：预设色板 + 自定义取色 ════════════════ */
.accent-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 72px));
    gap: 8px;
    margin-bottom: 10px;
}
.accent-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    border: 2px solid var(--bd);
    border-radius: var(--radius-sm);
    background: var(--bg-t);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.accent-chip:hover {
    border-color: var(--tx-t);
}
.accent-chip.active {
    border-color: var(--chip, var(--accent));
    background: color-mix(in srgb, var(--chip, var(--accent)) 10%, var(--bg-t));
}
.accent-chip-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--chip, var(--accent));
}
.accent-chip-sample {
    font-size: 11px;
    line-height: 1;
    color: var(--tx-s);
}
.accent-chip.active .accent-chip-sample {
    color: var(--tx-p);
    font-weight: 600;
}
.accent-custom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* ════════════════ 主题变量编辑器模态（入口在「主题包与高级定制」卡） ════════════════ */
.custom-theme-box {
    max-width: 620px;
}
.custom-theme-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 12px;
}
.custom-theme-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 4px;
}

/* ════════════════ 主题包与高级定制卡的分节 ════════════════ */
.advanced-divider {
    height: 1px;
    margin: 14px 0;
    background: color-mix(in srgb, var(--bd) 60%, transparent);
}
.advanced-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ════════════════ 关于：版本徽标行 ════════════════ */
.about-ver-badge {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* 通用 tab：关于卡 */
.about-ver {
    font-size: 15px;
    font-weight: 700;
    font-family: "SF Mono", "Cascadia Code", "Fira Code", "JetBrains Mono", monospace;
    color: var(--tx-p);
    letter-spacing: -0.01em;
}

.about-ver-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--tx-t);
}

.about-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.about-link-item {
    font-size: 12px;
    color: var(--tx-s);
    text-decoration: none;
    border: 1px solid var(--bd);
    border-radius: 999px;
    padding: 4px 12px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.about-link-item:hover {
    color: var(--tx-p);
    border-color: var(--tx-t);
}
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.settings-item + .settings-item {
    border-top: 1px solid color-mix(in srgb, var(--bd) 50%, transparent);
}

.settings-item-block {
    flex-direction: column;
    align-items: flex-start;
}

.settings-item-block .settings-item-control {
    width: 100%;
    margin-top: 12px;
}

.settings-item-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-p);
    letter-spacing: -0.01em;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--tx-s);
    margin-top: 2px;
    line-height: 1.4;
}

.settings-item-control {
    flex-shrink: 0;
}

.settings-item-control .switch {
    margin: 0;
}

/* 全局同步开关 */
.settings-scope-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    cursor: pointer;
    font-size: 11px;
    color: var(--tx-t);
    font-weight: 500;
}

.settings-scope-toggle input {
    display: none;
}

.settings-scope-track {
    width: 32px;
    height: 18px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--bd) 60%, transparent);
    position: relative;
    transition: background 0.2s;
}

.settings-scope-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-t);
    transition: left 0.2s, background 0.2s;
    box-shadow: none;
}

.settings-scope-toggle input:checked ~ .settings-scope-track {
    background: var(--accent);
}

.settings-scope-toggle
    input:checked
    ~ .settings-scope-track
    .settings-scope-thumb {
    left: 16px;
    background: white;
}

.settings-scope-label {
    font-weight: 600;
    white-space: nowrap;
}

/* 全局横幅 */
.settings-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 17px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--bd));
    font-size: 13px;
    color: var(--tx-p);
}

.settings-banner svg {
    color: var(--accent);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .fw-update-card {
        padding: 0;
    }
}


/* 关于页面 */
/* hero：看板娘大图直接铺入（不裁圆、不包底框），文本与版本信息居中对齐 */
.about-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 8%, var(--bg-t)));
    border: 1px solid var(--bd);
    border-radius: 16px;
    margin-bottom: 20px;
    min-height: 132px;
}
.about-mascot {
    width: auto;
    height: 132px;
    padding: 0;
    box-sizing: content-box;
    object-fit: contain;
    flex-shrink: 0;
    border: none;
    border-radius: 0;
    background: none;
}
.about-hero-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.about-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tx-p);
    letter-spacing: -0.01em;
    margin: 0;
}
.about-tagline {
    font-size: 13px;
    color: var(--tx-s);
    margin: 0;
}
.about-intro {
    font-size: 14px;
    line-height: 1.7;
    color: var(--tx);
}
.about-card {
    background: var(--bg-t);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.about-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--tx-p);
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.about-feature {
    background: var(--bg-t);
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    padding: 18px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.about-feature:hover {
    box-shadow: none;
    
}
.about-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--accent);
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 10%, transparent));
    border-radius: var(--radius-md);
    transition:
        transform 0.3s,
        color 0.3s,
        background 0.3s;
}
.about-feature:hover .about-feature-icon {
    transform: none;
    color: var(--accent-h);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.about-feature-icon svg {
    width: 22px;
    height: 22px;
}
.about-feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tx-p);
    margin-bottom: 4px;
}
.about-feature-desc {
    font-size: 12px;
    color: var(--tx-s);
    line-height: 1.5;
}
.about-star-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    background: var(--wr-bg);
    border: 1px solid var(--wr-bd);
}
.about-star-icon {
    color: var(--wr-c);
}
.about-star-icon svg {
    filter: none;
}
.about-star-cta p {
    font-size: 14px;
    color: var(--tx-s);
    margin: 0;
}
.about-star-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    background: var(--tx-p);
    color: var(--bg-t);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition:
        opacity 0.2s,
        transform 0.2s;
}
.about-star-btn:hover {
    opacity: 0.9;
    transform: none;
}
.about-star-btn svg {
    width: 18px;
    height: 18px;
}
.about-contributors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.about-contrib-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--tx-s);
    transition: color 0.2s;
    width: 56px;
}
.about-contrib-item:hover {
    color: var(--accent);
}
.about-contrib-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--bd);
    transition: border-color 0.2s;
}
.about-contrib-item:hover img {
    border-color: var(--accent);
}
.about-contrib-name {
    font-size: 10px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 56px;
}
.about-contrib-loading {
    font-size: 12px;
    color: var(--tx-t);
    padding: 8px 0;
}
.about-contrib-empty {
    font-size: 12px;
    color: var(--tx-t);
}
.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.about-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bd);
    background: var(--bg-t);
    color: var(--tx);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition:
        border-color 0.2s,
        color 0.2s,
        background 0.2s;
}
.about-link-btn:hover { color: var(--accent); }
.about-link-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .about-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 14px;
    }
    .about-ver-badge {
        justify-content: center;
    }
    .about-mascot {
        height: 108px;
    }
    .about-title {
        font-size: 18px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 200px));
    justify-content: center;
    gap: 12px;
    margin: 8px 0;
}

.theme-card {
    position: relative;
    border: 2px solid var(--bd);
    border-radius: var(--radius-lg);
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background: var(--bg-t);
    text-align: center;
    user-select: none;
}

.theme-card:active {
    transform: none;
}

.theme-card:hover {
    
    transform: none;
    box-shadow: none;
}

.theme-card.active {
    border-color: var(--accent-fill);
    box-shadow: none;
    background: color-mix(in srgb, var(--accent) 6%, var(--bg-t));
}

.theme-card.active::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-fill);
    z-index: 2;
    box-shadow: none;
}

.theme-card.active::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 18px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(50%, -50%) rotate(45deg);
    z-index: 3;
}

.theme-card-preview {
    width: 100%;
    height: 72px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--bd);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.theme-card-preview .tcp-header {
    height: 12px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 3px;
}

.theme-card-preview .tcp-header .tcp-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.theme-card-preview .tcp-sidebar {
    width: 20%;
    height: 100%;
    border-right: 1px solid;
    flex-shrink: 0;
}

.theme-card-preview .tcp-body {
    flex: 1;
    display: flex;
    padding: 4px;
    gap: 3px;
}

.theme-card-preview .tcp-card {
    flex: 1;
    border-radius: 2px;
    height: 16px;
}

.theme-card-preview .tcp-card-sm {
    width: 30%;
    border-radius: 2px;
    height: 12px;
}

.theme-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-p);
}

.theme-card-label-sm {
    font-size: 11px;
    color: var(--tx-s);
    margin-top: 2px;
}

.theme-card[data-theme-card="light"] .theme-card-preview {
    background: #f6f9ff;
}
.theme-card[data-theme-card="light"] .tcp-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e9f5;
}
.theme-card[data-theme-card="light"] .tcp-dot { background: #3aa0e6; }
.theme-card[data-theme-card="light"] .tcp-sidebar {
    background: #eef3fc;
    border-color: #e2e9f5;
}
.theme-card[data-theme-card="light"] .tcp-body { background: #f6f9ff; }
.theme-card[data-theme-card="light"] .tcp-card { background: #ffffff; border: 1px solid #e2e9f5; }
.theme-card[data-theme-card="light"] .tcp-card-sm { background: #ffffff; border: 1px solid #e2e9f5; }

.theme-card[data-theme-card="dark"] .theme-card-preview {
    background: #0e141b;
}
.theme-card[data-theme-card="dark"] .tcp-header {
    background: #131a23;
    border-bottom: 1px solid #273140;
}
.theme-card[data-theme-card="dark"] .tcp-dot { background: #5cb8ef; }
.theme-card[data-theme-card="dark"] .tcp-sidebar {
    background: #0c1322;
    border-color: #1d2740;
}
.theme-card[data-theme-card="dark"] .tcp-body { background: #080d18; }
.theme-card[data-theme-card="dark"] .tcp-card { background: #121b2e; border: 1px solid #1d2740; }
.theme-card[data-theme-card="dark"] .tcp-card-sm { background: #121b2e; border: 1px solid #1d2740; }

.theme-card[data-theme-card="auto"] .theme-card-preview {
    position: relative;
}
.theme-card[data-theme-card="auto"] .theme-card-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #f4f7fb;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.theme-card[data-theme-card="auto"] .theme-card-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #0e141b;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}
/* auto 卡：header 不再使用 linear-gradient 硬拼双色，
   直接透出 ::before/::after 的左亮右暗分屏底色（更扁平、少两个硬编码色） */
.theme-card[data-theme-card="auto"] .theme-card-preview .tcp-header {
    position: relative;
    z-index: 1;
    background: transparent;
    border-bottom: none;
}
.theme-card[data-theme-card="auto"] .tcp-dot { background: #4fa6de; }
.theme-card[data-theme-card="auto"] .tcp-sidebar,
.theme-card[data-theme-card="auto"] .tcp-body,
.theme-card[data-theme-card="auto"] .tcp-card,
.theme-card[data-theme-card="auto"] .tcp-card-sm {
    position: relative;
    z-index: 1;
}

.style-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0;
}

.style-card {
    position: relative;
    border: 2px solid var(--bd);
    border-radius: var(--radius-lg);
    padding: 14px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background: var(--bg-t);
    text-align: center;
    user-select: none;
}

.style-card:active {
    transform: none;
}

.style-card:hover {
    
    transform: none;
}

.style-card.active {
    border-color: var(--accent-fill);
    box-shadow: 0 0 0 1px var(--accent-fill);
    background: color-mix(in srgb, var(--accent) 6%, var(--bg-t));
}

.style-card.active::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-fill);
    z-index: 2;
    box-shadow: none;
}

.style-card.active::before {
    content: "";
    position: absolute;
    top: 9.5px;
    right: 12px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    z-index: 3;
}

.style-card-preview {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--bd);
    overflow: hidden;
    display: flex;
}

.style-card-preview .scp-sidebar {
    width: 24%;
    height: 100%;
    flex-shrink: 0;
}

.style-card-preview .scp-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
}

.style-card-preview .scp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.style-card-preview .scp-bar {
    height: 4px;
    border-radius: 2px;
    width: 40%;
}

.style-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-p);
    letter-spacing: -0.01em;
}

.style-card[data-style="eris"] .style-card-preview {
    background: #f6f7f9;
}
.style-card[data-style="eris"] .scp-sidebar {
    background: #eef0f3;
    border-right: 1px solid #e5e8ec;
}
.style-card[data-style="eris"] .scp-body { background: #ffffff; }
.style-card[data-style="eris"] .scp-dot { background: #3b6fe0; }
.style-card[data-style="eris"] .scp-bar { background: #3b6fe0; opacity: 0.5; }

/* 经典风格卡实际使用 theme-card-preview/tcp-* 部件：补着色（此前透明导致预览看似空盒） */
.style-card[data-style="eris"] .theme-card-preview {
    background: #f6f7f9;
    border: 1px solid #e5e8ec;
}
.style-card[data-style="eris"] .tcp-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e8ec;
}
.style-card[data-style="eris"] .tcp-dot { background: #3a94d0; }
.style-card[data-style="eris"] .tcp-sidebar {
    background: #eef0f3;
    border-right: 1px solid #e5e8ec;
}
.style-card[data-style="eris"] .tcp-body { background: #f6f7f9; }
.style-card[data-style="eris"] .tcp-card {
    background: #ffffff;
    border: 1px solid #e2e6ec;
}
.style-card[data-style="eris"] .tcp-card-sm {
    background: #ffffff;
    border: 1px solid #e2e6ec;
}

.style-card[data-style="classic"] .style-card-preview {
    background: #f6f7f9;
}
.style-card[data-style="classic"] .scp-sidebar {
    background: #eef0f3;
    border-right: 1px solid #e5e8ec;
}
.style-card[data-style="classic"] .scp-body { background: #ffffff; }
.style-card[data-style="classic"] .scp-dot { background: #3b6fe0; }
.style-card[data-style="classic"] .scp-bar { background: #3b6fe0; opacity: 0.5; }

.settings-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-sm);
    background: var(--bg-s);
    color: var(--tx-p);
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    outline: none;
}
.settings-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
}

/* 移动端 */
@media (max-width: 768px) {
    /* 机器人卡片 */
    .bot-card {
        flex-wrap: wrap;
        gap: 10px;
    }
    .bot-card-body {
        flex: 1 1 calc(100% - 68px);
        min-width: 0;
    }
    .bot-card-right {
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        text-align: left;
        padding-left: 58px;
    }
    .bot-status-row {
        justify-content: flex-start;
    }
    .bot-caps {
        flex-wrap: wrap;
    }
    .bot-cap-tag {
        font-size: 8px;
        padding: 0 4px;
    }
    .adapter-status-chip {
        font-size: 9px;
        padding: 0 5px;
    }

    /* 模块详情 */
    .module-detail-row {
        gap: 6px;
    }
    .module-detail-item {
        font-size: 11px;
    }

    /* 商店标签 */
    .store-tag-chip {
        font-size: 10px;
        padding: 2px 7px;
    }
    #storeTags {
        gap: 4px;
    }
    .store-card-tags {
        gap: 3px;
    }
    .store-card-tag {
        font-size: 8px;
        padding: 0 4px;
    }
}


/* 自定义主题编辑器（变量表单样式；容器布局见 custom-theme-box 一节） */
.ct-group {
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    padding: 12px;
}
.ct-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tx-s);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--bd);
}
.ct-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}
.ct-label {
    min-width: 110px;
    font-size: 12px;
    color: var(--tx-p);
    flex-shrink: 0;
}
.ct-color {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid var(--bd);
    border-radius: var(--radius-xs);
    cursor: pointer;
    flex-shrink: 0;
    background: none;
}
.ct-color::-webkit-color-swatch-wrapper { padding: 0; }
.ct-color::-webkit-color-swatch { border: none; border-radius: 4px; }
.ct-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-xs);
    background: var(--bg-s);
    color: var(--tx-p);
    font-family: monospace;
    font-size: 12px;
}
.ct-input:disabled, .ct-color:disabled { opacity: 0.5; cursor: not-allowed; }
.font-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 112px));
    gap: 10px;
    margin: 4px 0;
}

.font-card {
    border: 2px solid var(--bd);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    cursor: pointer;
    background: var(--bg-t);
    text-align: center;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.font-card.active {
    border-color: var(--accent);
}

.font-card-preview {
    font-size: 28px;
    line-height: 1;
    color: var(--tx-p);
}

.font-card-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--tx-s);
}

.lang-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 148px));
    justify-content: center;
    gap: 8px;
    margin: 4px 0;
}

.lang-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 2px solid var(--bd);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-t);
    user-select: none;
}

.lang-card.active {
    border-color: var(--accent);
}

.lang-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--tx-p);
}


/* ════════════════ 默认起始页选择器（主页 pin 选择器同款） ════════════════ */

.default-page-picker {
    position: relative;
}

.dp-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 180px;
    cursor: pointer;
    font-family: inherit;
}

.dp-toggle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-toggle svg {
    width: 14px;
    height: 14px;
    flex: none;
    color: var(--tx-t);
}

/* 定位/宽高/翻转由 EP.positionList 接管（fixed，逃出卡片 overflow 裁剪） */
.dp-panel {
    z-index: 1300;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    background: var(--bg-t);
    box-shadow: var(--shadow-hover);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.dp-icon {
    flex: none;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dp-icon svg {
    width: 16px;
    height: 16px;
}

.dp-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-check {
    margin-left: auto;
    color: var(--accent);
    display: flex;
    flex: none;
}



/* ════════════════ 字体上传 / 删除 ════════════════ */

.font-card {
    position: relative;
}

.font-card-del {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--tx-t);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.font-card:hover .font-card-del {
    display: block;
}

.font-card-del:hover {
    color: var(--er-c);
    background: var(--bg-s);
}

.font-card-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--bd);
    color: var(--tx-t);
    font-size: 20px;
    min-height: 74px;
    cursor: pointer;
}

.font-card-upload:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── 移动端优化：settings-item 堆叠防文字挤压（瓦片由 auto-fill 自行换行） ── */
@media (max-width: 768px) {
    .settings-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .settings-item > .settings-item-control {
        width: 100%;
        justify-content: flex-end;
    }
    .settings-item > div:first-child {
        width: 100%;
    }
}

/* ── 访问令牌（原安全页迁移）：令牌预览代码块 ── */
.settings-token-code {
    margin: 0;
    padding: 10px 12px;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--tx-p);
    background: var(--bg-s);
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    word-break: break-all;
    user-select: all;
}

/* ── 令牌生成艺术（确定性 SVG，随令牌变化） ── */
.token-art-wrap {
    margin-bottom: 14px;
    border: 1px solid var(--bd);
    border-radius: var(--radius-md);
    background: var(--bg-s);
    overflow: hidden;
    line-height: 0;
}
.token-art {
    display: block;
    width: 100%;
    height: 84px;
}

/* ══════════ 移动端/触屏：设置页触控目标 + 字体卡删除按钮常显 ══════════ */
@media (max-width: 768px) {
    .settings-nav-item {
        min-height: 44px;
    }

    .ep-combobox-trigger {
        min-height: 40px;
    }
}

/* 触屏无 hover：自定义字体删除按钮常显（并放大到可点尺寸） */
@media (max-width: 768px), (hover: none) {
    .font-card-del {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        top: 4px;
        right: 4px;
        font-size: 16px;
        background: var(--bg-t);
        border: 1px solid var(--bd);
    }
}

/* 设置详情返回按钮：触屏目标 40px */
@media (max-width: 768px) {
    .settings-back {
        width: 40px;
        height: 40px;
    }
}
