/**
 * 星遇 (Contact) App - 档案馆美学样式
 * 完全重写版本 - 米白 + 墨黑 + 复古金配色
 * 移除所有毛玻璃效果，提升性能
 */

/* ================= 字体引入（本地 + 国内 CDN，font-display:swap）================= */
/* Inter - 极简数字/英文无衬线体 */
@font-face {
    font-family: 'Inter';
    src: url('../../assets/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../../assets/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Playfair Display - 高级英文衬线体 */
@font-face {
    font-family: 'Playfair Display';
    src: url('../../assets/fonts/PlayfairDisplay-Regular.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Playfair Display';
    src: url('../../assets/fonts/PlayfairDisplay-Bold.woff2') format('woff2');
    font-weight: 600 800;
    font-style: normal;
    font-display: swap;
}

/* Noto Serif SC - 思源宋体 */
/* 暂不走外网 CDN（国内可用 CDN 不稳定），直接 fallback 到系统衬线字体 */
/* 用户机器一般都有"宋体" / "STSong" / "PingFang SC"，视觉差异极小 */
/* 如需精确效果，可手动下载 NotoSerifSC-Regular.woff2 + NotoSerifSC-Medium.woff2 放到 assets/fonts/ */

/* ================= CSS 变量定义 ================= */
:root {
    /* 主色调 - 档案馆美学 */
    --ct-bg: #F5F5F3;           /* 米白背景 */
    --ct-ink: #1A1A1A;          /* 墨黑文字 */
    --ct-gold: #A3927D;         /* 复古金 */

    /* 衍生颜色 */
    --ct-bg-dark: #EAEAEA;      /* 深米白（外层容器） */
    --ct-bg-white: #FFFFFF;     /* 纯白 */
    --ct-border: rgba(26, 26, 26, 0.1);  /* 边框色 */
    --ct-shadow: rgba(26, 26, 26, 0.04); /* 阴影色 */

    /* 透明度颜色辅助变量（用于夜间模式自动切换） */
    --ct-ink-04: rgba(26, 26, 26, 0.04);
    --ct-ink-05: rgba(26, 26, 26, 0.05);
    --ct-ink-10: rgba(26, 26, 26, 0.1);
    --ct-ink-20: rgba(26, 26, 26, 0.2);
    --ct-ink-30: rgba(26, 26, 26, 0.3);
    --ct-ink-40: rgba(26, 26, 26, 0.4);
    --ct-ink-50: rgba(26, 26, 26, 0.5);
    --ct-ink-70: rgba(26, 26, 26, 0.7);
    --ct-ink-80: rgba(26, 26, 26, 0.8);
    --ct-ink-90: rgba(26, 26, 26, 0.9);
    /* 遮罩/Toast 专用：日夜统一保持深色 */
    --ct-mask: rgba(26, 26, 26, 0.7);
    --ct-toast-bg: rgba(26, 26, 26, 0.9);
    --ct-bg-overlay: rgba(245, 245, 243, 0.95);
    --ct-white: #FFFFFF;
    --ct-white-50: rgba(255, 255, 255, 0.5);
    --ct-white-hover: #f9f9f9;

    /* 好感度颜色系统（14级） */
    /* 正面好感度（红色系） */
    --ct-aff-90: #881337;   /* 挚爱 */
    --ct-aff-75: #9F1239;   /* 深爱 */
    --ct-aff-60: #BE123C;   /* 喜欢 */
    --ct-aff-45: #E11D48;   /* 好感 */

    /* 中性好感度（墨黑） */
    --ct-aff-30: #1A1A1A;   /* 友好 */
    --ct-aff-15: #1A1A1A;   /* 认识 */
    --ct-aff-0: #1A1A1A;    /* 陌生 */
    --ct-aff-n15: #1A1A1A;  /* 疏远 */
    --ct-aff-n30: #1A1A1A;  /* 反感 */
    --ct-aff-n45: #1A1A1A;  /* 厌恶 */
    --ct-aff-n60: #1A1A1A;  /* 仇恨 */
    --ct-aff-n75: #1A1A1A;  /* 死敌 */
    --ct-aff-n100: #1A1A1A; /* 宿敌 */

    /* 间距系统（4px基准） */
    --ct-space-1: 4px;
    --ct-space-2: 8px;
    --ct-space-3: 12px;
    --ct-space-4: 16px;
    --ct-space-5: 20px;
    --ct-space-6: 24px;
    --ct-space-8: 32px;
    --ct-space-10: 40px;

    /* 圆角系统 */
    --ct-radius-sm: 8px;
    --ct-radius-md: 12px;
    --ct-radius-lg: 16px;
    --ct-radius-xl: 20px;
    --ct-radius-2xl: 24px;
    --ct-radius-full: 9999px;

    /* 字体大小 */
    --ct-text-xs: 8px;
    --ct-text-sm: 9px;
    --ct-text-base: 10px;
    --ct-text-md: 11px;
    --ct-text-lg: 13px;
    --ct-text-xl: 14px;
    --ct-text-2xl: 17px;
    --ct-text-3xl: 22px;
    --ct-text-4xl: 24px;
}

/* 夜间模式 - Midnight Archive */
/* ⚠️ #contact-edit 是与 #contact 同级的独立 .page，必须显式纳入作用域，否则编辑/弹窗页读不到夜间变量 */
body.dark-mode #contact,
body.dark-mode #contact-edit,
body.night #contact,
body.night #contact-edit {
    /* 主色调 */
    --ct-bg: #0A0A0A;           /* 极黑底色 */
    --ct-ink: #F5F5F5;          /* 高对比度反白 */
    --ct-gold: #A3927D;         /* 复古金（保持不变） */

    /* 衍生颜色 */
    --ct-bg-dark: #000000;      /* 纯黑外层容器 */
    --ct-bg-white: #151515;     /* 深灰卡片（替代白色） */
    --ct-border: #333333;       /* 暗灰边框 */
    --ct-shadow: rgba(0, 0, 0, 0.3); /* 深色阴影 */

    /* 透明度辅助变量 - 夜间反转 */
    --ct-ink-04: rgba(245, 245, 245, 0.04);
    --ct-ink-05: rgba(245, 245, 245, 0.05);
    --ct-ink-10: rgba(245, 245, 245, 0.1);
    --ct-ink-20: rgba(245, 245, 245, 0.2);
    --ct-ink-30: rgba(245, 245, 245, 0.3);
    --ct-ink-40: rgba(245, 245, 245, 0.4);
    --ct-ink-50: rgba(245, 245, 245, 0.5);
    --ct-ink-70: rgba(245, 245, 245, 0.7);
    --ct-ink-80: rgba(245, 245, 245, 0.8);
    --ct-ink-90: rgba(245, 245, 245, 0.9);
    /* 遮罩/Toast 夜间加深 */
    --ct-mask: rgba(0, 0, 0, 0.85);
    --ct-toast-bg: rgba(20, 20, 20, 0.95);
    --ct-bg-overlay: rgba(10, 10, 10, 0.95);
    --ct-white: #151515;
    --ct-white-50: rgba(21, 21, 21, 0.5);
    --ct-white-hover: #1e1e1e;

    /* 中性好感度夜间版 */
    --ct-aff-30: #F5F5F5;
    --ct-aff-15: #F5F5F5;
    --ct-aff-0: #F5F5F5;
    --ct-aff-n15: #F5F5F5;
    --ct-aff-n30: #F5F5F5;
    --ct-aff-n45: #F5F5F5;
    --ct-aff-n60: #F5F5F5;
    --ct-aff-n75: #F5F5F5;
    --ct-aff-n100: #F5F5F5;
}

/* ================= 基础容器 ================= */
#contact {
    background: var(--ct-bg) !important;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ================= 列表页容器 ================= */
/* !important 覆盖 apps-styles.css 中 .contact-page { background: var(--app-bg) !important } */
.contact-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--ct-bg) !important;
    color: var(--ct-ink);
    position: relative;
    overflow: hidden;
}

/* ================= 导航栏 ================= */
.contact-page .ct-nav-header {
    padding-top: 68px;
    padding-left: var(--ct-space-6);
    padding-right: var(--ct-space-6);
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ct-bg);
    border-bottom: 1px solid var(--ct-border);
}

.contact-page .ct-nav-content {
    padding-bottom: var(--ct-space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-page .ct-nav-back-btn {
    padding: var(--ct-space-2);
    margin-left: calc(var(--ct-space-2) * -1);
    color: var(--ct-ink-40);
    transition: color 0.25s;
    background: none;
    border: none;
    cursor: pointer;
}

.contact-page .ct-nav-back-btn:hover {
    color: var(--ct-ink);
}

.contact-page .ct-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.contact-page .ct-nav-subtitle {
    font-size: var(--ct-text-xs);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ct-gold);
    margin-bottom: 4px;
}

.contact-page .ct-nav-title {
    font-size: var(--ct-text-2xl);
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ================= 按钮 ================= */
.ct-nav-menu-wrap {
    position: relative;
    font-family: 'Inter', sans-serif;
}

.ct-nav-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 160px;
    background: var(--ct-white);
    border: 1px solid var(--ct-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: var(--ct-radius-lg);
    z-index: 100;
    padding: 4px 0;
    overflow: hidden;
    font-family: 'Noto Sans SC', sans-serif;
    display: none;
}

.ct-nav-dropdown.active {
    display: block;
    animation: slideInFromTop 0.2s ease-out;
}

.ct-icon-btn {
    padding: var(--ct-space-2);
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius-full);
    transition: all 0.25s;
    background: transparent;
    color: var(--ct-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ct-icon-btn:hover {
    background: var(--ct-ink);
    color: white;
}

.ct-primary-btn {
    background: var(--ct-ink);
    color: white;
    padding: 0 var(--ct-space-5);
    height: 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: var(--ct-text-sm);
    letter-spacing: 0.2em;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: var(--ct-space-2);
    border-radius: var(--ct-radius-full);
    border: none;
    cursor: pointer;
}

.ct-primary-btn:active {
    transform: scale(0.95);
}

.ct-done-btn {
    padding: 6px var(--ct-space-4);
    font-size: var(--ct-text-md);
    font-weight: 500;
    background: var(--ct-ink);
    color: white;
    border-radius: var(--ct-radius-full);
    transition: transform 0.25s;
    border: none;
    cursor: pointer;
    font-family: 'Noto Sans SC', sans-serif;
}

.ct-done-btn:active {
    transform: scale(0.95);
}

/* ================= 下拉菜单 ================= */
.ct-menu-container {
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* 编辑页下拉选择器 */
.ct-dropdown {
    position: relative;
    width: 100%;
}

.ct-dropdown-trigger {
    width: 100%;
    padding: var(--ct-space-3) var(--ct-space-4);
    background: var(--ct-white);
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: var(--ct-text-md);
}

.ct-dropdown-trigger:hover {
    border-color: var(--ct-ink);
}

.ct-dropdown.open .ct-dropdown-trigger {
    border-color: var(--ct-ink);
}

/* 已选中态：黑底白字胶囊（默认白胶囊 → 选完变黑胶囊）*/
.ct-dropdown.has-value .ct-dropdown-trigger {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: white;
}

.ct-dropdown.has-value .ct-dropdown-arrow {
    color: rgba(255, 255, 255, 0.6);
}

.ct-dropdown.has-value.open .ct-dropdown-trigger {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: white;
}

.ct-dropdown-arrow {
    font-size: var(--ct-text-lg);
    color: var(--ct-ink-40);
    transition: transform 0.25s;
}

.ct-dropdown.open .ct-dropdown-arrow {
    transform: rotate(180deg);
}

.ct-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--ct-white);
    border: 1px solid var(--ct-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: var(--ct-radius-lg);
    z-index: 100;
    padding: 4px 0;
    overflow: hidden;
    font-family: 'Noto Sans SC', sans-serif;
    display: none;
    max-height: 240px;
    overflow-y: auto;
}

.ct-dropdown.open .ct-dropdown-menu {
    display: block;
    animation: slideInFromTop 0.2s ease-out;
}

.ct-dropdown-item {
    width: 100%;
    padding: 12px var(--ct-space-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--ct-text-md);
    transition: background 0.25s;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--ct-ink);
}

.ct-dropdown-item:hover {
    background: var(--ct-bg);
}

.ct-dropdown-item.ct-dropdown-option-selected {
    background: rgba(163, 146, 125, 0.1);
    color: var(--ct-gold);
}

.ct-dropdown-item.ct-dropdown-option-unbind {
    color: var(--ct-ink-40);
}

/* 导航栏下拉菜单 */
.ct-dropdown-menu.active {
    display: block;
    animation: slideInFromTop 0.2s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ct-menu-item {
    width: 100%;
    padding: 14px var(--ct-space-5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--ct-text-md);
    font-weight: 500;
    transition: background 0.25s;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--ct-ink);
}

.ct-menu-item:hover {
    background: var(--ct-bg);
}

.ct-menu-item.danger {
    color: #A52A2A;
}

.ct-menu-divider {
    height: 1px;
    background: var(--ct-ink-05);
    margin: 4px 12px;
}

/* ================= 列表内容区域 ================= */
.ct-list-content {
    padding: 0 var(--ct-space-6);
    margin-top: var(--ct-space-8);
    overflow-y: auto;
    padding-bottom: 128px;
    flex: 1;
    animation: fadeIn 0.7s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ct-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 160px 0;
    opacity: 0.3;
    font-family: 'Inter', sans-serif;
}

.ct-empty-state i {
    font-size: 32px;
}

.ct-empty-state p {
    margin-top: var(--ct-space-4);
    font-size: var(--ct-text-base);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-family: 'Noto Sans SC', sans-serif;
}

.ct-char-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ================= 角色卡片 ================= */
.ct-char-card {
    display: flex;
    gap: var(--ct-space-6);
    position: relative;
    cursor: pointer;
}

.ct-char-card.reverse {
    flex-direction: row-reverse;
}

.ct-char-card-left {
    width: 45%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.ct-char-avatar-frame {
    aspect-ratio: 3/4;
    width: 100%;
    /* 实体相框：纯白底色，无视夜间模式（拍立得本就是白纸印的） */
    background: #FFFFFF;
    /* p-1.5 = 6px 四边相等的内边距 */
    padding: 6px;
    /* 底部加宽留白：模拟拍立得"可写字"的厚边 */
    padding-bottom: 20px;
    /* shadow-xl 等价：模拟纸张悬浮在档案上的厚度 */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.12),
        0 8px 10px -6px rgba(0, 0, 0, 0.08);
    /* rounded-sm：相片是直角或微圆角，比大圆角更像实物 */
    border-radius: 2px;
    /* will-change 预合成图层，translate + rotate 走 GPU 不触发 reflow */
    will-change: transform;
    transform-origin: center center;
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* hover（桌面）/ active（手机手指按住）：translateY -4px + 1° 微旋转（GPU 合成层，零 reflow）*/
.ct-char-card:hover .ct-char-avatar-frame,
.ct-char-card:active .ct-char-avatar-frame {
    transform: translateY(-4px) rotate(1deg);
    box-shadow:
        0 25px 35px -8px rgba(0, 0, 0, 0.18),
        0 12px 15px -6px rgba(0, 0, 0, 0.12);
}

/* 反向卡片镜像旋转（左右对称更自然）*/
.ct-char-card.reverse:hover .ct-char-avatar-frame,
.ct-char-card.reverse:active .ct-char-avatar-frame {
    transform: translateY(-4px) rotate(-1deg);
}

.ct-char-avatar-frame img {
    position: absolute;
    /* 与 padding 同步：6px 四边、20px 底部 */
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 20px;
    width: calc(100% - 12px);
    height: calc(100% - 6px - 20px);
    object-fit: cover;
    filter: grayscale(15%);
    transition: filter 0.7s;
}

.ct-char-card:hover .ct-char-avatar-frame img,
.ct-char-card:active .ct-char-avatar-frame img {
    filter: grayscale(0%);
}

.ct-char-avatar-id {
    position: absolute;
    bottom: 4px;
    right: 12px;
    font-size: var(--ct-text-xs);
    font-family: 'Inter', sans-serif;
    opacity: 0.3;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ct-char-affection-box {
    margin-top: var(--ct-space-4);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--ct-white-50);
    border: 1px solid var(--ct-ink-05);
    padding: 10px 12px;
    border-radius: var(--ct-radius-md);
    box-shadow: 0 1px 2px 0 var(--ct-shadow);
}

/* header 改成上下两行：避免横向 45% 卡片宽度下中英双语挤断 */
.ct-char-affection-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-family: 'Inter', sans-serif;
}

.ct-char-affection-label {
    font-size: var(--ct-text-xs);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ct-ink-40);
    white-space: nowrap;
    line-height: 1.4;
}

.ct-char-affection-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

/* 好感度颜色动态设置 */
.ct-char-affection-value[data-affection-level="90"] { color: var(--ct-aff-90); }
.ct-char-affection-value[data-affection-level="75"] { color: var(--ct-aff-75); }
.ct-char-affection-value[data-affection-level="60"] { color: var(--ct-aff-60); }
.ct-char-affection-value[data-affection-level="45"] { color: var(--ct-aff-45); }
.ct-char-affection-value[data-affection-level="30"],
.ct-char-affection-value[data-affection-level="15"],
.ct-char-affection-value[data-affection-level="0"],
.ct-char-affection-value[data-affection-level="-15"],
.ct-char-affection-value[data-affection-level="-30"],
.ct-char-affection-value[data-affection-level="-45"],
.ct-char-affection-value[data-affection-level="-60"],
.ct-char-affection-value[data-affection-level="-75"],
.ct-char-affection-value[data-affection-level="-100"] { color: var(--ct-aff-30); }

.ct-char-affection-number {
    font-size: 20px;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    color: currentColor;
}

.ct-char-affection-level {
    font-size: var(--ct-text-sm);
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    color: currentColor;
}

.ct-char-affection-text {
    font-size: var(--ct-text-sm);
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
}

.ct-char-affection-bar {
    display: flex;
    gap: 2px;
    height: 6px;
    width: 100%;
}

.ct-char-affection-segment {
    flex: 1;
    border-radius: var(--ct-radius-full);
    background: var(--ct-ink-10);
}

.ct-char-affection-segment.filled {
    background: currentColor;
}

/* 编辑页好感度徽章颜色 */
.ct-affection-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--ct-radius-full);
    font-size: var(--ct-text-sm);
    font-weight: 500;
}

.ct-affection-badge[data-affection-level="90"] {
    background: var(--ct-aff-90);
    color: white;
}
.ct-affection-badge[data-affection-level="75"] {
    background: var(--ct-aff-75);
    color: white;
}
.ct-affection-badge[data-affection-level="60"] {
    background: var(--ct-aff-60);
    color: white;
}
.ct-affection-badge[data-affection-level="45"] {
    background: var(--ct-aff-45);
    color: white;
}

.ct-affection-badge[data-affection-level="30"],
.ct-affection-badge[data-affection-level="15"],
.ct-affection-badge[data-affection-level="0"],
.ct-affection-badge[data-affection-level="-15"],
.ct-affection-badge[data-affection-level="-30"],
.ct-affection-badge[data-affection-level="-45"],
.ct-affection-badge[data-affection-level="-60"],
.ct-affection-badge[data-affection-level="-75"],
.ct-affection-badge[data-affection-level="-100"] {
    background: var(--ct-ink);
    color: var(--ct-bg);
}

/* ================= 角色卡片右侧信息 ================= */
.ct-char-card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 4px;
    padding-bottom: 4px;
    position: relative;
}

.ct-char-card.reverse .ct-char-card-right {
    text-align: right;
    align-items: flex-end;
}

.ct-char-file-number {
    font-size: var(--ct-text-xs);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ct-ink-30);
    margin-bottom: var(--ct-space-2);
}

.ct-char-name {
    font-size: var(--ct-text-4xl);
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-weight: 500;
    line-height: 1.625;
    padding-bottom: var(--ct-space-2);
    color: var(--ct-ink);
    transition: color 0.25s;
    margin-bottom: var(--ct-space-2);
    word-break: break-word;
}

.ct-char-card:hover .ct-char-name,
.ct-char-card:active .ct-char-name {
    color: var(--ct-gold);
}

.ct-char-info-sections {
    display: flex;
    flex-direction: column;
    gap: var(--ct-space-4);
    width: 100%;
}

.ct-char-info-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.ct-char-card.reverse .ct-char-info-section {
    align-items: flex-end;
}

.ct-char-info-label {
    font-size: var(--ct-text-xs);
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ct-ink-40);
}

.ct-char-info-label.gold,
.ct-char-info-label.ct-label-gold {
    color: var(--ct-gold);
}

.ct-char-bound {
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 1px solid var(--ct-border);
    display: inline-block;
}

.ct-char-info-value {
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 1px solid var(--ct-border);
    display: inline-block;
}

.ct-char-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ct-char-card.reverse .ct-char-tags {
    justify-content: flex-end;
}

.ct-char-tag {
    font-size: var(--ct-text-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 2px var(--ct-space-2);
    background: var(--ct-ink-05);
    color: var(--ct-ink-80);
    border-radius: 4px;
}

/* 关系组标题颜色 */
.ct-relation-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--ct-text-sm);
    font-weight: 600;
    margin-bottom: 8px;
}

.ct-relation-group-header[data-type="encounter"] {
    color: #4a90e2;
}

.ct-relation-group-header[data-type="beings"] {
    color: #50a18e;
}

.ct-relation-group-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.ct-char-behavior {
    font-size: var(--ct-text-md);
    line-height: 1.625;
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ct-ink-70);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ct-char-card:not(.reverse) .ct-char-behavior {
    text-align: justify;
}

.ct-char-card.reverse .ct-char-behavior {
    text-align: right;
}

/* ================= 管理模式覆盖层 ================= */
.ct-manage-overlay {
    position: absolute;
    inset: -12px;
    background: var(--ct-bg-overlay);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(165, 42, 42, 0.2);
    border-radius: var(--ct-radius-lg);
    animation: fadeIn 0.2s ease-out;
}

.ct-delete-btn {
    background: #A52A2A;
    color: white;
    padding: 12px var(--ct-space-6);
    border-radius: var(--ct-radius-full);
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 20px 40px rgba(165, 42, 42, 0.3);
    display: flex;
    align-items: center;
    gap: var(--ct-space-2);
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.ct-delete-btn:hover {
    background: #8B0000;
    transform: scale(1.05);
}

.ct-delete-btn:active {
    transform: scale(0.95);
}

/* ================= 删除确认弹窗 ================= */
/* contact.js 动态创建的弹窗使用 .overlay.active + .ct-modal */
/* 用 :has() 选择器匹配所有内嵌 .ct-modal 的 overlay，避免依赖 id 前缀 */
/* 同时高优先级覆盖 modal-glass.css 的 !important 毛玻璃强制规则 */
.overlay.active:has(> .ct-modal),
.overlay.active:has(> .ct-modal-overlay),
#contact .overlay.active,
#contact-edit .overlay.active,
.overlay.active[id^="contact-"],
.overlay.active[id^="glim-"],
.overlay.active[id^="url-input"],
.overlay.active[id^="poster-"],
.overlay.active[id^="create-"] {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--ct-mask) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: var(--ct-space-6) !important;
}

/* .ct-modal 本身不被 modal-glass 命中，但额外加保险，防止其他规则污染 */
.overlay.active > .ct-modal {
    background: var(--ct-bg) !important;
    color: var(--ct-ink) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.overlay.active > .ct-modal h3,
.overlay.active > .ct-modal h4,
.overlay.active > .ct-modal p,
.overlay.active > .ct-modal span:not(.ct-required-mark),
.overlay.active > .ct-modal label {
    color: var(--ct-ink) !important;
}

.ct-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--ct-mask);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ct-space-6);
    animation: fadeIn 0.2s ease-out;
}

.ct-modal {
    background: var(--ct-bg);
    width: 100%;
    max-width: 280px;
    padding: var(--ct-space-6);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomIn 0.2s ease-out;
    border: 1px solid var(--ct-border);
    text-align: center;
    font-family: 'Noto Sans SC', sans-serif;
}

.ct-modal h3 {
    font-size: var(--ct-text-md);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ct-ink);
    margin-bottom: var(--ct-space-6);
}

.ct-modal .ct-input,
.ct-modal input[type="text"] {
    width: 100%;
    background: var(--ct-white);
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius-lg);
    padding: 14px var(--ct-space-4);
    font-size: var(--ct-text-sm);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
    color: var(--ct-ink);
    outline: none;
    box-sizing: border-box;
    margin-bottom: var(--ct-space-6);
    text-transform: uppercase;
    transition: border-color 0.2s;
}

.ct-modal .ct-input:focus,
.ct-modal input[type="text"]:focus {
    border-color: var(--ct-gold);
}

.ct-modal .ct-input::placeholder,
.ct-modal input[type="text"]::placeholder {
    color: var(--ct-ink-30);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ct-modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(165, 42, 42, 0.1);
    color: #A52A2A;
    border-radius: var(--ct-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--ct-space-4);
}

.ct-modal-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: var(--ct-space-2);
}

.ct-modal-text {
    font-size: var(--ct-text-md);
    color: var(--ct-ink-50);
    margin-bottom: var(--ct-space-8);
    line-height: 1.625;
    padding: 0 var(--ct-space-2);
}

.ct-modal-actions {
    display: flex;
    gap: 12px;
}

.ct-modal-btn {
    flex: 1;
    padding: 14px 0;
    border-radius: var(--ct-radius-lg);
    font-size: var(--ct-text-md);
    font-weight: 500;
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.ct-modal-btn.secondary {
    background: var(--ct-white);
    border: 1px solid var(--ct-border);
    color: var(--ct-ink);
}

.ct-modal-btn.secondary:hover {
    background: var(--ct-white-hover);
}

.ct-modal-btn.primary {
    background: #A52A2A;
    color: white;
    box-shadow: 0 4px 12px rgba(165, 42, 42, 0.2);
}

.ct-modal-btn.primary:hover {
    background: #8B0000;
}

.ct-modal-btn:active {
    transform: scale(0.95);
}

/* ================= 定稿弹窗样式（统一规格）================= */

/* 弹窗内的 .ct-cn 中文细则 */
.ct-modal .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
    font-style: normal;
}

/* 通用：英文大写小标题 */
.ct-modal-title-en {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ct-ink-40);
    text-align: center;
    margin: 0 0 24px;
}

/* 全宽主按钮（确认）*/
.ct-modal-btn-full {
    width: 100%;
    background: var(--ct-ink);
    color: white;
    padding: 14px 0;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    transition: transform 0.2s, opacity 0.2s;
    margin-bottom: 8px;
}

.ct-modal-btn-full:active {
    transform: scale(0.96);
}

.ct-modal-btn-full:hover {
    opacity: 0.92;
}

/* 链接式取消按钮 */
.ct-modal-btn-link {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    color: var(--ct-ink-40);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: color 0.2s;
}

.ct-modal-btn-link:hover {
    color: var(--ct-ink);
}

/* === 导入浮光码弹窗 === */
.ct-modal-import {
    background: var(--ct-bg);
    width: 100%;
    max-width: 300px;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid var(--ct-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: zoomIn 0.2s ease-out;
}

.ct-modal-import .ct-input,
.ct-modal-import input[type="text"] {
    width: 100%;
    background: white;
    border: 1px solid var(--ct-border);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--ct-ink);
    text-transform: uppercase;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ct-modal-import .ct-input:focus {
    border-color: var(--ct-gold);
}

.ct-modal-import .ct-input::placeholder {
    color: var(--ct-ink-30);
}

/* === 创建档案弹窗 === */
.ct-modal-create {
    background: var(--ct-bg);
    width: 100%;
    max-width: 300px;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid var(--ct-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: zoomIn 0.2s ease-out;
}

.ct-modal-create .ct-input,
.ct-modal-create input[type="text"] {
    width: 100%;
    background: white;
    border: 1px solid var(--ct-border);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    color: var(--ct-ink);
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ct-modal-create .ct-input:focus {
    border-color: var(--ct-gold);
}

.ct-modal-create .ct-input::placeholder {
    color: var(--ct-ink-30);
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* === 上传图片弹窗（PhotoPortal）=== */
.ct-modal-photo {
    background: var(--ct-bg);
    width: 100%;
    max-width: 320px;
    padding: 32px;
    border-radius: 28px;
    border: 1px solid var(--ct-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomIn 0.2s ease-out;
    font-family: 'Inter', sans-serif;
}

.ct-modal-photo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ct-gold);
    margin-bottom: 32px;
}

.ct-modal-photo-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ct-ink);
    padding: 4px;
    font-size: 16px;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ct-modal-photo-close:hover {
    opacity: 0.5;
}

.ct-modal-photo-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ct-modal-photo-card {
    width: 100%;
    background: white;
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--ct-ink);
    letter-spacing: 0.05em;
    transition: all 0.25s;
    box-sizing: border-box;
}

.ct-modal-photo-card:hover,
.ct-modal-photo-card:active,
.ct-modal-photo-card:focus {
    background: var(--ct-ink);
    color: white;
    border-color: var(--ct-ink);
    outline: none;
}

.ct-modal-photo-card:hover .ct-modal-photo-card-label,
.ct-modal-photo-card:active .ct-modal-photo-card-label,
.ct-modal-photo-card:focus .ct-modal-photo-card-label {
    color: white;
    opacity: 1;
}

.ct-modal-photo-card:hover .ct-modal-photo-card-arrow,
.ct-modal-photo-card:active .ct-modal-photo-card-arrow,
.ct-modal-photo-card:focus .ct-modal-photo-card-arrow {
    color: white;
    opacity: 1;
}

.ct-modal-photo-card:hover i,
.ct-modal-photo-card:active i,
.ct-modal-photo-card:focus i {
    color: white;
}

.ct-modal-photo-card i {
    font-size: 14px;
    color: var(--ct-ink);
}

.ct-modal-photo-card--url {
    background: white;
    border-color: var(--ct-border);
}

.ct-modal-photo-card--url:hover,
.ct-modal-photo-card--url:active,
.ct-modal-photo-card--url:focus {
    background: var(--ct-ink);
    color: white;
}

.ct-modal-photo-card-label {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ct-ink);
    opacity: 0.6;
}

.ct-modal-photo-card-arrow {
    font-size: 14px;
    color: var(--ct-ink);
    opacity: 0.4;
}

/* ================= 自适应文本框（杂志级档案展示）================= */
.ct-textarea-auto {
    resize: none;
    width: 100%;
    background: transparent;
    outline: none;
    /* 高度过渡：高度变化也走 GPU 友好的过渡 */
    transition: height 0.2s ease;
    display: block;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    /* 关键：box-sizing 统一 border-box，让 scrollHeight 和 style.height 对齐 */
    box-sizing: border-box;
    /* 兜底：JS 自适应失败时仍可滚动（滚动条用全局规则隐藏）*/
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ct-textarea-auto::placeholder {
    color: inherit;
    opacity: 0.3;
}

/* 普通文本框：只设最小高度，不设最大高度（档案展示完整性优先）*/
.ct-textarea-auto:not(.ct-textarea-name) {
    min-height: 36px;
}

.ct-textarea-auto.ct-textarea-name {
    min-height: 44px;
}

/* ================= Toast 提示 ================= */
.ct-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--ct-toast-bg);
    color: white;
    padding: var(--ct-space-4) var(--ct-space-6);
    border-radius: var(--ct-radius-lg);
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    z-index: 9999;
    animation: toastIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ================= 滚动条隐藏（强制·全 contact 范围）================= */
/* 命中所有 contact 容器、所有 contact 弹窗、所有自适应文本框 */
#contact ::-webkit-scrollbar,
#contact-edit ::-webkit-scrollbar,
#contact::-webkit-scrollbar,
#contact-edit::-webkit-scrollbar,
.ct-modal ::-webkit-scrollbar,
.ct-modal::-webkit-scrollbar,
.ct-modal-import ::-webkit-scrollbar,
.ct-modal-import::-webkit-scrollbar,
.ct-modal-create ::-webkit-scrollbar,
.ct-modal-create::-webkit-scrollbar,
.ct-modal-photo ::-webkit-scrollbar,
.ct-modal-photo::-webkit-scrollbar,
.ct-shimmer-modal ::-webkit-scrollbar,
.ct-shimmer-modal::-webkit-scrollbar,
.ct-textarea-auto::-webkit-scrollbar,
.overlay.active::-webkit-scrollbar,
.overlay.active ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

#contact, #contact *,
#contact-edit, #contact-edit *,
.ct-modal, .ct-modal *,
.ct-modal-import, .ct-modal-import *,
.ct-modal-create, .ct-modal-create *,
.ct-modal-photo, .ct-modal-photo *,
.ct-shimmer-modal, .ct-shimmer-modal *,
.ct-textarea-auto,
.overlay.active, .overlay.active * {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* 兼容旧的 .no-scrollbar 类名（其他地方可能还在用） */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ================= 响应式 ================= */
@media (min-width: 640px) {
    /* 在大屏幕上可以添加额外样式 */
}

/* ============================================================ */
/* ============== 编辑页（按定稿完整重写）====================== */
/* ============================================================ */

/* ===== 容器 ===== */
#contact-edit {
    background: var(--ct-bg) !important;
    color: var(--ct-ink) !important;
    font-family: 'Inter', 'Noto Serif SC', sans-serif;
    -webkit-user-select: text;
    user-select: text;
}
#contact-edit ::selection {
    background: var(--ct-ink);
    color: var(--ct-bg);
}

/* ===== 顶部导航栏（sticky 黑底分割线）===== */
#contact-edit .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 60px) 24px 16px;
    position: sticky;
    top: 0;
    z-index: 110;
    background: var(--ct-bg);
    border-bottom: 1px solid var(--ct-border);
    flex-shrink: 0;
}
#contact-edit .nav-btn {
    width: 36px;
    height: 36px;
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ct-ink-40);
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.25s;
}
#contact-edit .nav-btn:hover {
    color: var(--ct-ink);
}
#contact-edit .nav-btn i {
    font-size: 22px;
    font-weight: 300;
}
#contact-edit .nav-brand {
    display: none; /* 定稿无 brand 文字 */
}

/* ===== 顶部"封存档案"按钮（黑色胶囊）===== */
#contact-edit .ct-seal-btn {
    background: var(--ct-ink);
    color: white;
    height: 32px;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.2em;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}
#contact-edit .ct-seal-btn:active {
    transform: scale(0.95);
}
#contact-edit .ct-seal-btn i {
    font-size: 12px;
    opacity: 0.5;
}
#contact-edit .ct-seal-btn .ct-seal-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: 10px;
    letter-spacing: 0.05em;
}

/* ===== 内容滚动区 ===== */
#contact-edit .edit-content-wrapper {
    flex: 1;
    padding: 24px 32px 160px;
    overflow-y: auto;
    background: var(--ct-bg);
    color: var(--ct-ink);
    /* section 之间的大间距（定稿 space-y-20 = 80px）*/
    display: flex;
    flex-direction: column;
    gap: 80px;
}
#contact-edit .edit-content-wrapper::-webkit-scrollbar {
    display: none !important;
}

/* ===== 通用 section 标题（02-07）===== */
#contact-edit .ct-sec-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
#contact-edit .ct-sec-head-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ct-ink-40);
    white-space: nowrap;
}
#contact-edit .ct-sec-head-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}
#contact-edit .ct-sec-head-line {
    flex: 1;
    height: 0.5px;
    background: var(--ct-border);
}

/* ===== 通用字段标签（小号 Inter 大写）===== */
#contact-edit .ct-fld-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--ct-ink-50);
    display: block;
    margin-bottom: 12px;
}
#contact-edit .ct-fld-label-gold {
    color: var(--ct-gold);
    letter-spacing: 0.4em;
    font-style: italic;
}
#contact-edit .ct-fld-label-red {
    color: #A52A2A;
}
#contact-edit .ct-fld-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
    font-style: normal;
}
#contact-edit .ct-fld-label-required {
    color: #A52A2A;
    margin-left: 4px;
}

/* ============================================================ */
/* ===== Section 01 · Dossier_Entry · 档案录入 ================ */
/* ============================================================ */
#contact-edit .ct-sec-01 {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 16px;
}
#contact-edit .ct-name-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--ct-border);
    padding-bottom: 16px;
    min-width: 0;
}
#contact-edit .ct-name-block .ct-fld-label {
    margin-bottom: 4px;
}
/* 姓名输入框：24px Playfair Display 衬线 */
#contact-edit .ct-name-input {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.625;
    color: var(--ct-ink);
    background: transparent;
    border: none;
    outline: none;
    padding: 4px 0 8px;
    width: 100%;
    min-height: 44px;
    resize: none;
}
#contact-edit .ct-name-input::placeholder {
    color: var(--ct-ink);
    opacity: 0.3;
}

/* 头像 + 装饰文字行 */
#contact-edit .ct-avatar-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
/* 头像：3:4 拍立得，纯白底，点击上传 */
#contact-edit .ct-avatar-large {
    width: 110px;
    aspect-ratio: 3/4;
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1px solid var(--ct-border);
    border-radius: 2px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s ease;
}
#contact-edit .ct-avatar-large:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 20px -6px rgba(0, 0, 0, 0.15),
        0 6px 10px -4px rgba(0, 0, 0, 0.1);
}
#contact-edit .ct-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%);
}
#contact-edit .ct-avatar-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 9px;
    color: rgba(26, 26, 26, 0.2);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
/* 头像 hover 出现的暗罩+相机图标 */
#contact-edit .ct-avatar-large::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.5);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
#contact-edit .ct-avatar-large:hover::after {
    opacity: 1;
}
#contact-edit .ct-avatar-camera {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
    z-index: 1;
}
#contact-edit .ct-avatar-large:hover .ct-avatar-camera {
    opacity: 1;
}

/* 头像右侧装饰文字（dot + 双语） */
#contact-edit .ct-avatar-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
    opacity: 0.4;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: 0.2em;
    line-height: 1.6;
}
#contact-edit .ct-avatar-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
#contact-edit .ct-avatar-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ct-ink);
    flex-shrink: 0;
}
#contact-edit .ct-avatar-meta-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}

/* ============================================================ */
/* ===== Section 02 · SOUL · 灵魂纪要 ========================= */
/* ============================================================ */
#contact-edit .ct-sec-body-soul {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
#contact-edit .ct-soul-dossier {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#contact-edit .ct-soul-textarea {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 2;
    color: rgba(26, 26, 26, 0.9);
    text-align: justify;
    background: transparent;
    border: none;
    outline: none;
    padding: 4px 0;
    width: 100%;
    resize: none;
    overflow-y: auto;
}
#contact-edit .ct-soul-textarea::placeholder {
    color: rgba(26, 26, 26, 0.3);
}
/* 行为指纹：左侧暗红竖线 */
#contact-edit .ct-soul-fingerprint {
    border-left: 2px solid rgba(165, 42, 42, 0.4);
    padding: 4px 0 4px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#contact-edit .ct-soul-fingerprint .ct-fld-label {
    color: #A52A2A;
    margin-bottom: 0;
}
#contact-edit .ct-fingerprint-textarea {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-style: italic;
    line-height: 1.7;
    color: var(--ct-ink);
    background: transparent;
    border: none;
    outline: none;
    padding: 4px 0;
    width: 100%;
    resize: none;
    overflow-y: auto;
}
#contact-edit .ct-fingerprint-textarea::placeholder {
    color: rgba(26, 26, 26, 0.3);
}

/* 所属位面：黑金单选胶囊（对齐档案馆风格） */
#contact-edit .ct-soul-plane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#contact-edit .ct-wv-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#contact-edit .ct-wv-chip {
    position: relative;
    overflow: hidden;
    padding: 8px 18px;
    border-radius: 9999px;
    font-family: 'Noto Serif SC', serif;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--ct-ink-10);
    color: var(--ct-ink-60, var(--ct-ink-50));
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#contact-edit .ct-wv-chip:hover {
    border-color: var(--ct-ink-30);
}
#contact-edit .ct-wv-chip.active {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: var(--ct-paper, #F5F5F3);
    padding-left: 22px;
    padding-right: 22px;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
#contact-edit .ct-wv-chip.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ct-gold);
}
/* 自定义位面胶囊：金描边 + 加号 */
#contact-edit .ct-wv-chip-custom {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-color: var(--ct-gold);
    color: var(--ct-gold);
    background: transparent;
}
#contact-edit .ct-wv-chip-custom i {
    font-size: 12px;
}
#contact-edit .ct-wv-chip-custom:hover {
    border-color: var(--ct-gold);
    opacity: 0.8;
}
#contact-edit .ct-wv-chip-custom.active {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: var(--ct-paper, #F5F5F3);
}
#contact-edit .ct-wv-chip-custom.active i {
    color: var(--ct-gold);
}
/* 自定义位面输入面板：展开动画 */
#contact-edit .ct-wv-custom-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    border-left: 2px solid var(--ct-gold);
}
#contact-edit .ct-wv-custom-panel.show {
    max-height: 180px;
    opacity: 1;
    transform: translateY(0);
    padding: 12px 16px;
}
#contact-edit .ct-wv-custom-tag {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ct-gold);
}
#contact-edit .ct-wv-custom-input {
    width: 100%;
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    color: var(--ct-ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ct-ink-10);
    outline: none;
    padding: 6px 0;
}
#contact-edit .ct-wv-custom-input:focus {
    border-bottom-color: var(--ct-gold);
}
#contact-edit .ct-wv-custom-input::placeholder {
    color: var(--ct-ink-20);
}
#contact-edit .ct-wv-custom-note {
    font-size: 10px;
    font-style: italic;
    line-height: 1.5;
    color: var(--ct-ink-30);
    margin: 0;
}
#contact-edit .ct-plane-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--ct-ink-40);
}

/* ============================================================ */
/* ===== Section 03 · GLIMMER · 羁绊网络 ====================== */
/* ============================================================ */
#contact-edit .ct-sec-body-glim {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
/* 好感度白卡 */
#contact-edit .ct-aff-card {
    background: #FFFFFF;
    padding: 24px;
    border: 1px solid var(--ct-border);
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}
#contact-edit .ct-aff-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    position: relative;
    z-index: 10;
}
#contact-edit .ct-aff-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#contact-edit .ct-aff-card-info .ct-fld-label {
    margin-bottom: 8px;
    font-style: italic;
    letter-spacing: 0.3em;
}
#contact-edit .ct-aff-num-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}
/* 大数字：48px Playfair Light */
#contact-edit .ct-aff-num {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.02em;
}
#contact-edit .ct-aff-label-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
/* 好感度按值取色（同列表页） */
#contact-edit .ct-aff-card[data-affection-level="90"] .ct-aff-num,
#contact-edit .ct-aff-card[data-affection-level="90"] .ct-aff-label-cn { color: var(--ct-aff-90); }
#contact-edit .ct-aff-card[data-affection-level="75"] .ct-aff-num,
#contact-edit .ct-aff-card[data-affection-level="75"] .ct-aff-label-cn { color: var(--ct-aff-75); }
#contact-edit .ct-aff-card[data-affection-level="60"] .ct-aff-num,
#contact-edit .ct-aff-card[data-affection-level="60"] .ct-aff-label-cn { color: var(--ct-aff-60); }
#contact-edit .ct-aff-card[data-affection-level="45"] .ct-aff-num,
#contact-edit .ct-aff-card[data-affection-level="45"] .ct-aff-label-cn { color: var(--ct-aff-45); }
/* 中性/负值用墨黑 */
#contact-edit .ct-aff-card .ct-aff-num,
#contact-edit .ct-aff-card .ct-aff-label-cn { color: var(--ct-ink); }

/* 红心图标 */
#contact-edit .ct-aff-heart {
    font-size: 32px;
    color: rgba(26, 26, 26, 0.1);
    transition: color 1s;
}
#contact-edit .ct-aff-card.heart-active .ct-aff-heart {
    color: #A52A2A;
}

/* 好感度滑块 */
#contact-edit .ct-aff-slider {
    width: 100%;
    height: 4px;
    background: rgba(26, 26, 26, 0.1);
    appearance: none;
    cursor: pointer;
    accent-color: var(--ct-ink);
    border-radius: 9999px;
}
#contact-edit .ct-aff-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--ct-ink);
    border: 2px solid var(--ct-bg);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 绑定对象 / 羁绊张力 / 屏蔽列表 一组字段 */
#contact-edit .ct-glim-fields {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
#contact-edit .ct-glim-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--ct-border);
    padding-bottom: 8px;
}
#contact-edit .ct-glim-field .ct-fld-label {
    margin-bottom: 0;
}
#contact-edit .ct-glim-select-wrap {
    position: relative;
}
#contact-edit .ct-glim-select {
    width: 100%;
    background: transparent;
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: 500;
    border: none;
    outline: none;
    appearance: none;
    cursor: pointer;
    padding: 4px 24px 4px 0;
    color: var(--ct-ink);
}
#contact-edit .ct-glim-select-arrow {
    position: absolute;
    right: 0;
    top: 4px;
    font-size: 14px;
    color: rgba(26, 26, 26, 0.3);
    pointer-events: none;
}
#contact-edit .ct-glim-textarea {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(26, 26, 26, 0.8);
    background: transparent;
    border: none;
    outline: none;
    padding: 4px 0;
    width: 100%;
    resize: none;
    overflow-y: auto;
}
#contact-edit .ct-glim-textarea::placeholder {
    color: rgba(26, 26, 26, 0.3);
}

/* 屏蔽互动区（左侧细竖线 + 两组胶囊） */
#contact-edit .ct-mute-list {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#contact-edit .ct-mute-list .ct-fld-label {
    margin-bottom: 12px;
}
#contact-edit .ct-mute-groups {
    border-left: 2px solid rgba(26, 26, 26, 0.05);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#contact-edit .ct-mute-group-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(26, 26, 26, 0.6);
    margin-bottom: 10px;
    line-height: 1;
}
#contact-edit .ct-mute-group-title .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}
#contact-edit .ct-mute-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#contact-edit .ct-mute-chip {
    padding: 6px 12px;
    border-radius: 9999px;
    font-family: 'Noto Serif SC', serif;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: rgba(26, 26, 26, 0.5);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
#contact-edit .ct-mute-chip:hover {
    border-color: rgba(26, 26, 26, 0.4);
}
#contact-edit .ct-mute-chip.blocked {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: white;
}
#contact-edit .ct-mute-chip i {
    font-size: 10px;
}
#contact-edit .ct-mute-empty {
    font-family: 'Noto Serif SC', serif;
    font-size: 11px;
    color: rgba(26, 26, 26, 0.3);
}

/* ============================================================ */
/* ===== Section 04 · APPENDIX: DIGITAL_ID 暗色面板 =========== */
/* ============================================================ */
#contact-edit .ct-sec-04 {
    padding-top: 32px;
    padding-bottom: 24px;
}
#contact-edit .ct-digital-panel {
    background: #1C1C1C;
    color: white;
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15),
                0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
/* 装饰二进制图标（角落漂浮）*/
#contact-edit .ct-digital-deco {
    position: absolute;
    right: -32px;
    bottom: -32px;
    font-size: 160px;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(12deg);
    pointer-events: none;
    line-height: 1;
}
#contact-edit .ct-digital-head {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 10;
    margin-bottom: 32px;
}
#contact-edit .ct-digital-head-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.4em;
    color: var(--ct-gold);
    white-space: nowrap;
}
#contact-edit .ct-digital-head-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}
#contact-edit .ct-digital-head-line {
    flex: 1;
    height: 0.5px;
    background: rgba(255, 255, 255, 0.1);
}
#contact-edit .ct-digital-body {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 10;
}
#contact-edit .ct-digital-id-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* 数字 ID 头像（点击触发上传）*/
#contact-edit .ct-digital-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    background: #2A2A2A;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s;
}
#contact-edit .ct-digital-avatar:active {
    transform: scale(0.95);
}
#contact-edit .ct-digital-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}
#contact-edit .ct-digital-avatar-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}
#contact-edit .ct-digital-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
#contact-edit .ct-digital-avatar:hover::after {
    opacity: 1;
}
#contact-edit .ct-digital-id-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
#contact-edit .ct-digital-id-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    margin-bottom: 6px;
}
#contact-edit .ct-digital-id-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
    font-style: normal;
}
#contact-edit .ct-digital-id-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 0;
    outline: none;
    transition: border-color 0.2s;
}
#contact-edit .ct-digital-id-input:focus {
    border-bottom-color: var(--ct-gold);
}
#contact-edit .ct-digital-id-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}
/* 虚拟端发言风格（暗色文本框）*/
#contact-edit .ct-digital-style-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#contact-edit .ct-digital-style-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    line-height: 1.7;
    outline: none;
    resize: none;
    width: 100%;
    overflow-y: auto;
}
#contact-edit .ct-digital-style-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   星汇身份阵列（profile_plan.md 第三部分(补)）
   暗色面板内分大号 PUBLIC IDENTITY / 小号 ANONYMOUS ALT 两区
   ============================================================ */

/* 区块标题 */
#contact-edit .ct-id-section {
    display: flex; flex-direction: column; gap: 24px;
}
#contact-edit .ct-id-section-head {
    display: flex; align-items: center; gap: 12px;
}
#contact-edit .ct-id-section-label {
    font-family: 'Inter', sans-serif;
    font-size: 9px; font-weight: 500;
    letter-spacing: 0.4em; text-transform: uppercase;
    color: #A3927D;
    flex-shrink: 0;
}
#contact-edit .ct-id-section-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}
#contact-edit .ct-id-section-line {
    height: 0.5px; flex: 1; background: rgba(255, 255, 255, 0.1);
}

/* 大小号分割线 */
#contact-edit .ct-id-divider {
    height: 1px; width: 100%;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

/* 头像 + 字段横排 */
#contact-edit .ct-id-row {
    display: flex; align-items: center; gap: 20px;
}
#contact-edit .ct-id-avatar {
    width: 64px; height: 64px;
    background: #2A2A2A;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0; cursor: pointer;
    position: relative;
}
#contact-edit .ct-id-avatar.ct-id-avatar-readonly { cursor: default; }
#contact-edit .ct-id-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    display: block;
}
#contact-edit .ct-id-avatar-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 8px; font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

/* 字段容器 */
#contact-edit .ct-id-fields {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1; min-width: 0;
}
#contact-edit .ct-id-field-label {
    font-family: 'Inter', sans-serif;
    font-size: 8px; font-weight: 500;
    letter-spacing: 0.3em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin-bottom: 4px;
}
#contact-edit .ct-id-field-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    font-style: normal;
    text-transform: none;
    letter-spacing: normal;
}

/* 小号 ID 输入 */
#contact-edit .ct-id-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 0;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 18px; font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
#contact-edit .ct-id-input:focus { border-color: #A3927D; }
#contact-edit .ct-id-input::placeholder { color: rgba(255, 255, 255, 0.2); }

/* 字段块 */
#contact-edit .ct-id-block {
    display: flex; flex-direction: column; gap: 8px;
}

/* textarea */
#contact-edit .ct-id-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    line-height: 1.65;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    min-height: 64px;
    width: 100%;
}
#contact-edit .ct-id-textarea:focus { border-color: rgba(163, 146, 125, 0.5); }
#contact-edit .ct-id-textarea::placeholder { color: rgba(255, 255, 255, 0.2); }

/* V 三态 pill 单选 */
#contact-edit .ct-v-radio-row {
    display: flex; gap: 8px;
}
#contact-edit .ct-v-radio {
    flex: 1; cursor: pointer; min-width: 0;
}
#contact-edit .ct-v-radio input[type="radio"] {
    display: none;
}
#contact-edit .ct-v-radio-pill {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    text-align: center; padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Noto Serif SC', serif;
    font-size: 11px; font-weight: 500;
    transition: all 0.2s;
    background: transparent;
}
#contact-edit .ct-v-radio-pill svg {
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}

/* 选中：无认证 → 白调高亮 */
#contact-edit .ct-v-radio input[value="false"]:checked ~ .ct-v-radio-pill {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.3);
}

/* 选中：蓝 V */
#contact-edit .ct-v-radio.ct-v-blue input[value="blue"]:checked ~ .ct-v-radio-pill {
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border-color: rgba(59, 130, 246, 0.4);
}
#contact-edit .ct-v-radio.ct-v-blue input[value="blue"]:checked ~ .ct-v-radio-pill svg {
    opacity: 1;
}

/* 选中：金 V */
#contact-edit .ct-v-radio.ct-v-gold input[value="gold"]:checked ~ .ct-v-radio-pill {
    background: rgba(245, 158, 11, 0.1);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.4);
}
#contact-edit .ct-v-radio.ct-v-gold input[value="gold"]:checked ~ .ct-v-radio-pill svg {
    opacity: 1;
}

/* ============================================================ */
/* ===== Section 05 · SHIMMER · 社交动态权限 ================== */
/* ============================================================ */
#contact-edit .ct-sec-body-shim {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
#contact-edit .ct-shim-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#contact-edit .ct-shim-item + .ct-shim-item {
    padding-top: 16px;
    border-top: 1px solid rgba(26, 26, 26, 0.05);
}
#contact-edit .ct-shim-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}
#contact-edit .ct-shim-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ct-ink);
}
#contact-edit .ct-shim-title i {
    font-size: 14px;
    opacity: 0.4;
}
/* 滑块卡（开关 ON 时展开）*/
#contact-edit .ct-shim-slider-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(26, 26, 26, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
#contact-edit .ct-shim-slider-card.hidden {
    display: none;
}
#contact-edit .ct-shim-info {
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: rgba(26, 26, 26, 0.5);
}
#contact-edit .ct-shim-info-val {
    color: var(--ct-ink);
}
#contact-edit .ct-shim-info-desc {
    font-family: 'Noto Serif SC', serif;
}
#contact-edit .ct-shim-slider {
    width: 100%;
    height: 4px;
    background: rgba(26, 26, 26, 0.1);
    appearance: none;
    cursor: pointer;
    accent-color: var(--ct-ink);
    border-radius: 9999px;
}
#contact-edit .ct-shim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--ct-ink);
    border: 2px solid var(--ct-bg);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ===== 通用 Toggle 开关（定稿样式：40×22 椭圆 + 16×16 圆球）===== */
#contact-edit .ct-toggle {
    width: 40px;
    height: 22px;
    border-radius: 9999px;
    border: 1px solid rgba(26, 26, 26, 0.2);
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    padding: 0;
}
#contact-edit .ct-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(26, 26, 26, 0.2);
    transition: all 0.25s;
}
#contact-edit .ct-toggle.on {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
}
#contact-edit .ct-toggle.on::before {
    left: 20px;
    background: var(--ct-bg);
}

/* ============================================================ */
/* ===== Section 06 · TOGETHER · 陪伴设定细节 ================= */
/* ============================================================ */
#contact-edit .ct-sec-body-tog {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* 习惯标签 */
#contact-edit .ct-tags-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#contact-edit .ct-tags-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ct-border);
}
#contact-edit .ct-tags-head .ct-fld-label {
    margin-bottom: 0;
    color: rgba(26, 26, 26, 0.5);
}
#contact-edit .ct-tags-count {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--ct-gold);
}
#contact-edit .ct-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
    align-items: center;
}

/* 分组小标题（金色 Inter 大写）*/
#contact-edit .tag-group-label {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--ct-gold);
    margin-top: 12px;
    margin-bottom: 4px;
    line-height: 1.4;
}
#contact-edit .tag-group-label:first-child {
    margin-top: 0;
}

/* 自定义输入行：跟标签胶囊视觉一致的内嵌输入 */
#contact-edit .ct-tag-group-custom-input {
    width: 100%;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
}

#contact-edit .ct-tag-input-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 12px;
    border: 1px dashed rgba(26, 26, 26, 0.18);
    border-radius: 9999px;
    background: transparent;
    transition: border-color 0.2s, background 0.2s;
    max-width: 280px;
}

#contact-edit .ct-tag-input-container:focus-within {
    border-color: var(--ct-gold);
    border-style: solid;
    background: white;
}

#contact-edit .ct-tag-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Noto Serif SC', serif;
    font-size: 10px;
    color: var(--ct-ink);
    padding: 4px 0;
    min-width: 80px;
}

#contact-edit .ct-tag-input-field::placeholder {
    color: rgba(26, 26, 26, 0.35);
    font-size: 10px;
}

#contact-edit .ct-tag-add-btn {
    background: var(--ct-ink);
    color: white;
    border: none;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

#contact-edit .ct-tag-add-btn:hover {
    opacity: 0.85;
}

#contact-edit .ct-tag-add-btn:active {
    transform: scale(0.95);
}

#contact-edit .ct-tag-chip {
    padding: 6px 12px;
    border-radius: 9999px;
    font-family: 'Noto Serif SC', serif;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid rgba(26, 26, 26, 0.1);
    color: rgba(26, 26, 26, 0.6);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
#contact-edit .ct-tag-chip:hover {
    border-color: rgba(26, 26, 26, 0.3);
}
#contact-edit .ct-tag-chip.on {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: white;
}

/* 陪伴 grid 卡（作息/气味/饮品/宠物）*/
#contact-edit .ct-tog-card {
    background: white;
    border: 1px solid var(--ct-border);
    border-radius: 24px;
    /* 🔧 不能 hidden：作息下拉是本卡最上格，菜单 absolute 向下展开会被卡片下沿裁断
       （实测只看得见前3项、第4项被切）。格子均为透明底，visible 不破坏圆角外观。 */
    overflow: visible;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr;
}
#contact-edit .ct-tog-cell {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--ct-border);
}
#contact-edit .ct-tog-cell:last-child {
    border-bottom: none;
}
#contact-edit .ct-tog-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--ct-border);
}
#contact-edit .ct-tog-row-2 .ct-tog-cell {
    border-bottom: none;
}
#contact-edit .ct-tog-row-2 .ct-tog-cell + .ct-tog-cell {
    border-left: 1px solid var(--ct-border);
}
#contact-edit .ct-tog-cell-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: 0.15em;
    color: rgba(26, 26, 26, 0.4);
}
#contact-edit .ct-tog-cell-label .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}
#contact-edit .ct-tog-cell-input,
#contact-edit .ct-tog-cell-select {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ct-ink);
    width: 100%;
    appearance: none;
    cursor: text;
}
#contact-edit .ct-tog-cell-select {
    cursor: pointer;
}
#contact-edit .ct-tog-cell-input::placeholder {
    color: rgba(26, 26, 26, 0.3);
}

/* ============================================================ */
/* ===== Section 07 · CALL · 主动来电设置 ===================== */
/* ============================================================ */
#contact-edit .ct-sec-body-call {
    margin-top: 0;
}
#contact-edit .ct-call-card {
    background: white;
    padding: 24px;
    border: 1px solid rgba(26, 26, 26, 0.05);
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
#contact-edit .ct-call-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#contact-edit .ct-call-row-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ct-ink);
    letter-spacing: 0.05em;
}
#contact-edit .ct-call-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 26, 26, 0.05);
}
#contact-edit .ct-call-grid.hidden {
    display: none;
}
#contact-edit .ct-call-grid-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
#contact-edit .ct-call-grid-cell .ct-fld-label {
    margin-bottom: 0;
    color: rgba(26, 26, 26, 0.4);
}

#contact-edit .ct-call-grid-cell select {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ct-border);
    outline: none;
    font-family: 'Noto Serif SC', serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--ct-ink);
    padding-bottom: 4px;
    appearance: none;
    cursor: pointer;
}

/* ============================================================ */
/* ===== 底部"生成验证令牌"按钮 ================================ */
/* ============================================================ */
#contact-edit .ct-export-btn-wrap {
    padding-top: 40px;
    padding-bottom: 40px;
}
#contact-edit .ct-export-btn {
    width: 100%;
    background: var(--ct-ink);
    color: white;
    padding: 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}
#contact-edit .ct-export-btn:active {
    transform: scale(0.95);
}
#contact-edit .ct-export-btn i {
    font-size: 16px;
}
#contact-edit .ct-export-btn-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4em;
}
#contact-edit .ct-export-btn-text .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}

/* ============================================================ */
/* ===== 底部 bottom-bar（隐藏，因为有顶部封存按钮）=========== */
/* ============================================================ */
#contact-edit .bottom-bar {
    display: none !important;
}

/* ============================================================ */
/* ===== 夜间模式下编辑页保持档案馆色（兜底）================== */
/* ============================================================ */
body.dark-mode #contact-edit.full-screen-edit-page,
body.night #contact-edit.full-screen-edit-page {
    background: var(--ct-bg) !important;
    color: var(--ct-ink) !important;
}


/* 管理浮动按钮 */
.ct-mgr-float {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: none;
    pointer-events: none;
}

.ct-mgr-float.show {
    display: block;
    pointer-events: auto;
}

/* 已拉黑分组 */
.ct-blocked-section {
    margin-top: 24px;
}

.ct-blocked-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    cursor: pointer;
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ct-ink-50);
    border-top: 1px solid var(--ct-border);
}

.ct-blocked-icon {
    color: var(--ct-ink-40);
}

.ct-blocked-count {
    margin-left: auto;
    font-size: var(--ct-text-xs);
    background: var(--ct-ink-10);
    padding: 2px 8px;
    border-radius: var(--ct-radius-full);
}

.ct-blocked-arrow {
    transition: transform 0.25s;
}

.ct-blocked-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.ct-blocked-list-hidden {
    display: none;
}

.ct-blocked-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.ct-blocked-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ct-blocked-avatar-gray {
    filter: grayscale(100%);
    opacity: 0.6;
}

.ct-blocked-info {
    flex: 1;
    min-width: 0;
}

.ct-blocked-name {
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ct-ink);
    font-weight: 500;
}

.ct-blocked-hint {
    font-size: var(--ct-text-xs);
    color: var(--ct-ink-40);
    font-family: 'Noto Sans SC', sans-serif;
}

.ct-unblock-btn {
    padding: 6px 12px;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius-full);
    font-size: var(--ct-text-xs);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ct-ink);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ct-unblock-btn:hover {
    background: var(--ct-ink);
    color: var(--ct-bg);
}

/* 加载动画 */
.ct-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    background: var(--ct-bg);
    border-radius: var(--ct-radius-2xl);
    border: 1px solid var(--ct-border);
}

.ct-loading-spinner {
    font-size: 32px;
    animation: spin 1.5s linear infinite;
    color: var(--ct-gold);
}

.ct-loading-text {
    font-size: var(--ct-text-md);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ct-ink-50);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 浮光码海报 */
.ct-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: var(--ct-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--ct-ink);
    z-index: 10;
}

/* ===== 浮光码弹窗（定稿样式：米白底 + 二维码图标 + 大姓名 + 单卡复制）===== */
.ct-shimmer-modal {
    background: var(--ct-bg);
    width: 100%;
    max-width: 280px;
    padding: 32px;
    border-radius: 32px;
    border: 1px solid var(--ct-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    font-family: 'Noto Serif SC', serif;
    animation: zoomIn 0.2s ease-out;
}

.ct-shimmer-modal-qr {
    display: block;
    font-size: 40px;
    color: var(--ct-gold);
    margin: 0 auto 24px;
    line-height: 1;
}

.ct-shimmer-modal-name {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 8px;
    letter-spacing: 0.05em;
    color: var(--ct-ink);
    line-height: 1.2;
    word-break: break-word;
}

.ct-shimmer-modal-code {
    background: white;
    border: 1px solid var(--ct-border);
    border-radius: 20px;
    padding: 24px 16px;
    margin: 24px 0;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ct-shimmer-modal-code:active {
    transform: scale(0.95);
}

.ct-shimmer-modal-code-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--ct-ink);
    display: block;
}

.ct-shimmer-modal-tip {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    color: var(--ct-gold);
    margin: 12px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.ct-shimmer-modal-tip .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}

.ct-shimmer-modal-close {
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    color: var(--ct-ink-40);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
}

.ct-shimmer-modal-close:hover {
    color: var(--ct-ink);
}

.ct-shimmer-modal-close .ct-cn {
    font-family: 'Noto Serif SC', serif;
    text-transform: none;
    letter-spacing: normal;
}

/* ================= 头像上传中遮罩（优雅进度反馈）================= */
/* 用法：上传开始时给头像容器加 .ct-uploading 类 */
.ct-avatar-large.ct-uploading,
.ct-digital-avatar.ct-uploading {
    position: relative;
}
.ct-avatar-large.ct-uploading::before,
.ct-digital-avatar.ct-uploading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 5;
    border-radius: inherit;
    animation: ct-upload-fade-in 0.2s ease-out forwards;
    pointer-events: none;
}
.ct-avatar-large.ct-uploading::after,
.ct-digital-avatar.ct-uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: ct-upload-spin 0.8s linear infinite;
    z-index: 6;
    pointer-events: none;
}
.ct-digital-avatar.ct-uploading::after {
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
}
/* 上传中文字提示（仅主头像位置显示，数字头像太小不显示文字）*/
.ct-avatar-large.ct-uploading .ct-upload-label {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    z-index: 7;
    pointer-events: none;
    animation: ct-upload-fade-in 0.2s ease-out 0.1s both;
}

/* 上传失败状态 */
.ct-avatar-large.ct-upload-failed::before,
.ct-digital-avatar.ct-upload-failed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(165, 42, 42, 0.65);
    z-index: 5;
    border-radius: inherit;
    pointer-events: none;
}
.ct-avatar-large.ct-upload-failed .ct-upload-label,
.ct-digital-avatar.ct-upload-failed .ct-upload-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 7;
}

@keyframes ct-upload-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes ct-upload-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 保存按钮等待状态（上传未完成时点了保存）*/
#contact-edit .ct-seal-btn.ct-waiting,
#contact-edit .ct-seal-btn:disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}
