/* 内容社区 H5 —— 移动端优先（主要运行于微信内置浏览器） */
:root {
    --primary: #4f6ef7;
    --primary-dark: #3d5be0;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #1f2329;
    --text2: #86909c;
    --line: #eef0f4;
    --gold: #f7a64f;
    --danger: #fa5151;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(31, 35, 41, .05);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6;
}
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 顶部导航 ---------- */
/* 顶栏与返回按钮均已移除（按需求），页面内容从屏幕顶部开始 */
.navbar { display: none; }

/* ---------- 内容区 ---------- */
.page { flex: 1; padding: 14px 14px calc(76px + env(safe-area-inset-bottom)); }
.page.no-tabbar { padding-bottom: 24px; }

.card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px 16px; margin-bottom: 12px;
}
.card.clickable { cursor: pointer; transition: transform .08s; }
.card.clickable:active { transform: scale(.985); }

/* ---------- 文章卡片 ---------- */
.art-title { font-size: 16.5px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.art-summary { color: var(--text2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--text2); font-size: 12.5px; }
.art-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tag {
    display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; margin-right: 6px;
    background: #eef1fd; color: var(--primary);
}
.tag.pin { background: #fff3e6; color: #d97a16; }
.tag.cat { background: #e8f7ef; color: #10ae66; }
.tag.paid { background: #fff7ec; color: #d97a16; font-weight: 600; }
.tag.owned { background: #e8f7ef; color: #10ae66; font-weight: 600; }

/* ---------- 首页列表卡片角标 ---------- */
/* 紧凑布局：压缩上下内距与卡片间距，一屏尽量多显示几行 */
.art-card { position: relative; padding: 9px 14px; margin-bottom: 8px; }
/* 置顶卡片：为左上角角签留出顶部空间，避免遮挡标题（普通卡片保持紧凑） */
.art-card.has-pin { padding-top: 27px; }
.art-card .art-title { font-size: 18px; }
/* 置顶：左上角贴角位置标签（斜切丝带样式） */
.corner-pin {
    position: absolute; top: 0; left: 0;
    padding: 3px 12px 3px 10px;
    font-size: 10.5px; font-weight: 600; letter-spacing: 1px;
    color: #fff; background: linear-gradient(120deg, #ffb35c, #ff8f1f);
    border-radius: 13px 0 12px 0;
    box-shadow: 0 2px 6px rgba(255, 143, 31, .35);
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
/* 卡片底部：发布时间左（带文字前缀）、金额右 */
.art-foot { display: flex; align-items: baseline; margin-top: 4px; }
.art-time { color: #9aa3af; font-size: 12px; white-space: nowrap; }
.art-price {
    margin-left: auto; color: #f43f2e; font-weight: 700; font-size: 14px;
    white-space: nowrap; letter-spacing: .3px; font-variant-numeric: tabular-nums;
}

/* ---------- 首页官方横幅 ---------- */
.home-banner {
    background: linear-gradient(120deg, #eef2ff, #e8f0ff 55%, #f2f7ff);
    border: 1px solid #dfe7fb; border-radius: 16px;
    padding: 14px 16px; margin-bottom: 12px;
}
.banner-head { display: flex; align-items: center; gap: 12px; }
.banner-logo {
    width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
    background: #fff; box-shadow: 0 2px 8px rgba(79, 110, 247, .18);
}
.banner-logo-text {
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    background: linear-gradient(135deg, #7a96f9, #4f6ef7);
}
.banner-title { font-size: 17.5px; font-weight: 700; min-width: 0; word-break: break-word; }
/* 描述独立整行，按内容完整显示（不截断省略） */
.banner-desc { color: #5a6472; font-size: 13px; line-height: 1.6; margin-top: 10px; word-break: break-word; white-space: pre-line; }

/* ---------- 分类 chips（仅首页使用：三个图标钮整体水平居中） ---------- */
.chips { display: flex; justify-content: center; gap: 14px; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0; padding: 6px 16px; border-radius: 999px; font-size: 14px;
    background: #fff; color: var(--text2); border: 1px solid var(--line); cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
/* 分类图片图标：固定 18x18 圆形显示，不论图片实际尺寸（object-fit 裁切居中） */
.cat-ico { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
/* 纯图标分类按钮：图标贴满、白边极窄，图标垂直水平居中 */
.chip.cat-chip { padding: 2px; border-radius: 50%; line-height: 0; }
.chip.cat-chip.active {
    background: #eef1fd; border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 110, 247, .25);
}
.chip.cat-chip .cat-ico { width: 56px; height: 56px; display: block; border-radius: 50%; }

/* ---------- Tab ---------- */
.tabs { display: flex; background: #fff; border-radius: 12px; padding: 4px; margin-bottom: 12px; box-shadow: var(--shadow); }
.tabs .tab { flex: 1; text-align: center; padding: 8px 0; border-radius: 9px; color: var(--text2); cursor: pointer; font-size: 14px; }
.tabs .tab.active { background: var(--primary); color: #fff; font-weight: 500; }

/* ---------- 详情页 ---------- */
/* 标题区无框紧凑：不占卡片，字号小、上下间距压缩，尽量把屏幕留给正文 */
.detail-head { padding: 0 2px; margin-bottom: 8px; }
.detail-title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.detail-meta { color: var(--text2); font-size: 12px; margin: 4px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.rich { padding: 10px 4px; font-size: 15.5px; word-break: break-word; }
.rich h3 { margin: 16px 0 8px; font-size: 17px; }
.rich p { margin: 8px 0; }
/* 正文图片自适应：不撑破版面，最大占满一行，按比例缩放 */
.rich img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 8px auto; }

/* 付费锁定 */
.locked-wrap { position: relative; margin-top: 4px; overflow: hidden; border-radius: 8px; }
.locked-mask {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.92) 88%);
}
.unlock-card {
    background: linear-gradient(135deg, #6a83f8, #4f6ef7); color: #fff;
    border-radius: var(--radius); padding: 20px 18px; text-align: center; margin-top: 26px;
    box-shadow: 0 8px 24px rgba(79, 110, 247, .35);
}
.unlock-card .lock-icon { font-size: 30px; }
.unlock-card .price { font-size: 34px; font-weight: 700; margin: 6px 0 2px; }
.unlock-card .price small { font-size: 15px; font-weight: 400; }
.unlock-card .tip { font-size: 12.5px; opacity: .85; }
.unlock-btn {
    flex: none; min-width: 58%; padding: 12px 36px; border: none; border-radius: 999px;
    background: #07c160; color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: .5px;
    box-shadow: 0 6px 16px rgba(7, 193, 96, .32); cursor: pointer;
}
.unlock-btn:active { opacity: .9; }
.unlock-btn:disabled { opacity: .6; }

/* 付费解锁免责声明（后台可编辑） */
.disclaimer {
    margin-top: 12px; padding: 10px 12px;
    background: #f7f8fb; border-radius: 10px;
    color: #9aa3af; font-size: 11.5px; line-height: 1.8;
    white-space: pre-line;
}

/* ---------- 操作条 ---------- */
/* 全站底部备案号 */
.icp-footer {
    text-align: center; padding: 18px 0 6px; margin-top: 16px;
    color: #9aa3af; font-size: 11.5px;
}
.icp-footer a { color: #9aa3af; text-decoration: none; }
.action-bar {
    display: flex; justify-content: space-around; margin-top: 8px;
    background: #fff; border-radius: 12px; padding: 8px 0; box-shadow: var(--shadow);
}
.action-bar .act {
    border: none; background: transparent; color: var(--text2); font-size: 13px;
    display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 4px 18px; border-radius: 10px;
}
.action-bar .act .em { font-size: 20px; line-height: 1; }
.action-bar .act.on { color: var(--primary); }

/* ---------- 评论 ---------- */
.section-title { font-size: 15px; font-weight: 600; margin: 16px 2px 10px; display: flex; justify-content: space-between; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment .c-head { display: flex; align-items: center; gap: 8px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #7a96f9, #4f6ef7); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.comment .nick { font-size: 13.5px; font-weight: 600; }
.comment .time { color: var(--text2); font-size: 12px; margin-left: auto; }
.comment .c-body { margin: 6px 0 0 40px; font-size: 14.5px; word-break: break-word; }
.comment .c-ops { margin-left: 40px; display: flex; gap: 16px; color: var(--text2); font-size: 12.5px; margin-top: 4px; }
.comment .c-ops span { cursor: pointer; }
.comment .reply { margin-left: 40px; background: #f7f8fb; border-radius: 10px; padding: 8px 10px; margin-top: 6px; }

.comment-input { display: flex; gap: 8px; margin-top: 14px; }
.comment-input input {
    flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; outline: none; background: #fff;
}
.comment-input input:focus { border-color: var(--primary); }

/* ---------- 表单 ---------- */
.form-card { padding: 18px 16px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.form-item input, .form-item textarea, .form-item select {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
    font-size: 15px; outline: none; background: #fff; font-family: inherit; resize: vertical;
}
.form-item input:focus, .form-item textarea:focus { border-color: var(--primary); }
.form-item textarea { min-height: 150px; }
.form-item .hint { font-size: 12px; color: var(--text2); margin-top: 4px; }
.btn {
    display: block; width: 100%; padding: 12px; border: none; border-radius: 12px;
    background: var(--primary); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:active { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.sm { width: auto; padding: 6px 16px; font-size: 13.5px; }
.btn.xs { width: auto; padding: 3px 12px; font-size: 12px; border-radius: 999px; font-weight: 500; }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .55; }
.btn.wx-btn { background: #07c160; }
.btn.wx-btn:active { background: #06ad56; }

/* ---------- 演示通道（旧测试账号快速登录） ---------- */
.demo-login { margin-top: 18px; padding-top: 4px; }
.demo-login-title { text-align: center; color: #c2c8d4; font-size: 12px; margin-bottom: 10px; }
.demo-users { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.demo-user {
    padding: 6px 14px; font-size: 12.5px; border-radius: 999px;
    background: #f2f3f5; color: #4e5969; border: 1px solid #e5e6eb;
}
.demo-user:active { background: #e2e3e7; }
.demo-user:disabled { opacity: .55; }

/* ---------- 底部导航 ---------- */
.tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 640px; z-index: 60;
    display: flex; padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.95); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar .t {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 0 6px; color: var(--text2); font-size: 11px; cursor: pointer; text-decoration: none; position: relative;
}
.tabbar .t .em { font-size: 22px; line-height: 1; }
.tabbar .t.active { color: var(--primary); font-weight: 600; }
.tabbar .t .dot {
    position: absolute; top: 4px; right: calc(50% - 16px); min-width: 16px; height: 16px;
    background: var(--danger); color: #fff; border-radius: 8px; font-size: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 论坛模块内部：消息铃铛 + 悬浮发帖按钮 */
.forum-bell { position: relative; font-size: 22px; cursor: pointer; padding: 4px 2px; }
.forum-bell .dot { position: absolute; top: 0; right: -8px; }
.fab {
    position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom));
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 28px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(79, 110, 247, .4); cursor: pointer; z-index: 55;
}
.fab:active { transform: scale(.94); }

/* ---------- 我的 ---------- */
.me-head { display: flex; align-items: center; gap: 14px; padding: 8px 4px; }
.me-head .avatar { width: 58px; height: 58px; font-size: 24px; }
.me-head .nick { font-size: 19px; font-weight: 700; }
.me-head .sub { color: var(--text2); font-size: 13px; }
.me-stats { display: flex; gap: 8px; margin-top: 4px; }
.me-stats .st { flex: 1; text-align: center; background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.me-stats .st b { font-size: 17px; display: block; }
.me-stats .st span { color: var(--text2); font-size: 12px; }
.menu-item {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff;
    border-radius: 12px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); font-size: 14.5px;
}
.menu-item .em { font-size: 19px; }
.menu-item .arrow { margin-left: auto; color: var(--text2); }

/* ---------- 通知 ---------- */
.notice { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: none; }
.notice .n-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.notice.unread .n-title { font-weight: 700; }
.notice .n-title { font-size: 14px; }
.notice .n-content { color: var(--text2); font-size: 13px; }
.notice .n-time { color: var(--text2); font-size: 11.5px; margin-left: auto; flex-shrink: 0; }

/* ---------- 推广 / 提现 ---------- */
.qrcode-box { display: flex; justify-content: center; padding: 10px; background: #fff; border-radius: 12px; width: 196px; margin: 0 auto; border: 1px solid var(--line); }
.qrcode-box img, .qrcode-box canvas { display: block; }
.invited-tip { background: #fff7ec; color: #d97a16; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }

/* ---------- 通用 ---------- */
.empty { text-align: center; color: var(--text2); padding: 46px 0; font-size: 13.5px; }
.empty .em { font-size: 40px; display: block; margin-bottom: 8px; }
.load-more { text-align: center; color: var(--text2); padding: 12px; font-size: 13px; cursor: pointer; }
.toast {
    position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 999;
    background: rgba(0,0,0,.75); color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 14px;
    max-width: 78vw; text-align: center; pointer-events: none;
}
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.modal {
    background: #fff; width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
}
.modal h3 { font-size: 16.5px; margin-bottom: 12px; }
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-box input {
    flex: 1; border: none; background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14.5px; outline: none; box-shadow: var(--shadow);
}
.badge-status { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.badge-status.ok { background: #e8f7ef; color: #10ae66; }
.badge-status.off { background: #ffeeec; color: var(--danger); }
