/* =====================================================
   AI 职业规划平台 — 全局样式
   设计系统：现代化 SaaS 风格（Inter + Noto Sans SC）
   单文件覆盖：前端 + 后台 + 移动端
   ===================================================== */

/* -------- 设计令牌 -------- */
:root {
    /* 品牌色 */
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-active: #3730a3;
    --accent-light: #eef2ff;
    --accent-2: #0ea5e9;
    /* 语义色 */
    --ok: #059669;
    --ok-light: #ecfdf5;
    --warn: #d97706;
    --warn-light: #fffbeb;
    --error: #dc2626;
    --error-light: #fef2f2;
    /* 中性色 */
    --bg: #f5f6fa;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --ink: #1e293b;
    --ink-soft: #475569;
    --muted: #94a3b8;
    --rule: #e2e8f0;
    --rule-light: #f1f5f9;
    /* 间距（4px 基准） */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 12px;
    --sp-lg: 16px;
    --sp-xl: 24px;
    --sp-2xl: 32px;
    /* 圆角 */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;
    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.2);
    /* 过渡 */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    /* 字体 */
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Consolas, Menlo, monospace;
}

/* -------- 重置 -------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
}
::selection { background: var(--accent); color: #fff; }

/* -------- 滚动条 -------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* -------- 链接 -------- */
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }

/* =====================================================
   顶栏（前端）
   ===================================================== */
.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}
.brand::before {
    content: '';
    display: inline-block;
    width: 22px; height: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 6px;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(79, 70, 229, .3);
}
.nav {
    display: flex;
    gap: 2px;
    margin-left: 1rem;
}
.nav a {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all .2s var(--ease);
}
.nav a:hover { background: var(--rule-light); color: var(--ink); }
.nav a.active {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}
.user-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.user-email { color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Token 徽章 */
.user-area > span[style*="Token"],
.token-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: #92400e;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(217, 119, 6, .15);
}
.btn-ghost {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--surface);
    transition: all .2s var(--ease);
}
.btn-ghost:hover {
    background: var(--rule-light);
    text-decoration: none;
    border-color: var(--rule);
}

/* 管理后台按钮（橙色） */
.user-area > a[style*="管理后台"] {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    color: #c2410c;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all .2s var(--ease);
}
.user-area > a[style*="管理后台"]:hover {
    background: #fed7aa;
    color: #9a3412;
    text-decoration: none;
}

/* =====================================================
   布局容器
   ===================================================== */
.container { max-width: 880px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--rule);
}

/* =====================================================
   Flash 提示（顶端滑入）
   ===================================================== */
.flash {
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border-left: 4px solid;
    animation: flashIn .3s var(--ease);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.flash-error { background: var(--error-light); border-color: var(--error); color: #991b1b; }
.flash-ok { background: var(--ok-light); border-color: var(--ok); color: #065f46; }
.flash-info { background: #eff6ff; border-color: #0ea5e9; color: #075985; }

/* =====================================================
   访客页（登录/注册）
   ===================================================== */
.guest-body {
    background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 50%, #fdf4ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guest-wrap { margin: auto; width: 100%; max-width: 420px; padding: 2rem 1.25rem; }
.guest-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}
.guest-brand::before {
    content: '';
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}
.guest-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.08);
}
.guest-footer { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 1.5rem; }
.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.01em;
}
.card-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    margin: 10px auto 0;
}

/* =====================================================
   表单
   ===================================================== */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
label { font-weight: 500; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--ink-soft); }
.req { color: var(--error); }

input[type=text], input[type=email], input[type=password],
input[type=url], input[type=tel], input[type=number],
select, textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: all .2s var(--ease);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    line-height: 1.5;
    min-height: 40px;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
    background: #fff;
}
textarea { resize: vertical; min-height: 80px; }
.radios { display: flex; gap: 1.25rem; padding-top: 0.2rem; }
.radios label { display: flex; align-items: center; gap: 0.35rem; font-weight: 400; margin: 0; }
.radios input { width: auto; accent-color: var(--accent); }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.form-foot { text-align: center; margin-top: 1.25rem; color: var(--muted); font-size: 0.85rem; }

/* =====================================================
   按钮系统
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--ease);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .5s var(--ease);
    pointer-events: none;
}
.btn:hover::after { transform: translateX(100%); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, .25);
}
.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
    color: #fff;
}
.btn-outline {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent-light);
    text-decoration: none;
}
.btn-ghost-btn {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--rule);
}
.btn-ghost-btn:hover { background: var(--rule-light); color: var(--ink); }
.btn-danger {
    background: var(--surface);
    color: var(--error);
    border-color: #fecaca;
}
.btn-danger:hover { background: var(--error-light); border-color: var(--error); }
.btn-block { width: 100%; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* =====================================================
   页面标题
   ===================================================== */
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}
.page-desc { color: var(--muted); margin-bottom: 1.75rem; font-size: 0.9rem; }
.muted { color: var(--muted); font-size: 0.85rem; }

/* =====================================================
   基本信息页 — section 卡片
   ===================================================== */
.page-header { margin-bottom: 1.5rem; }
.profile-section {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow .2s var(--ease);
}
.profile-section:hover { box-shadow: var(--shadow-sm); }
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, rgba(79,70,229,.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--rule-light);
}
.section-icon { font-size: 1.1rem; }
.section-title { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.section-optional { font-size: 0.78rem; color: var(--muted); margin-left: auto; font-weight: 500; }
.section-body { padding: 1.5rem; }

/* 照片卡 */
.photo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-right: 1.5rem;
    border-right: 1px dashed var(--rule);
    margin-right: 1.5rem;
}
.photo-preview {
    width: 130px;
    height: 170px;
    border: 2px dashed var(--rule);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: border-color .2s var(--ease);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview:hover { border-color: var(--accent); }
.photo-placeholder { color: var(--muted); font-size: 0.8rem; text-align: center; }
.btn-photo { white-space: nowrap; }
.photo-remove { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.25rem; margin: 0; font-weight: 400; background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); transition: all .2s; }
.photo-remove:hover { background: var(--error-light); color: var(--error); }
.profile-section:first-of-type .section-body { display: flex; align-items: flex-start; gap: 0; }
.profile-section:first-of-type .form-grid { flex: 1; }

/* =====================================================
   工作/教育经历条目
   ===================================================== */
.wh-entry {
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--bg);
    position: relative;
    transition: box-shadow .2s var(--ease);
}
.wh-entry:hover { box-shadow: var(--shadow-xs); }
.wh-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}
.wh-row input, .wh-row select { flex: 1; min-width: 0; }
.wh-entry textarea { width: 100%; }
.period-picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1.2 1 auto;
    min-width: 270px;
    flex-wrap: wrap;
}
.period-picker input[type="month"] {
    flex: 1 1 120px;
    min-width: 120px;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
    height: auto;
    min-height: 36px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    color: #1f2328;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.period-picker input[type="month"]:hover:not(:disabled) { border-color: #0969da; }
.period-picker input[type="month"]:focus { outline: none; border-color: #0969da; box-shadow: 0 0 0 3px rgba(9,105,218,.2); }
.period-picker input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(40%);
    cursor: pointer;
    padding: 2px;
}
.period-picker input[type="month"]:disabled {
    background: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
    opacity: .6;
}
.period-sep { color: var(--muted); font-size: 0.85rem; user-select: none; flex: 0 0 auto; padding: 0 2px; }
.period-current {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
    flex: 0 0 auto;
    margin-left: 2px;
}
.period-current input[type="checkbox"] { margin: 0; width: auto; accent-color: var(--accent); }
.wh-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all .15s;
    padding: 0;
}
.wh-remove:hover { background: #ff4d4f20; color: #ff4d4f; }

/* =====================================================
   空状态 / 错误页
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.empty-icon { font-size: 3rem; color: var(--accent); opacity: .4; margin-bottom: 0.5rem; }
.empty-state h2 { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; }
.empty-state p { color: var(--muted); margin-bottom: 1.5rem; }
.error-box { text-align: center; padding: 3rem 1rem; }
.error-box h1 { font-size: 3rem; color: var(--accent); margin-bottom: 0.5rem; font-weight: 800; letter-spacing: -0.02em; }
.error-box p { color: var(--muted); margin-bottom: 1.5rem; }

/* =====================================================
   职业规划 — 方向卡片
   ===================================================== */
.plan-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.direction-list { display: flex; flex-direction: column; gap: 0.85rem; }
.direction-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all .2s var(--ease);
    cursor: pointer;
    position: relative;
}
.direction-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(79, 70, 229, .1);
    transform: translateY(-2px);
}
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.dc-title { display: flex; align-items: center; gap: 0.6rem; }
.dc-no {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(79, 70, 229, .3);
}
.dc-title h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.match-badge {
    background: linear-gradient(135deg, rgba(5,150,105,.12), rgba(16,185,129,.1));
    color: var(--ok);
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(5,150,105,.2);
}
.dc-meta { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; font-size: 0.88rem; color: var(--ink-soft); }
.dc-meta span { display: flex; flex-direction: column; }
.dc-meta span strong { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.dc-gaps { margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.tag {
    background: rgba(220, 38, 38, .08);
    color: var(--error);
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}
.tag.skill-gap {
    background: var(--warn-light);
    color: var(--warn);
}
.dc-reason {
    color: var(--ink-soft);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--rule-light);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    border-left: 3px solid var(--accent);
    line-height: 1.65;
}

/* =====================================================
   简历工具栏
   ===================================================== */
.resume-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.resume-toolbar p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* =====================================================
   简历 A4 纸
   ===================================================== */
.resume-paper {
    background: #fff;
    padding: 18mm 16mm;
    margin: 0 auto 2rem;
    width: 210mm;
    min-height: 297mm;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    font-size: 12pt;
    line-height: 1.6;
    color: #1e293b;
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
}
.rp-section { padding: 6mm 0; border-bottom: 1px solid #e2e8f0; }
.rp-section:last-child { border-bottom: none; padding-bottom: 0; }
.rp-h2 {
    font-size: 14pt;
    color: var(--accent);
    margin-bottom: 3mm;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2mm;
    display: inline-block;
    letter-spacing: -0.01em;
}
.rp-section p { font-size: 11pt; color: #334155; margin-bottom: 2mm; }
.rp-personal { display: flex; flex-wrap: wrap; gap: 1mm 5mm; font-size: 11pt; color: #334155; }
.rp-personal strong { color: #64748b; font-weight: 500; margin-right: 1mm; }
.rp-section-personal { background: #f8fafc; padding: 6mm 8mm; border-radius: var(--radius-md); margin-bottom: 3mm; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 2mm; }
.skill-tags .tag { background: rgba(14, 165, 233, .1); color: #0369a1; padding: 1mm 3mm; border-radius: var(--radius-xs); font-size: 10pt; border: 1px solid rgba(14, 165, 233, .2); }
.project-item { margin-bottom: 5mm; page-break-inside: avoid; break-inside: avoid; }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; margin-bottom: 1mm; flex-wrap: wrap; }
.project-name { font-size: 12pt; margin-bottom: 0; font-weight: 600; color: #1e293b; }
.project-period { font-size: 10pt; color: var(--accent); font-weight: 500; font-family: var(--font-mono, ui-monospace, monospace); white-space: nowrap; }
.project-meta { font-size: 10.5pt; color: #64748b; margin-bottom: 1.5mm; display: flex; align-items: center; gap: 1.5mm; flex-wrap: wrap; }
.project-company { font-weight: 500; color: #334155; }
.meta-sep { color: #cbd5e1; }
.project-item p { color: #334155; font-size: 11pt; }

/* 教育经历条目 */
.edu-entry { margin-bottom: 4mm; page-break-inside: avoid; break-inside: avoid; }
.edu-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; flex-wrap: wrap; margin-bottom: 1mm; }
.edu-title { font-size: 11.5pt; font-weight: 600; color: #1e293b; display: flex; align-items: baseline; gap: 2mm; flex-wrap: wrap; }
.edu-school { font-size: 12pt; color: var(--accent); }
.edu-degree { font-size: 10pt; color: #64748b; font-weight: 500; background: #f1f5f9; padding: 0 2mm; border-radius: 2mm; }
.edu-major { font-size: 10.5pt; color: #64748b; font-weight: normal; }
.edu-period { font-size: 10pt; color: var(--accent); font-weight: 500; font-family: var(--font-mono, ui-monospace, monospace); white-space: nowrap; }
.edu-desc { font-size: 10.5pt; color: #475569; line-height: 1.6; margin: 0; }

/* 经典模板 */
.tpl-classic .classic-header { display: flex; gap: 8mm; align-items: flex-start; }
.tpl-classic .classic-photo { width: 35mm; height: 47mm; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; border: 1px solid #e2e8f0; }
.tpl-classic .classic-photo img { width: 100%; height: 100%; object-fit: cover; }
.tpl-classic .classic-info { flex: 1; }
.tpl-classic .classic-name { font-size: 22pt; margin-bottom: 2mm; color: var(--accent); font-weight: 800; letter-spacing: -0.02em; }

/* 现代模板 */
.tpl-modern .modern-layout { display: flex; gap: 6mm; min-height: auto; }
.tpl-modern .modern-sidebar { width: 55mm; flex-shrink: 0; background: linear-gradient(180deg, #f1f5f9, #e2e8f0); border-radius: var(--radius-md); padding: 6mm; }
.tpl-modern .modern-photo { width: 100%; aspect-ratio: 3/4; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 4mm; box-shadow: var(--shadow-sm); }
.tpl-modern .modern-photo img { width: 100%; height: 100%; object-fit: cover; }
.tpl-modern .modern-name { font-size: 13pt; color: var(--accent); margin-bottom: 3mm; text-align: center; font-weight: 800; letter-spacing: -0.01em; }
.tpl-modern .modern-contact p { font-size: 9pt; margin-bottom: 3mm; color: #1e293b; word-break: break-all; }
.tpl-modern .modern-contact strong { display: block; font-size: 8pt; color: #64748b; font-weight: 500; margin-bottom: 1mm; text-transform: uppercase; letter-spacing: 0.5px; }
.tpl-modern .modern-skills { margin-top: 5mm; }
.tpl-modern .modern-skills h3 { font-size: 10pt; color: var(--accent); margin-bottom: 2mm; font-weight: 700; }
.tpl-modern .modern-skills .skill-tags { flex-direction: column; gap: 1.5mm; }
.tpl-modern .modern-skills .tag { display: block; text-align: center; font-size: 8pt; padding: 1.5mm; }
.tpl-modern .modern-main { flex: 1; padding: 0; }

/* 简约模板 */
.tpl-minimal { text-align: center; }
.tpl-minimal .minimal-header { padding: 6mm 0 10mm; border-bottom: 2px solid var(--accent); margin-bottom: 6mm; }
.tpl-minimal .minimal-photo { width: 38mm; height: 50mm; border-radius: 50%; overflow: hidden; margin: 0 auto 4mm; border: 3px solid var(--accent-light); box-shadow: var(--shadow-sm); }
.tpl-minimal .minimal-photo img { width: 100%; height: 100%; object-fit: cover; }
.tpl-minimal .minimal-name { font-size: 24pt; color: var(--accent); margin-bottom: 2mm; font-weight: 800; letter-spacing: -0.02em; }
.tpl-minimal .minimal-meta { font-size: 10pt; color: #64748b; }
.tpl-minimal .rp-section { text-align: left; }

/* 打印 */
@page { size: A4; margin: 0; }
@media print {
    html, body { background: #fff; margin: 0; padding: 0; }
    .resume-paper { width: 210mm; min-height: 297mm; padding: 18mm 16mm; margin: 0; box-shadow: none; border-radius: 0; page-break-after: always; }
    .resume-toolbar, .links-section, .topbar, .footer, .photo-remove, .section-header, .profile-section, .page-header, .form-actions { display: none !important; }
    .container { max-width: 210mm; padding: 0; margin: 0; }
    .rp-section { page-break-inside: avoid; break-inside: avoid; }
    .project-item { page-break-inside: avoid; break-inside: avoid; }
    img { max-width: 100%; }
    a { color: #1e293b; text-decoration: none; }
}

/* =====================================================
   简历风格/模板 — 胶囊选择器
   ===================================================== */
.resume-gen-form { display: flex; flex-direction: column; gap: 0.7rem; }

/* ============ 顶部统一风格/模板选择条 ============ */
.resume-picker-bar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.picker-block { flex: 1 1 320px; min-width: 280px; }
.picker-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}
.picker-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.picker-chips input[type="radio"] { display: none; }
.picker-chips .chip {
    display: inline-block;
    padding: 7px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.picker-chips .chip:hover { border-color: #1677ff; color: #1677ff; }
.picker-chips .chip.active {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
}

/* ============ 选择风格/模板弹窗 ============ */
.pick-modal-mask {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.pick-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: pmIn .2s ease-out;
}
@keyframes pmIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.pm-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.pm-header h3 { font-size: 16px; font-weight: 700; margin: 0; color: #1f2937; }
.pm-close {
    background: none; border: none; color: #999; font-size: 18px;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.pm-close:hover { background: #f5f5f5; color: #333; }

.pm-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.pm-hint { color: #6b7280; font-size: 13px; margin: 0 0 16px; }
.pm-hint strong { color: #1f2937; }

.pm-block { margin-bottom: 20px; }
.pm-block:last-child { margin-bottom: 0; }
.pm-block-title {
    font-size: 14px; font-weight: 600; color: #374151;
    margin-bottom: 12px;
}
.pm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

.pm-style-card, .pm-tpl-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
}
.pm-style-card:hover, .pm-tpl-card:hover { border-color: #1677ff; transform: translateY(-2px); }
.pm-style-card.active, .pm-tpl-card.active {
    border-color: #1677ff;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(22,119,255,.15);
}
.pm-style-card.active .pm-style-title,
.pm-tpl-card.active .pm-tpl-title { color: #1677ff; }

.pm-style-thumb, .pm-tpl-thumb {
    background: #fafafa;
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
    aspect-ratio: 60/82;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.pm-style-thumb svg, .pm-tpl-thumb svg { width: 100%; height: 100%; }
.pm-style-title, .pm-tpl-title { font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 2px; }
.pm-style-desc, .pm-tpl-desc { font-size: 11px; color: #9ca3af; line-height: 1.35; }

.pm-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid #f0f0f0;
    gap: 16px;
}
.pm-preview { font-size: 13px; color: #6b7280; }
.pm-preview-label { color: #9ca3af; }
.pm-preview-val { color: #1677ff; font-weight: 600; }
.pm-footer .btn-lg { padding: 10px 22px; font-size: 14px; }
.rstyle-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 0.3px; }
.rstyle-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.rstyle-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    border: 1.5px solid var(--rule);
    border-radius: var(--radius-full);
    background: var(--surface);
    cursor: pointer;
    transition: all .2s var(--ease);
    position: relative;
    box-sizing: border-box;
    user-select: none;
}
.rstyle-card:hover { border-color: var(--accent); background: var(--accent-light); }
.rstyle-card .rstyle-radio { position: absolute; opacity: 0; pointer-events: none; }
.rstyle-card:has(.rstyle-radio:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.rstyle-thumb {
    width: 32px;
    height: 44px;
    border-radius: var(--radius-xs);
    background: #f8fafc;
    border: 1px solid var(--rule);
    overflow: hidden;
    flex-shrink: 0;
    cursor: zoom-in;
    position: relative;
}
.rstyle-thumb svg { width: 100%; height: 100%; display: block; }
.rstyle-title { font-size: 0.8rem; font-weight: 600; color: var(--ink); line-height: 1.25; }

/* 大图预览 modal */
.thumb-preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.thumb-preview-modal.show { display: flex; animation: fadeIn .2s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.thumb-preview-box {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    animation: popIn .25s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.thumb-preview-box .thumb-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--rule-light);
    color: var(--ink-soft);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s var(--ease);
}
.thumb-preview-box .thumb-close:hover { background: var(--rule); color: var(--ink); }
.thumb-preview-box svg { width: min(400px, 80vw); height: auto; display: block; }

/* =====================================================
   简历编辑
   ===================================================== */
.resume-edit-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
    transition: all .2s var(--ease);
}
.resume-edit-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.edit-grid .fg { display: flex; flex-direction: column; gap: 0.25rem; }
.edit-grid .fg label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.project-edit-item {
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--rule-light);
}
.pe-top { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.pe-top input { flex: 1; }

/* =====================================================
   用户建议表单
   ===================================================== */
.suggest-card {
    background: #fafbff;
    border: 1px dashed #c7caea;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.sc-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.sc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #3d4370;
}
.sc-sub {
    font-size: 0.8rem;
    color: #8c91ad;
}
.sc-form { display: flex; flex-direction: column; gap: 0.7rem; }
.sc-row { display: flex; gap: 0.7rem; }
.sc-field { flex: 1; min-width: 0; }
.sc-field-full { width: 100%; }
.sc-field label {
    display: block;
    font-size: 0.75rem;
    color: #6b6f8c;
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.sc-field input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid #e0e3f0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.sc-field input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.req { color: #e04664; margin-left: 2px; }
.sc-actions { display: flex; align-items: center; gap: 0.75rem; }
.sc-submit {
    padding: 0.45rem 1.1rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.sc-submit:hover:not(:disabled) { background: #4338ca; }
.sc-submit:active:not(:disabled) { transform: translateY(1px); }
.sc-submit:disabled { background: #a5a8c7; cursor: not-allowed; }
.sc-msg { font-size: 0.8rem; }
.sc-ok { color: #1f9d55; }
.sc-err { color: #e04664; }

/* 手机端：建议表单单列 */
@media (max-width: 640px) {
    .suggest-card { padding: 0.9rem 1rem; }
    .sc-row { flex-direction: column; gap: 0.6rem; }
    .sc-submit { flex: 1; }
}

/* =====================================================
   平台链接（标签形式）
   ===================================================== */
.links-section { margin-top: 1rem; }
.links-title { font-size: 1.1rem; margin-bottom: 0.35rem; font-weight: 700; letter-spacing: -0.01em; }

.links-group { margin-top: 1rem; }
.lg-header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.lg-title { font-size: 0.9rem; font-weight: 700; color: #1f2937; }
.lg-sub { font-size: 0.75rem; color: #9ca3af; }

.link-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.link-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: #f5f6ff;
    border: 1px solid #e0e3f0;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #3d4370;
    text-decoration: none;
    transition: all .15s ease;
    line-height: 1.4;
}
.link-tag:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .2);
}
.lt-sub {
    font-size: 0.7rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    font-weight: 500;
}
.link-tag:hover .lt-sub {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.link-note { color: var(--warn); font-size: 0.8rem; padding: 0.7rem 1rem; background: var(--warn-light); border-radius: var(--radius-md); border-left: 3px solid var(--warn); margin-top: 1rem; }

/* =====================================================
   技能选择器
   ===================================================== */
.skill-picker {
    border: 1px dashed var(--rule);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sp-selected {
    min-height: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--rule);
}
.sp-selected-empty { color: var(--muted); font-size: 0.82rem; padding: 6px 2px; }
.sp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(79, 70, 229, .2);
}
.sp-chip-x {
    background: none;
    border: none;
    color: #fff;
    opacity: .85;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0 0 0 2px;
    line-height: 1;
    border-radius: 50%;
    width: 16px; height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s var(--ease);
}
.sp-chip-x:hover { opacity: 1; background: rgba(255,255,255,.25); }
.sp-custom { display: flex; gap: 8px; }
.sp-custom input { flex: 1; min-width: 0; }
.sp-cats { display: flex; align-items: center; gap: 8px; }
.resume-style-select {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 1rem;
    padding-right: 2rem;
    transition: all .2s var(--ease);
}
.resume-style-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.sp-cat-hint { padding: 18px 14px; text-align: center; color: var(--muted); font-size: 0.85rem; background: rgba(79,70,229,.03); border-radius: var(--radius-md); border: 1px dashed var(--rule); line-height: 1.5; }
.sp-groups { display: flex; flex-direction: column; gap: 12px; }
.sp-group { display: flex; flex-direction: column; gap: 6px; }
.sp-group-title { font-size: 0.82rem; font-weight: 600; color: var(--muted); padding-left: 4px; letter-spacing: 0.3px; }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s var(--ease);
    line-height: 1.5;
    font-family: inherit;
}
.sp-tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }
.sp-tag.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(79, 70, 229, .2);
}
.sp-tip { color: var(--muted); font-size: 0.78rem; margin-top: 0; }

/* =====================================================
   AI 按钮 & 弹窗
   ===================================================== */
.ai-polish-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124,58,237,.3);
    transition: all .2s var(--ease);
    white-space: nowrap;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.ai-polish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.ai-polish-btn:active { transform: translateY(0); }
.ai-polish-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ai-polish-link {
    display: inline-block;
    margin-left: 8px;
    padding: 0;
    font-size: 0.78rem;
    color: #7c3aed;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-family: inherit;
}
.ai-polish-link:hover { color: #ec4899; }

.ai-pop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn .2s var(--ease);
}
.ai-pop-card {
    width: 92%;
    max-width: 520px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: popIn .25s var(--ease);
}
.ai-pop-head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--rule-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-pop-head h3 { margin: 0; font-size: 1rem; font-weight: 700; flex: 1; }
.ai-pop-head .close-btn {
    width: 32px; height: 32px;
    border: none; background: var(--rule-light);
    border-radius: 50%;
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    transition: all .2s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-pop-head .close-btn:hover { background: var(--rule); color: var(--ink); }
.ai-pop-body { padding: 18px 22px; }
.ai-pop-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.6;
    transition: all .2s var(--ease);
}
.ai-pop-body textarea:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.ai-pop-hint { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.ai-pop-foot { padding: 14px 22px 18px; display: flex; gap: 10px; justify-content: flex-end; }
.ai-pop-foot .btn { padding: 8px 20px; font-size: 0.85rem; border-radius: var(--radius-sm); }

.ai-pop .spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ai-success {
    background: var(--ok-light);
    color: #166534;
    border: 1px solid #86efac;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin: 8px 0;
    animation: fadeIn .2s var(--ease);
}

/* =====================================================
   ========= 后台管理系统 =========
   ===================================================== */

.admin-shell { display: flex; min-height: 100vh; }

/* 侧边栏 */
.admin-shell .sidebar {
    width: 220px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    box-shadow: 4px 0 16px rgba(15, 23, 42, 0.15);
    z-index: 10;
}
.admin-shell .sidebar .brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-shell .sidebar .brand-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    box-shadow: 0 2px 6px rgba(79, 70, 229, .4);
}
.admin-shell .sidebar .brand-name {
    display: block;
    margin-top: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.admin-shell .sidebar .nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.admin-shell .sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all .2s var(--ease);
    border-left: 3px solid transparent;
    font-weight: 500;
}
.admin-shell .sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.admin-shell .sidebar .nav-item.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, .3), rgba(79, 70, 229, 0));
    color: #fff;
    font-weight: 600;
    border-left-color: var(--accent);
    box-shadow: inset 0 0 20px rgba(79, 70, 229, .1);
}
.admin-shell .sidebar .nav-item::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}
.admin-shell .sidebar .nav-item.active::before { opacity: 1; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* 主区域 */
.admin-shell .main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
}
.admin-shell .topbar {
    height: 60px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 5;
}
.admin-shell .topbar-title { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.admin-shell .topbar-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.admin-shell .badge {
    background: var(--ok-light);
    color: var(--ok);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}
.admin-shell .content { padding: 24px 28px; flex: 1; }

/* Flash（后台用全局 flash） */
.admin-shell .flash { animation: flashIn .3s var(--ease); }

/* 卡片 */
.admin-shell .card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--rule-light);
}
.admin-shell .card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ink);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-light);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}
.admin-shell .card-title::before {
    content: '';
    display: inline-block;
    width: 3px; height: 14px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 2px;
}

/* 统计卡片 */
.admin-shell .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-shell .stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--rule-light);
    position: relative;
    overflow: hidden;
    transition: all .25s var(--ease);
}
.admin-shell .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.admin-shell .stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 4px 0 0 4px;
}
.admin-shell .stat-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; font-weight: 500; }
.admin-shell .stat-value { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.admin-shell .stat-value.today { color: var(--accent); }

/* 表格 */
.admin-shell table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--rule-light);
}
.admin-shell th, .admin-shell td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--rule-light);
}
.admin-shell thead th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 12px;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}
.admin-shell tbody tr:last-child td { border-bottom: none; }
.admin-shell tbody tr { transition: background .15s var(--ease); }
.admin-shell tbody tr:hover td { background: #f8fafc; }
.admin-shell td.id-cell { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.admin-shell td.muted { color: var(--muted); font-size: 12px; }

/* 标签 */
.admin-shell .tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.admin-shell .tag-admin { background: var(--warn-light); color: var(--warn); border: 1px solid #fed7aa; }
.admin-shell .tag-user { background: var(--accent-light); color: var(--accent); border: 1px solid #c7d2fe; }
.admin-shell .tag-token { background: var(--warn-light); color: var(--warn); border: 1px solid #fed7aa; }

/* 按钮（后台） */
.admin-shell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: #f1f5f9;
    color: var(--ink-soft);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--rule);
    cursor: pointer;
    font-family: inherit;
    transition: all .2s var(--ease);
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    gap: 6px;
}
.admin-shell .btn:hover { color: var(--accent); border-color: var(--accent); background: #fff; }
.admin-shell .btn:active { transform: scale(.98); }
.admin-shell .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(79, 70, 229, .25);
}
.admin-shell .btn-primary:hover { color: #fff; background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 10px rgba(79, 70, 229, .35); }
.admin-shell .btn-danger {
    background: var(--surface);
    color: var(--error);
    border-color: #fecaca;
}
.admin-shell .btn-danger:hover { background: var(--error-light); border-color: var(--error); color: var(--error); }
.admin-shell .btn-sm { padding: 4px 10px; font-size: 12px; }
.admin-shell .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-shell .delete-form { display: inline; }

/* 分页 */
.admin-shell .pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
}
.admin-shell .pager .page-links { display: flex; gap: 6px; }
.admin-shell .pager .page-links a,
.admin-shell .pager .page-links span {
    padding: 5px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink-soft);
    transition: all .15s var(--ease);
    background: var(--surface);
}
.admin-shell .pager .page-links a:hover { color: var(--accent); border-color: var(--accent); }
.admin-shell .pager .page-links .current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* 详情网格 */
.admin-shell .detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 20px;
    font-size: 13px;
}
.admin-shell .detail-grid dt { color: var(--muted); font-weight: 500; }
.admin-shell .detail-grid dd { color: var(--ink); word-break: break-all; }
.admin-shell .json-box {
    background: #0f172a;
    color: #d4d4d4;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    overflow: auto;
    max-height: 500px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.7;
    border: 1px solid #1e293b;
}
.admin-shell .empty { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 13px; }
.admin-shell .section-h {
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0 12px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}
.admin-shell .section-h::before {
    content: '';
    display: inline-block;
    width: 3px; height: 14px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 2px;
}
.admin-shell .back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s var(--ease);
}
.admin-shell .back-link:hover { color: var(--accent-hover); }

/* 后台表单 */
.admin-shell input[type=text], .admin-shell input[type=email], .admin-shell input[type=password],
.admin-shell input[type=url], .admin-shell input[type=tel], .admin-shell input[type=number],
.admin-shell select, .admin-shell textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: all .2s var(--ease);
    box-sizing: border-box;
    line-height: 1.5;
    min-height: 40px;
}
.admin-shell input:focus, .admin-shell select:focus, .admin-shell textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
    background: #fff;
}
.admin-shell small { color: var(--muted); font-size: 12px; }

/* 后台链接统一 */
.admin-shell a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
.admin-shell a:hover { color: var(--accent-hover); }

/* =====================================================
   ========= 移动端（≤ 640px）— 统一媒体查询 =========
   ===================================================== */
@media (max-width: 640px) {
    body { font-size: 14px; }

    /* -------- 顶栏：品牌 + user-area 一行，nav 第二行横滑 -------- */
    .topbar-inner {
        height: auto !important;
        padding: .5rem .85rem !important;
        flex-wrap: wrap !important;
        gap: .4rem .5rem !important;
    }
    .brand { font-size: .9rem !important; }
    .user-area { margin-left: auto !important; order: 2 !important; gap: .4rem !important; flex-shrink: 0; }
    .user-email { display: none !important; }
    /* Token 徽章和管理后台按钮在移动端缩小 */
    .user-area > span[style*="Token"],
    .user-area > a[style*="管理后台"] {
        padding: 3px 8px !important;
        font-size: 11px !important;
        flex-shrink: 0;
    }
    .topbar-inner > .nav {
        order: 3 !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 0 !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        scrollbar-width: none; -ms-overflow-style: none;
        border-top: 1px solid var(--rule);
        padding-top: .4rem;
        padding-bottom: 4px;
    }
    .topbar-inner > .nav::-webkit-scrollbar { display: none; }
    .topbar-inner > .nav > a {
        flex-shrink: 0 !important;
        padding: .35rem .7rem !important;
        font-size: .85rem !important;
        border-radius: 16px !important;
        margin-right: .3rem;
        white-space: nowrap !important;
    }

    /* -------- 容器 -------- */
    .container { padding: 1rem .8rem 2rem; max-width: 100%; }
    .footer { padding: 1rem .8rem; font-size: .72rem; line-height: 1.5; }

    /* -------- section-header -------- */
    .section-header { padding: .7rem .9rem !important; flex-wrap: wrap; gap: .3rem .4rem !important; }
    .section-title { font-size: .92rem !important; }
    .section-optional { font-size: .72rem !important; }
    .section-header .ai-polish-btn { font-size: .7rem !important; padding: 3px 10px !important; margin-left: auto !important; flex-shrink: 0 !important; }

    /* -------- 表单 -------- */
    .form-grid { grid-template-columns: 1fr !important; gap: .75rem; }
    .edit-grid { grid-template-columns: 1fr !important; gap: .5rem; }
    label { font-size: .82rem; margin-bottom: .25rem; }
    input[type=text], input[type=email], input[type=password], input[type=url],
    input[type=tel], input[type=number], select, textarea {
        font-size: 16px !important; /* iOS 不缩放 */
        padding: .55rem .7rem !important;
        min-height: 40px !important;
    }

    /* -------- 照片卡 + 基本信息 -------- */
    .profile-section:first-of-type .section-body { flex-direction: column !important; gap: .8rem !important; }
    .photo-card { flex-direction: row !important; width: 100%; border-right: none !important; border-bottom: 1px dashed var(--rule); padding: 0 0 .8rem !important; margin: 0 !important; gap: .7rem !important; align-items: center; }
    .photo-preview { width: 80px !important; height: 106px !important; flex-shrink: 0; }

    /* -------- 工作/教育条目 — wh-row 纵向全宽 + period-picker 保持横排 -------- */
    .wh-entry { padding: .8rem !important; border-radius: 10px !important; }
    .wh-row { flex-direction: column !important; gap: .5rem !important; align-items: stretch !important; margin-bottom: .5rem !important; }
    .wh-row > input, .wh-row > select { width: 100% !important; min-width: 0 !important; flex: none !important; }
    .wh-row > .period-picker { width: 100% !important; flex: none !important; gap: .3rem !important; flex-wrap: wrap !important; min-width: 0 !important; }
    .wh-row > .period-picker input[type="month"] { flex: 1 1 calc(50% - 10px) !important; min-width: 0 !important; padding: .4rem .45rem !important; font-size: .82rem !important; min-height: 34px !important; border-radius: 6px !important; }
    .wh-row > .period-picker .period-current { font-size: .75rem !important; }
    .wh-remove { position: absolute !important; top: .45rem !important; right: .45rem !important; }

    /* -------- 顶部统一 picker-bar -------- */
    .resume-picker-bar { padding: 12px 14px !important; gap: 14px !important; margin-bottom: 14px !important; }
    .picker-block { min-width: 0 !important; flex: 1 1 100% !important; }
    .picker-chips .chip { padding: 6px 12px !important; font-size: 12px !important; }

    /* -------- 弹窗 -------- */
    .pick-modal-mask { padding: 10px !important; }
    .pick-modal { max-height: 95vh !important; border-radius: 12px !important; }
    .pm-header { padding: 14px 16px !important; }
    .pm-body { padding: 14px 16px !important; }
    .pm-cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; gap: 8px !important; }
    .pm-style-card, .pm-tpl-card { padding: 8px !important; border-radius: 10px !important; }
    .pm-style-title, .pm-tpl-title { font-size: 12px !important; }
    .pm-style-desc, .pm-tpl-desc { font-size: 10px !important; }
    .pm-footer { flex-direction: column !important; padding: 12px 16px !important; gap: 10px !important; }
    .pm-footer .btn-lg { width: 100% !important; }

    /* -------- direction-card -------- */
    .direction-card { padding: 1rem !important; border-radius: 10px !important; }
    .dc-top { flex-direction: column !important; gap: .4rem !important; align-items: flex-start !important; }
    .dc-title h3 { font-size: .98rem !important; }
    .dc-meta { flex-direction: column !important; gap: .2rem !important; margin-bottom: .5rem !important; font-size: .82rem !important; }
    .dc-meta span { flex-direction: row !important; gap: .35rem !important; }
    .dc-gaps { margin-bottom: .5rem !important; gap: .3rem !important; }
    .dc-reason { padding: .5rem .7rem !important; font-size: .82rem !important; margin-bottom: .6rem !important; }

    /* -------- resume-toolbar -------- */
    .resume-toolbar { flex-direction: column !important; align-items: stretch !important; gap: .6rem !important; padding: 1rem !important; }
    .resume-toolbar > p { font-size: .8rem !important; line-height: 1.5; word-break: break-all; }
    .toolbar-actions { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: .5rem !important; width: 100%; }
    .toolbar-actions .btn { width: 100% !important; font-size: .82rem !important; padding: .55rem .6rem !important; }
    .toolbar-actions .btn-primary { grid-column: 1 / -1; }

    /* -------- 简历 A4 纸：阅读模式 -------- */
    .resume-paper {
        width: 100% !important; max-width: 100% !important; min-height: auto !important;
        padding: .9rem !important; margin: 0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,.08) !important;
        border-radius: 12px !important; font-size: 14px !important; line-height: 1.55 !important;
        box-sizing: border-box !important;
    }
    .rp-section { padding: .7rem 0 !important; }
    .rp-h2 { font-size: 16px !important; margin-bottom: 8px !important; padding-bottom: 4px !important; }
    .tpl-classic .classic-header { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 10px; }
    .tpl-classic .classic-photo { width: 80px !important; height: 106px !important; }
    .tpl-classic .classic-name { font-size: 18px !important; text-align: center !important; }
    .tpl-classic .classic-info { text-align: center !important; font-size: 12px !important; }
    .tpl-modern .modern-layout { flex-direction: column !important; gap: 0 !important; }
    .tpl-modern .modern-sidebar {
        width: 100% !important; padding: 12px !important; box-sizing: border-box !important;
        flex-direction: row !important; align-items: center !important; gap: 12px !important; flex-wrap: wrap !important;
        border-radius: 10px 10px 0 0 !important;
    }
    .tpl-modern .modern-sidebar .modern-photo { width: 64px !important; flex-shrink: 0; margin: 0 !important; }
    .tpl-modern .modern-sidebar .modern-name { font-size: 16px !important; text-align: left !important; margin-bottom: 4px; }
    .tpl-modern .modern-sidebar .modern-contact { text-align: left !important; }
    .tpl-modern .modern-sidebar .modern-contact p { font-size: 12px !important; margin-bottom: 2px !important; word-break: break-all !important; }
    .tpl-modern .modern-main { padding: 10px 12px 12px !important; box-sizing: border-box; }
    .tpl-minimal .minimal-header { padding: 12px 0 14px !important; margin-bottom: 10px !important; }
    .tpl-minimal .minimal-photo { width: 75px !important; height: 100px !important; margin-bottom: 8px !important; }
    .tpl-minimal .minimal-name { font-size: 20px !important; }

    /* -------- 胶囊风格选择器 -------- */
    .rstyle-grid { gap: 5px !important; }
    .rstyle-card { padding: 4px 10px 4px 4px !important; }
    .rstyle-thumb { width: 24px !important; height: 32px !important; }
    .rstyle-title { font-size: .72rem !important; }

    /* -------- 技能选择器 -------- */
    .skill-picker { padding: 12px !important; gap: 12px !important; }
    .sp-group-title { font-size: .78rem !important; }
    .sp-tag { padding: 4px 11px !important; font-size: .8rem !important; }
    .sp-chip { font-size: .78rem !important; padding: 4px 10px !important; }

    /* -------- 平台链接（标签）-------- */
    .link-tags { gap: .4rem !important; }
    .link-tag { font-size: .8rem !important; padding: .3rem .6rem !important; }

    /* -------- AI 弹窗 -------- */
    .ai-pop-card { width: 95% !important; max-width: none !important; border-radius: 16px !important; }
    .ai-pop-body { padding: 14px !important; }
    .ai-pop-head { padding: 14px !important; }
    .ai-pop-foot { padding: 10px 14px 14px !important; }

    /* -------- Flash / empty / page -------- */
    .flash { padding: .7rem .9rem !important; font-size: .85rem !important; border-radius: 10px !important; margin-bottom: 1rem; }
    .empty-state { padding: 1.8rem .8rem !important; border-radius: 10px !important; }
    .empty-icon { font-size: 2rem !important; }
    .page-title { font-size: 1.25rem !important; }
    .page-desc { font-size: .85rem !important; margin-bottom: 1rem !important; }
    .page-header { margin-bottom: .9rem !important; }

    /* -------- 按钮组 -------- */
    .form-actions { flex-direction: column !important; gap: .5rem !important; margin-top: .8rem !important; }
    .form-actions .btn, .form-actions a.btn { width: 100%; }
    .btn { font-size: .85rem !important; padding: .55rem .9rem !important; }
    .btn-lg { padding: .7rem 1.2rem !important; font-size: .92rem !important; }

    /* -------- 访客页 -------- */
    .guest-wrap { padding: 1rem .85rem; }
    .guest-card { padding: 1.5rem 1.2rem; border-radius: 16px; }
    .card-title { font-size: 1.15rem !important; margin-bottom: 1rem !important; }
    .form { gap: .8rem; }

    /* -------- 简历编辑 -------- */
    .project-edit-item { padding: .7rem !important; border-radius: 10px !important; }
    .pe-top { flex-direction: column !important; gap: .4rem !important; }
    .pe-top .btn { align-self: flex-start !important; }
    .resume-edit-form .resume-paper { padding: .8rem !important; }

    /* -------- 小屏 ≤ 400px -------- */
    @media (max-width: 400px) {
        .btn { font-size: .82rem !important; padding: .5rem .8rem !important; }
        .brand { font-size: .85rem !important; }
        .section-title { font-size: .88rem !important; }
        .stat-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    }

    /* -------- 后台移动端适配 -------- */
    .admin-shell .sidebar { display: none; }
    .admin-shell .main { margin-left: 0; }
    .admin-shell .topbar { padding: 0 16px; height: 52px; }
    .admin-shell .content { padding: 16px; }
    .admin-shell .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .admin-shell .detail-grid { grid-template-columns: 1fr; gap: 6px 0; }
    .admin-shell .detail-grid dt { font-size: 12px; margin-bottom: 2px; }
    .admin-shell table { font-size: 12px; }
    .admin-shell th, .admin-shell td { padding: 10px 8px; }
    .admin-shell .card { padding: 16px; }
    .admin-shell .card-title { font-size: 14px; }
}

/* =====================================================
   暗色主题（系统设置）— 可选
   ===================================================== */
@media (prefers-color-scheme: dark) {
    /* 暂不自动启用，保持浅色主题一致性 */
}