/* 生产环境覆盖：去掉设计预览专用偏移，补齐通用状态 */
.site-header { top: 0; }
.mobile-menu { inset: 72px 0 0; }
.page { display: block; }
#app { container-type: inline-size; }

/* 认证弹窗补充 */
.auth-error { color: var(--c-danger); font-size: 11.5px; line-height: 1.6; min-height: 0; margin: 2px 0 10px; }
.auth-error:empty { display: none; }
.auth-success { color: var(--c-success); font-size: 12px; margin: 8px 0; }
.auth-tip { color: var(--c-muted); font-size: 11px; margin-top: 4px; }
.auth-inline { display: flex; gap: 8px; align-items: center; }
.auth-inline .input { flex: 1; }
.auth-inline .btn { flex: none; height: 44px; }
.auth-panel .check { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--c-muted); margin: 8px 0 14px; }
.auth-panel .check input { margin-top: 2px; accent-color: var(--c-primary); }
.auth-panel .check a { color: var(--c-primary); }
.auth-foot a { color: var(--c-primary); }
.auth-code-tip { font-size: 10.5px; color: var(--c-muted); margin-top: 4px; }
.auth-modal .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* 通用表单校验 */
.input.is-error, .select.is-error { border-color: var(--c-danger) !important; box-shadow: 0 0 0 3px rgba(166, 71, 59, .10) !important; }
.field-hint { font-size: 11px; color: var(--c-muted); margin-top: 4px; }
.field-error { font-size: 11px; color: var(--c-danger); margin-top: 4px; }

/* 通用空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--c-muted); }
.empty-state .empty-icon { font-size: 36px; opacity: .35; margin-bottom: 10px; }

/* 任务进度 */
.progress-panel { background: linear-gradient(180deg, #FFFDF9, #FAF7F0); border: 1px solid rgba(142,59,47,.16); border-radius: 14px; padding: 20px 22px; margin: 22px 0; box-shadow: 0 10px 26px rgba(30,28,25,.06); }
.progress-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--c-ink); }
.progress-head strong { flex: 1; font-weight: 600; }
.progress-head span:last-child { font-family: var(--font-num); color: var(--c-primary); font-size: 13px; }
.progress-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-primary-50); border-top-color: var(--c-primary); background: transparent; animation: progressSpin .9s linear infinite; flex: none; }
@keyframes progressSpin { to { transform: rotate(360deg); } }
.progress-bar { height: 8px; background: #F0EAE0; border-radius: 999px; overflow: hidden; margin: 14px 0 9px; }
.progress-bar i { position: relative; display: block; height: 100%; background: linear-gradient(90deg, #B08D57, #8E3B2F); border-radius: inherit; transition: width .4s ease; overflow: hidden; }
.progress-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: progressShine 1.3s linear infinite; }
@keyframes progressShine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.progress-hint { font-size: 11px; color: var(--c-muted); }

.alert-inline { background: rgba(166, 71, 59, .07); border: 1px solid rgba(166, 71, 59, .22); color: var(--c-danger); border-radius: 10px; padding: 12px 16px; font-size: 13px; margin: 18px 0; }
.alert-inline a { color: var(--c-primary); text-decoration: underline; }

/* 结果卡操作 */
.name-card .icon-btn { font-size: 12px; color: var(--c-muted); }
.name-card .icon-btn:hover { color: var(--c-primary); }

/* 通用空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--c-muted); }
.empty-state .empty-icon { font-size: 36px; opacity: .35; margin-bottom: 10px; }

/* 用户中心 */
.user-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 24px; margin-top: 18px; align-items: start; }
.user-side-card { position: sticky; top: 92px; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow-sm); }
.user-nav-item { display: flex; align-items: center; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--c-text); text-align: left; transition: .15s; }
.user-nav-item:hover { background: var(--c-surface-2); color: var(--c-primary); }
.user-nav-item.active { background: var(--c-primary-50); color: var(--c-primary); font-weight: 600; }
.user-nav-logout { color: var(--c-muted); border-top: 1px solid var(--c-line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.user-main { min-width: 0; }
.user-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--c-line); }
.user-page-head p { margin-top: 4px; font-size: 12.5px; }
.user-empty { background: #fff; border: 1px dashed var(--c-line); border-radius: 12px; padding: 34px 20px; text-align: center; color: var(--c-muted); font-size: 13px; }
.user-empty a { color: var(--c-primary); text-decoration: underline; }
.user-record-list { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; }
.user-record-item { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--c-line); font-size: 13px; flex-wrap: wrap; }
.user-record-item:last-child { border-bottom: none; }
.user-record-item strong { margin-right: 10px; }
.user-record-names { display: flex; gap: 6px; flex-wrap: wrap; }
.user-record-block { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 18px 20px; margin-top: 16px; box-shadow: var(--shadow-sm); }
.user-record-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.user-record-head strong { font-size: 14px; margin-right: 10px; }
.user-record-head .muted { font-size: 11.5px; }
.user-name-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }
.user-name-chip b { font-family: var(--font-serif); font-size: 15px; color: var(--c-ink); }
.user-name-chip span { color: var(--c-primary); }
.user-name-chip a { color: var(--c-muted); text-decoration: underline; }
.user-fav-btn { padding: 0; border: 0; background: transparent; color: var(--c-primary); font-size: 12px; cursor: pointer; text-decoration: underline; }
.user-fav-btn:disabled { color: var(--c-muted); cursor: default; text-decoration: none; }
.btn.is-fav { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-50); }

/* 认证材料上传 */
.cert-upload { display: flex; flex-direction: column; gap: 10px; }
.cert-upload .upload-dropzone { padding: 22px 18px; }
.cert-upload .upload-file-list { margin-top: 2px; }

/* 邮件可视化编辑器 */
.email-editor { border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; background: #fff; }
.email-editor-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--c-line); background: var(--c-surface-2); }
.email-editor-toolbar button { padding: 5px 9px; border: 1px solid var(--c-line); border-radius: 6px; background: #fff; color: var(--c-muted); font-size: 11.5px; line-height: 1.2; cursor: pointer; }
.email-editor-toolbar button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.email-editor-canvas { min-height: 320px; max-height: 60vh; overflow-y: auto; padding: 22px 26px; outline: none; font-size: 14px; line-height: 1.8; color: #333; background: #fff; }
.email-editor-canvas:empty:before { content: '开始编辑邮件正文…'; color: #B9B2A8; }
.email-editor-status { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-muted); font-size: 11px; }

/* 文章区块编辑器 */
.article-editor { border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; background: #fff; }
.article-editor-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--c-line); background: var(--c-surface-2); }
.editor-block-tools, .editor-inline-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.article-editor-toolbar button { padding: 5px 9px; border: 1px solid var(--c-line); border-radius: 6px; background: #fff; color: var(--c-muted); font-size: 11.5px; line-height: 1.2; cursor: pointer; }
.article-editor-toolbar button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.editor-inline-tools button { min-width: 28px; }
.article-editor-canvas { min-height: 420px; max-height: 70vh; overflow-y: auto; padding: 22px 26px; background: #fff; }
.editor-block { display: flex; gap: 8px; align-items: flex-start; padding: 4px 6px; border-radius: 8px; }
.editor-block:hover { background: #FCFAF5; }
.editor-block-gutter { display: flex; flex-direction: column; gap: 2px; width: 24px; flex: none; opacity: 0; transition: .15s; padding-top: 4px; }
.editor-block:hover .editor-block-gutter, .editor-block:focus-within .editor-block-gutter { opacity: 1; }
.editor-block-gutter button { width: 20px; height: 20px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--c-muted); font-size: 11px; line-height: 1; cursor: pointer; }
.editor-block-gutter button:hover { border-color: var(--c-line); background: #fff; color: var(--c-primary); }
.editor-block-content { flex: 1; min-width: 0; min-height: 28px; outline: none; font-size: 14px; line-height: 1.9; color: var(--c-text); }
.editor-block-content:empty:before { content: attr(data-placeholder); color: #B9B2A8; pointer-events: none; }
.editor-block-content h2 { font-family: var(--font-serif); font-size: 24px; line-height: 1.4; margin: 12px 0 6px; color: var(--c-ink); }
.editor-block-content h3 { font-family: var(--font-serif); font-size: 19px; line-height: 1.5; margin: 10px 0 4px; color: var(--c-ink); }
.editor-block-content p { margin: 0; }
.editor-block-content ul, .editor-block-content ol { margin: 4px 0; padding-left: 24px; }
.editor-block-content li { margin: 3px 0; }
.editor-block-content blockquote { margin: 4px 0; padding: 8px 14px; border-left: 3px solid var(--c-primary); background: var(--c-surface-2); border-radius: 0 8px 8px 0; color: var(--c-muted); }
.editor-block-content .editor-notice { margin: 4px 0; padding: 12px 14px; border-left: 3px solid #B08D57; background: #F5EFE3; border-radius: 0 8px 8px 0; color: #6B5633; }
.editor-block-content table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.editor-block-content th, .editor-block-content td { border: 1px solid var(--c-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.editor-block-content th { background: var(--c-surface-2); font-weight: 600; }
.editor-block-content pre { margin: 8px 0; padding: 14px; border-radius: 8px; background: #1F1D1B; color: #F5F0E7; font-size: 12.5px; line-height: 1.7; overflow: auto; white-space: pre-wrap; }
.editor-block-content hr { border: 0; border-top: 1px solid var(--c-line); margin: 14px 0; }
.article-editor-status { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-muted); font-size: 11px; }
.article-main .editor-notice { margin: 18px 0; padding: 14px 18px; border-left: 3px solid #B08D57; background: #F5EFE3; border-radius: 0 10px 10px 0; color: #6B5633; }
@media (max-width: 640px) { .article-editor-canvas { padding: 16px 12px; } .editor-block-gutter { opacity: 1; } }
.user-form { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow-sm); margin-top: 18px; }
.status-card { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 22px 24px; display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.status-tag { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); color: var(--c-muted); font-size: 12.5px; }
.status-tag.ok { background: rgba(63, 122, 94, .08); border-color: rgba(63, 122, 94, .25); color: var(--c-success); }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--c-muted); }
.pagination a:hover, .pagination a.active { border-color: var(--c-primary); color: var(--c-primary); }

@media (max-width: 900px) {
    .user-layout { grid-template-columns: 1fr; }
    .user-side-card { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
    .user-nav-item { width: auto; white-space: nowrap; }
    .user-nav-logout { border-top: none; border-left: 1px solid var(--c-line); border-radius: 0 8px 8px 0; margin: 0; }
}

/* 重名查询：最近查询删除 */
.recent-row { align-items: center; }
.recent-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 12px; }
.recent-chip a { color: var(--c-ink); }
.recent-del-form { display: inline-flex; margin: 0; }
.recent-del { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); font-size: 14px; line-height: 1; cursor: pointer; }
.recent-del:hover { background: var(--c-primary-50); color: var(--c-primary); }
.recent-clear-form { margin: 0; }
.recent-clear { padding: 4px 2px; border: 0; background: transparent; color: var(--c-muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.recent-clear:hover { color: var(--c-primary); }

/* 测名 / 解析 */
.measure-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; align-items: start; margin-top: 6px; }
.ceming-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; padding: 24px 28px; margin-top: 22px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.ceming-name { font-family: var(--font-serif); font-size: 38px; letter-spacing: .08em; color: var(--c-ink); line-height: 1.2; }
.ceming-score { display: flex; align-items: center; gap: 14px; }
.ceming-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; margin-top: 18px; }
.dimension-list { display: grid; gap: 14px; }
.dimension-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--c-text); margin-bottom: 5px; }
.dimension-head span { color: var(--c-primary); font-family: var(--font-num); }
.dimension-bar { height: 6px; background: #F0EAE0; border-radius: 999px; overflow: hidden; }
.dimension-bar i { display: block; height: 100%; background: linear-gradient(90deg, #B08D57, #8E3B2F); border-radius: inherit; }
.dimension-item p { font-size: 12px; color: var(--c-muted); line-height: 1.7; margin-top: 5px; }
.jiexi-chars { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.jiexi-char-card { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 20px; text-align: center; box-shadow: var(--shadow-sm); }
.jiexi-char { font-family: var(--font-serif); font-size: 46px; color: var(--c-ink); line-height: 1.2; margin-bottom: 4px; }
.jiexi-char-card p { font-size: 12px; color: var(--c-text); line-height: 1.8; text-align: left; margin-top: 10px; }

@media (max-width: 900px) {
    .measure-layout, .ceming-grid { grid-template-columns: 1fr; }
}

/* 后台补充：生产环境没有设计预览条，清除 54px 的演示偏移 */
.admin-shell { min-height: 100vh; }
.admin-side { top: 0; height: 100vh; }
.admin-top { top: 0; }

/* 小屏后台：侧栏改为顶部横向导航，避免直接隐藏后无法操作 */
@container app (max-width: 820px) {
    .admin-side {
        display: flex;
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        overflow-x: auto;
    }
    .admin-logo {
        flex: none;
        padding: 0 12px 0 0;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, .1);
    }
    .admin-nav {
        display: flex;
        flex: 1;
        gap: 4px;
        margin: 0;
        overflow-x: auto;
    }
    .admin-nav-group { display: none; }
    .admin-nav-item { flex: none; white-space: nowrap; }
    .admin-side-foot { display: none; }
    .admin-top { position: static; }
}
.admin-alert { padding: 10px 14px; border-radius: 8px; font-size: 12px; margin: 12px 0; }
.admin-alert.ok { background: rgba(63,122,94,.08); border: 1px solid rgba(63,122,94,.22); color: var(--c-success); }
.admin-alert.bad { background: rgba(166,71,59,.08); border: 1px solid rgba(166,71,59,.22); color: var(--c-danger); }
.admin-empty { text-align: center; padding: 22px 10px; color: var(--c-muted); font-size: 12px; }
.admin-bar-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 12px; color: var(--c-text); margin-bottom: 12px; }
.admin-bar { height: 7px; background: #F0EAE0; border-radius: 999px; overflow: hidden; }
.admin-bar i { display: block; height: 100%; border-radius: inherit; }
.admin-bar-row b { font-family: var(--font-num); font-size: 11px; color: var(--c-muted); text-align: right; }
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.admin-filters .input, .admin-filters .select { height: 36px; font-size: 12px; }
.admin-filters .btn { height: 36px; font-size: 12px; }
/* 筛选表单在筛选条内横向排列，避免输入框占满整行把按钮挤到下一行 */
.admin-filters form { display: flex; align-items: center; gap: 8px; }.admin-pagination { display: flex; gap: 6px; padding: 12px 16px; flex-wrap: wrap; }
.admin-pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 6px; font-size: 11px; color: var(--c-muted); }
.admin-pagination a.active, .admin-pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.admin-form { padding: 18px 20px; }
.admin-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form .field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--c-muted); }
.admin-form .field input, .admin-form .field select, .admin-form .field textarea { border: 1px solid var(--c-line); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; color: var(--c-text); background: #fff; }
.admin-form .field-full { grid-column: 1 / -1; }
.admin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 后台登录 */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 20% 0%, rgba(176,141,87,.12), transparent 45%), var(--c-bg); }
.admin-login-card { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.admin-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-login-brand strong { display: block; font-family: var(--font-serif); font-size: 18px; color: var(--c-ink); }
.admin-login-brand small { color: var(--c-muted); font-size: 10.5px; letter-spacing: .14em; }
.admin-login-card h1 { font-family: var(--font-serif); font-size: 24px; color: var(--c-ink); margin-bottom: 4px; }
.admin-login-card > p { font-size: 12px; margin-bottom: 20px; }
.admin-login-card .field span { font-size: 11.5px; color: var(--c-muted); }
.admin-login-card .field input { height: 44px; }
.admin-login-foot { text-align: center; margin-top: 18px; font-size: 12px; }
.admin-login-foot a { color: var(--c-muted); }
.admin-verify-mask { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(30,28,25,.58); backdrop-filter: blur(6px); }
.admin-verify-mask.open { display: flex; }
.admin-verify-card { width: 400px; max-width: 100%; background: #fff; border-radius: 14px; padding: 26px; position: relative; box-shadow: var(--shadow-lg); }
.admin-verify-card h2 { font-family: var(--font-serif); font-size: 20px; color: var(--c-ink); margin-bottom: 6px; }
.admin-verify-card > p { font-size: 12px; }
.admin-verify-close { position: absolute; right: 14px; top: 12px; font-size: 22px; color: var(--c-muted); }
.admin-code-inputs { display: flex; gap: 8px; margin: 18px 0 10px; }
.admin-code-inputs input { width: 48px; height: 54px; text-align: center; font-size: 20px; border: 1px solid var(--c-line); border-radius: 9px; outline: none; }
.admin-code-inputs input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(142,59,47,.1); }
.admin-verify-tip { font-size: 11px; color: var(--c-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-verify-tip .btn-text { font-size: 11px; }

@media (max-width: 760px) {
    .admin-form .form-grid { grid-template-columns: 1fr; }
    .admin-code-inputs input { width: 42px; height: 48px; }
}

/* 文章正文表格 */
.article-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; }
.article-content th, .article-content td { border: 1px solid var(--c-line); padding: 9px 11px; text-align: left; vertical-align: top; }
.article-content th { background: #FAF7F0; color: var(--c-muted); font-weight: 600; font-size: 12px; }
.article-content tr:nth-child(even) td { background: #FDFBF7; }

/* 页脚友情链接 */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-muted); }
.footer-links span { color: var(--c-muted); }
.footer-links a { color: var(--c-muted); }
.footer-links a:hover { color: var(--c-primary); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 16px); z-index: 500; background: rgba(30,28,25,.92); color: #fff; font-size: 13px; padding: 11px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; max-width: min(90vw, 480px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(166, 71, 59, .95); }
.toast.success { background: rgba(63, 122, 94, .95); }

/* 结果区通用 */
.result-section { display: none; }
.result-section.show { display: block; }
.loading-dots::after { content: '…'; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

@media (max-width: 760px) {
    .mobile-menu { inset: 64px 0 0; }
}

/* 统一弹窗（确认 / 输入） */
.ui-dialog { position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ui-dialog-overlay { position: absolute; inset: 0; background: rgba(23,21,19,.58); backdrop-filter: blur(6px); animation: uiDialogFade .18s ease both; }
.ui-dialog-card { position: relative; width: min(420px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-lg); animation: uiDialogIn .22s ease both; }
.ui-dialog-close { position: absolute; right: 10px; top: 8px; width: 32px; height: 32px; border-radius: 50%; color: var(--c-muted); font-size: 20px; line-height: 1; display: grid; place-items: center; }
.ui-dialog-close:hover { background: var(--c-surface-2); color: var(--c-ink); }
.ui-dialog-title { font-family: var(--font-serif); font-size: 19px; color: var(--c-ink); margin-bottom: 8px; padding-right: 24px; }
.ui-dialog-msg { font-size: 12.5px; color: var(--c-muted); line-height: 1.85; white-space: pre-line; }
.ui-dialog-field { margin-top: 14px; }
.ui-dialog-field .input { width: 100%; height: 42px; }
.ui-dialog-hint { font-size: 10.5px; color: var(--c-muted); margin-top: 6px; line-height: 1.6; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.ui-dialog-actions .btn { min-width: 88px; height: 36px; font-size: 12.5px; }
@keyframes uiDialogFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes uiDialogIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes uiDialogOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(.99); } }
.ui-dialog.closing .ui-dialog-overlay { animation: uiDialogFade .14s ease reverse both; }
.ui-dialog.closing .ui-dialog-card { animation: uiDialogOut .14s ease both; }

@media (max-width: 640px) {
    .ui-dialog { align-items: flex-end; padding: 0; }
    .ui-dialog-card { width: 100%; border-radius: 16px 16px 0 0; padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); }
}

/* AI 生成中遮罩 */
.ai-generating-mask { position: fixed; inset: 0; z-index: 650; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(23,21,19,.62); backdrop-filter: blur(6px); animation: uiDialogFade .18s ease both; }
.ai-generating-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--c-line); border-radius: 14px; padding: 28px 26px; box-shadow: var(--shadow-lg); text-align: center; animation: uiDialogIn .22s ease both; }
.ai-spinner { width: 40px; height: 40px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid var(--c-primary-50); border-top-color: var(--c-primary); animation: aiSpin .9s linear infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-generating-card h3 { font-family: var(--font-serif); font-size: 19px; color: var(--c-ink); margin-bottom: 6px; }
.ai-generating-card p { font-size: 12px; color: var(--c-muted); line-height: 1.8; }
.ai-generating-bar { height: 6px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; margin: 18px 0 10px; }
.ai-generating-bar span { display: block; height: 100%; width: 42%; border-radius: 999px; background: var(--grad-cta); animation: aiBar 1.5s ease-in-out infinite; }
@keyframes aiBar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.ai-generating-note { font-size: 10.5px; color: var(--c-muted); }

/* 前台意见反馈入口 */
.feedback-fab {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 60;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 12px 8px; background: #fff; border: 1px solid var(--c-line); border-right: 0;
    border-radius: 10px 0 0 10px; color: var(--c-primary); font-size: 11px; letter-spacing: .04em;
    box-shadow: var(--shadow-sm); transition: .2s;
}
.feedback-fab:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.feedback-fab svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
    .feedback-fab {
        top: auto; bottom: 78px; right: 14px; flex-direction: row;
        border-right: 1px solid var(--c-line); border-radius: 999px; padding: 9px 14px;
        box-shadow: var(--shadow-md);
    }
    .feedback-fab span { font-size: 12px; }
}

/* 后台上传弹窗内的分类选择 */
.upload-dialog-body .field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--c-muted); }
.upload-dialog-body .field .select { height: 38px; font-size: 12px; }
.upload-dropzone { cursor: pointer; }
.upload-dropzone.dragover { border-color: var(--c-primary); background: var(--c-primary-50); }

/* 文章目录内的 CTA 按钮不受目录链接样式影响 */
.toc .toc-cta .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #fff; }
.toc .toc-cta .btn.btn-ghost { color: var(--c-primary); }

/* 分享海报 */
.poster-item { cursor: pointer; }
.poster.active { box-shadow: 0 0 0 2px var(--c-primary), var(--shadow-md); }
.poster .qr canvas, .poster .qr img { display: block; width: 100% !important; height: 100% !important; }
.poster-hero { font-family: var(--font-num); font-size: 58px; line-height: 1.05; color: var(--c-primary); letter-spacing: .01em; margin-top: 8px; }
.poster.dark .poster-hero { color: var(--c-gold); }
.poster-hero.sm { font-size: 40px; }
.poster-hero small { font-size: 14px; font-family: inherit; margin-left: 2px; opacity: .7; }
.poster-hero-label { font-size: 8.5px; letter-spacing: .2em; opacity: .5; margin-top: 5px; }
.poster-hanzi { font-family: var(--font-serif); font-size: 104px; line-height: 1.15; color: var(--c-ink); }
.poster.dark .poster-hanzi { color: #F3E7CE; }
.poster-article-title { font-family: var(--font-serif); font-size: 24px; line-height: 1.55; max-width: 290px; color: var(--c-ink); }
.poster.dark .poster-article-title { color: #F3E7CE; }
