/* ============================================================
   beautify.css · 美化 App / 主题切换器
   ============================================================ */

.beautify-page {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0 4px;
    position: relative;
}
.beautify-page.active { display: flex; }

.beautify-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.beautify-back {
    width: 24px;
    font-size: 24px;
    line-height: 1;
    color: var(--primary);
    cursor: pointer;
}
.beautify-title {
    flex: 1;
    font-family: 'WenJinMincho', 'Noto Serif SC', serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--text);
}
.beautify-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.beautify-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 0 28px;
}
.beautify-intro {
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-dim);
}
.beautify-intro b { color: var(--text); font-weight: 500; }

.theme-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.theme-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
    overflow: hidden;
}
.theme-card:hover { border-color: var(--primary); }
.theme-card.active {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}
.theme-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.theme-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--primary);
    text-transform: uppercase;
}
.theme-card h3 {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}
.theme-check {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 999px;
    padding: 2px 8px;
    opacity: 0;
}
.theme-card.active .theme-check { opacity: 1; }

.theme-desc {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-dim);
}

.theme-mini {
    position: relative;
    height: 86px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.theme-mini-noise {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) .5px, transparent .5px);
    background-size: 3px 3px;
    opacity: .25;
    pointer-events: none;
}
.theme-mini-time {
    position: relative;
    z-index: 1;
    font-size: 30px;
    line-height: .9;
    letter-spacing: -.04em;
}
.theme-mini-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
}
.theme-mini-ticket {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border: 1px solid currentColor;
    border-radius: 2px;
}

.theme-swatches {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}
.theme-swatches i {
    height: 16px;
    flex: 1;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.theme-apply {
    width: 100%;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.theme-card.active .theme-apply {
    background: var(--primary);
    color: #140B11;
    border-color: var(--primary);
}
.theme-apply:active { transform: translateY(1px); }

.beautify-note {
    margin-top: 14px;
    font-size: 10px;
    line-height: 1.6;
    color: var(--text-dim);
    opacity: .8;
}

@media (min-width: 560px) {
    .theme-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== 聊天皮肤 ===== */
.beautify-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--text-dim);
    text-transform: uppercase;
}
.beautify-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .12), transparent);
}
.chat-skin-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.chat-skin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.chat-skin-card:hover { border-color: var(--primary); }
.chat-skin-card.active {
    border-color: var(--primary);
    background: rgba(255, 255, 255, .06);
}
.cs-mini {
    position: relative;
    width: 58px;
    height: 42px;
    flex: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}
.cs-bubble {
    width: 26px;
    height: 10px;
    border-radius: 5px;
}
.cs-bubble.me {
    align-self: flex-end;
}
.cs-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cs-name { font-size: 13px; color: var(--text); }
.cs-desc { font-size: 10px; color: var(--text-dim); }
.cs-check {
    flex: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: .06em;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 999px;
    padding: 2px 7px;
    opacity: 0;
}
.chat-skin-card.active .cs-check { opacity: 1; }

@media (min-width: 560px) {
    .chat-skin-list { grid-template-columns: 1fr 1fr; }
}

/* ===== 日间 / 夜间 / 混搭 ===== */
.mode-bar {
    display: flex;
    gap: 5px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}
.mode-btn {
    flex: 1;
    padding: 8px 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.mode-btn.active {
    background: var(--primary);
    color: #170B13;
    font-weight: 500;
}
.mode-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin: 0 0 12px 2px;
    line-height: 1.5;
}
.mode-toggle {
    flex: none;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
}
.mode-toggle.is-day {
    border-color: rgba(232, 201, 138, .8);
    color: #E8C98A;
}

/* ===== 聊天外观入口 ===== */
.look-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.look-entry:hover { border-color: var(--primary); }
.look-entry-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.look-entry-title { font-size: 13px; color: var(--text); }
.look-entry-desc { font-size: 10px; color: var(--text-dim); }
.look-entry-arrow { font-size: 16px; color: var(--text-dim); }

html[data-mode="day"] .look-entry {
    background: rgba(0, 0, 0, .02);
    border-color: rgba(0, 0, 0, .12);
}
html[data-mode="day"] .look-entry-title { color: rgba(0, 0, 0, .82); }
html[data-mode="day"] .look-entry-desc { color: rgba(0, 0, 0, .48); }
html[data-mode="day"] .look-entry-arrow { color: rgba(0, 0, 0, .4); }

/* 日间：分组小标题在浅底上原本太淡，几乎看不见 */
html[data-mode="day"] .beautify-section-title { color: rgba(36, 26, 34, .5); }
html[data-mode="day"] .beautify-section-title::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, .12), transparent);
}
html[data-mode="day"] .beautify-note { color: rgba(36, 26, 34, .45); }
html[data-mode="day"] .beautify-intro { color: rgba(36, 26, 34, .55); }
html[data-mode="day"] .beautify-intro b { color: rgba(36, 26, 34, .86); }

/* ===== 通话外观：分层脸 / 通话背景 ===== */
.cv-group {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
}
.cv-group-title {
    margin: 0 0 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--primary);
}
.cv-hint {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.65;
    color: var(--text-dim);
}
.cv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.cv-row:hover { border-color: var(--primary); }
.cv-row-static { cursor: default; }
.cv-row-static:hover { border-color: var(--border); }
.cv-av {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-dim);
    background-color: rgba(255, 255, 255, .08);
    background-size: cover;
    background-position: center;
}
.cv-thumb {
    width: 44px;
    height: 32px;
    flex: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    background-color: rgba(255, 255, 255, .06);
    background-size: cover;
    background-position: center;
}
.cv-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cv-row-name {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cv-row-desc { font-size: 10px; color: var(--text-dim); }
/* 立绘行右侧的「上传 / 修改」 */
.cv-row-act {
    flex: none;
    font-size: 11px;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(212, 106, 147, .40);
}
.cv-av-empty {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    color: var(--text-dim);
}

.cv-sw {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    transition: background .2s;
}
.cv-sw i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    transition: transform .2s;
}
.cv-sw.on { background: var(--primary); }
.cv-sw.on i { transform: translateX(16px); }

.cv-del {
    flex: none;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}
.cv-del:hover { color: #F09AA8; border-color: rgba(226, 74, 92, .5); }

.cv-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.cv-input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
}
.cv-input::placeholder { color: var(--text-dim); opacity: .75; }
.cv-input:focus { outline: none; border-color: var(--primary); }
.cv-addbtn {
    flex: none;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
.cv-empty {
    padding: 16px 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-dim);
    text-align: center;
}

html[data-mode="day"] .cv-group {
    background: rgba(0, 0, 0, .015);
    border-color: rgba(0, 0, 0, .1);
}
html[data-mode="day"] .cv-group-title { color: #B85A80; }
html[data-mode="day"] .cv-hint { color: rgba(36, 26, 34, .5); }
html[data-mode="day"] .cv-row {
    background: rgba(0, 0, 0, .02);
    border-color: rgba(0, 0, 0, .11);
    color: rgba(36, 26, 34, .86);
}
html[data-mode="day"] .cv-row:hover { border-color: #B85A80; }
html[data-mode="day"] .cv-row-static:hover { border-color: rgba(0, 0, 0, .11); }
html[data-mode="day"] .cv-av {
    background-color: rgba(0, 0, 0, .06);
    color: rgba(36, 26, 34, .55);
}
html[data-mode="day"] .cv-thumb {
    border-color: rgba(0, 0, 0, .1);
    background-color: rgba(0, 0, 0, .05);
}
html[data-mode="day"] .cv-row-name { color: rgba(36, 26, 34, .86); }
html[data-mode="day"] .cv-row-desc { color: rgba(36, 26, 34, .46); }
html[data-mode="day"] .cv-sw { background: rgba(0, 0, 0, .16); }
html[data-mode="day"] .cv-sw.on { background: #B85A80; }
html[data-mode="day"] .cv-del {
    border-color: rgba(0, 0, 0, .12);
    color: rgba(36, 26, 34, .5);
}
html[data-mode="day"] .cv-input {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, .12);
    color: rgba(36, 26, 34, .86);
}
html[data-mode="day"] .cv-input::placeholder { color: rgba(36, 26, 34, .4); }
html[data-mode="day"] .cv-addbtn { border-color: #B85A80; color: #B85A80; }
html[data-mode="day"] .cv-empty {
    border-color: rgba(0, 0, 0, .14);
    color: rgba(36, 26, 34, .46);
}