/* ==========================================================================
   MtF — 移动端 H5(v7 高级美式 normal · 极致克制)
   设计原则:
   - 砍掉 90% 内容,只留 10% 关键
   - 每屏单一焦点,大量留白
   - 字号清晰分层(单一来源)
   - 极弱阴影(几乎无)+ 细线
   - 圆角统一 12px
   - Inter 500-600,字距自然
   ========================================================================== */

/* ---- 特殊字体(用户在 forum/assets/ 上传 xxs.ttf)---- */
@font-face {
    font-family: 'xxs';
    src: url('../xxs.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'xxs';
    src: url('../xxs.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'xxs';
    src: url('../xxs.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'xxs';
    src: url('../xxs.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ===== 颜色 ===== */
    --bg:        #ffffff;
    --bg-soft:   #fafafb;
    --bg-dim:    #f2f2f5;
    --ink:       #0a0a0a;
    --ink-2:     #6b6b75;
    --ink-3:     #9a9aa3;
    --line:      #ececef;
    --line-2:    #f6f6f8;
    --accent:    #5b59d8;
    --accent-soft: #eaeaef;
    --shadow-1:  0 1px 2px rgba(15,15,30,.04);
    --shadow-2:  0 1px 3px rgba(15,15,30,.04), 0 4px 12px rgba(15,15,30,.04);

    /* ===== 流体圆角(随屏宽 8-14) ===== */
    --r:    clamp(10px, 0.5rem + 0.6vw, 14px);
    --r-sm: clamp(6px,  0.4rem + 0.3vw, 8px);
    --r-lg: clamp(14px, 0.6rem + 0.8vw, 18px);

    /* ===== 流体字号 ===== */
    --fs-body:        clamp(0.875rem, 0.83rem + 0.2vw, 0.9375rem);     /* 14 → 15 */
    --fs-card-title:  clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);    /* 15 → 17 */
    --fs-title:       clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);         /* 20 → 24 */
    --fs-h1:          clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);        /* 28 → 36 */
    --fs-mini:        clamp(0.625rem, 0.6rem + 0.1vw, 0.6875rem);     /* 10 → 11 */
    --fs-sub:         clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);    /* 11 → 12 */
    --fs-meta:        clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);     /* 12 → 13 */

    /* ===== 流体间距 ===== */
    --pad-x:    clamp(14px, 0.6rem + 1.4vw, 24px);   /* 容器左右内边距 */
    --gap-card: clamp(8px, 0.4rem + 0.6vw, 14px);    /* 卡片间距 */
    --gap-block: clamp(6px, 0.3rem + 0.4vw, 10px);   /* 卡内块间距 */

    /* ===== 容器宽度 ===== */
    --container: clamp(360px, 100%, 720px);           /* 移动全宽,PC 720 居中 */

    --ease:      cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: 'xxs', 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg-soft);
    min-height: 100vh; min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
    letter-spacing: -.01em;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; letter-spacing: -.005em; max-width: 100%; }

/* 容器:移动全宽,PC 居中 + 阴影 */
.app {
    max-width: var(--container);
    margin: 0 auto;
    min-height: 100vh; min-height: 100dvh;
    background: var(--bg);
    position: relative;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 0 0 1px transparent;
}
.page { padding: 0 var(--pad-x) calc(32px + env(safe-area-inset-bottom, 0px)); }

/* ---- 通用按钮(简)---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
    padding: 0.7em 1.4em; border-radius: var(--r-sm);
    font-weight: 500; transition: opacity .15s var(--ease);
    font-size: var(--fs-body); letter-spacing: -.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn:active { opacity: .7; }
.btn.big { width: 100%; padding: 0.95em 1em; font-size: var(--fs-body); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #1f1f23; }
.btn.ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   tab bar — 极简(细线 + 黑文字)
   ========================================================================== */
body.page-likes .tabbar { display: none !important; }
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    display: flex; max-width: var(--container); margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--line);
}
.tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 0 12px; color: var(--ink-3);
    font-size: var(--fs-mini); font-weight: 500;
    transition: color .15s var(--ease); letter-spacing: .04em;
}
.tab .ic { width: 22px; height: 22px; flex: 0 0 auto; }
.tab.on { color: var(--ink); }
.tab:active { opacity: .5; }

/* ==========================================================================
   帖子卡 — 圆角方块(细线 + 极弱阴影 + 间距)
   ========================================================================== */
.post-list { display: flex; flex-direction: column; gap: var(--gap-card); }
.post-card {
    position: relative;
    isolation: isolate;
    background: #fff; border-radius: var(--r-lg);
    padding: clamp(12px, 0.5rem + 0.6vw, 16px) clamp(14px, 0.6rem + 0.7vw, 18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    transition: box-shadow .25s var(--ease), transform .25s var(--ease);

    /* ---- 边缘光晕特效变量(由 JS 实时写入) ---- */
    --edge-proximity: 0;
    --cursor-angle: 45deg;
    --edge-sensitivity: 28;
    --color-sensitivity: calc(var(--edge-sensitivity) + 18);
    --cone-spread: 22;
    --glow-padding: 24px;
    --fill-opacity: .35;
    --gradient-one:   radial-gradient(at 80% 55%, hsla(268, 100%, 76%, 1) 0px, transparent 50%);
    --gradient-two:   radial-gradient(at 69% 34%, hsla(349, 100%, 74%, 1) 0px, transparent 50%);
    --gradient-three: radial-gradient(at 8%  6%,  hsla(136, 100%, 78%, 1) 0px, transparent 50%);
    --gradient-four:  radial-gradient(at 41% 38%, hsla(192, 100%, 64%, 1) 0px, transparent 50%);
    --gradient-five:  radial-gradient(at 86% 85%, hsla(186, 100%, 74%, 1) 0px, transparent 50%);
    --gradient-six:   radial-gradient(at 82% 18%, hsla(52,  100%, 65%, 1) 0px, transparent 50%);
    --gradient-seven: radial-gradient(at 51% 4%,  hsla(12,  100%, 72%, 1) 0px, transparent 50%);
    --gradient-base:  linear-gradient(#c299ff 0 100%);
    --card-bg: #fff;
}
.post-card:active {
    transform: scale(.998);
    box-shadow: 0 1px 3px rgba(15,15,30,.05);
}

/* ==========================================================================
   .post-card 边缘光晕(参考 .border-glow-card 效果)
   - ::before 锥形 mesh-gradient 描边
   - ::after  边缘内填充
   HTML 不动,所有光晕由伪元素 + CSS 变量实现
   ========================================================================== */
.post-card::before,
.post-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: opacity .25s ease-out;
    z-index: -1;
}

/* 描边渐变 */
.post-card::before {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--card-bg) 0 100%) padding-box,
        linear-gradient(rgb(255 255 255 / 0%) 0% 100%) border-box,
        var(--gradient-one)   border-box,
        var(--gradient-two)   border-box,
        var(--gradient-three) border-box,
        var(--gradient-four)  border-box,
        var(--gradient-five)  border-box,
        var(--gradient-six)   border-box,
        var(--gradient-seven) border-box,
        var(--gradient-base)  border-box;
    opacity: calc(
        (var(--edge-proximity) - var(--color-sensitivity))
        / (100 - var(--color-sensitivity))
    );
    mask-image:
        conic-gradient(
            from var(--cursor-angle) at center,
            black   calc(var(--cone-spread) * 1%),
            transparent calc((var(--cone-spread) + 15) * 1%),
            transparent calc((100 - var(--cone-spread) - 15) * 1%),
            black   calc((100 - var(--cone-spread)) * 1%)
        );
}

/* 内部边缘彩色填充 */
.post-card::after {
    background:
        var(--gradient-one)   padding-box,
        var(--gradient-two)   padding-box,
        var(--gradient-three) padding-box,
        var(--gradient-four)  padding-box,
        var(--gradient-five)  padding-box,
        var(--gradient-six)   padding-box,
        var(--gradient-seven) padding-box,
        var(--gradient-base)  padding-box;
    opacity: calc(
        var(--fill-opacity)
        * (var(--edge-proximity) - var(--color-sensitivity))
        / (100 - var(--color-sensitivity))
    );
    mix-blend-mode: soft-light;
    mask-image:
        linear-gradient(to bottom, black, black),
        radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
        radial-gradient(ellipse at 66% 66%, black 5%, transparent 40%),
        radial-gradient(ellipse at 33% 33%, black 5%, transparent 40%),
        radial-gradient(ellipse at 66% 33%, black 5%, transparent 40%),
        radial-gradient(ellipse at 33% 66%, black 5%, transparent 40%),
        conic-gradient(
            from var(--cursor-angle) at center,
            transparent 5%, black 15%, black 85%, transparent 95%
        );
    mask-composite: subtract, add, add, add, add, add;
}

/* 鼠标离开:渐隐 0.75s */
.post-card:not(:hover)::before,
.post-card:not(:hover)::after {
    opacity: 0;
    transition: opacity .75s ease-in-out;
}

/* 兼容:无 hover 的设备(纯触屏)始终显示轻微光晕 */
@media (hover: none) {
    .post-card::before,
    .post-card::after {
        opacity: calc(
            (30 - var(--color-sensitivity))
            / (100 - var(--color-sensitivity))
        );
    }
}

/* prefers-reduced-motion:立即显隐 */
@media (prefers-reduced-motion: reduce) {
    .post-card::before,
    .post-card::after { transition: none; }
}
.post-head { display: flex; align-items: stretch; gap: 10px; margin-bottom: var(--gap-block); }
.avatar { width: clamp(36px, 1.9rem + 0.4vw, 42px); border-radius: 50%; overflow: hidden; background: var(--bg-soft); flex: 0 0 auto; align-self: flex-start; }
.avatar img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-head .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; align-self: center; text-align: left; }
.post-head .name { font-weight: 600; font-size: var(--fs-body); line-height: 1.2; letter-spacing: -.005em; color: var(--ink); text-align: left; }
.post-head .sub { color: var(--ink-3); font-size: var(--fs-mini); line-height: 1.1; letter-spacing: -.003em; font-weight: 400; text-align: left; }
.post-head .time { color: var(--ink-3); font-size: var(--fs-mini); flex: 0 0 auto; letter-spacing: -.003em; font-weight: 400; white-space: nowrap; }

/* 详情页关注按钮(顶部右侧) */
.post-head .head-self {
    flex: 0 0 auto;
    font-size: var(--fs-mini);
    color: var(--ink-3);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-soft);
}
.post-follow-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 0;
    font-size: 12px; font-weight: 600;
    letter-spacing: -.003em;
    cursor: pointer;
    background: linear-gradient(135deg, #ff5e87 0%, #e93b86 50%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(233, 59, 134, .22);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.post-follow-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(233, 59, 134, .32); }
.post-follow-btn:active { transform: scale(.96); }
.post-follow-btn.is-following {
    background: #f0f0f3;
    color: var(--ink-2);
    box-shadow: none;
}
.post-follow-btn.is-following:hover { background: #e5e7eb; }
.post-follow-btn.is-friend {
    background: linear-gradient(135deg, #ff5e87 0%, #e93b86 50%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(233, 59, 134, .22);
}
.post-follow-btn .ic-add { display: inline-block; }
.post-follow-btn .ic-check { display: none; }
.post-follow-btn.is-following .ic-add { display: none; }
.post-follow-btn.is-following .ic-check { display: inline-block; }
.post-follow-btn.is-disabled {
    background: linear-gradient(135deg, #ff5e87 0%, #e93b86 50%, #7c3aed 100%);
    color: #fff;
    opacity: .92;
}

.post-body { display: block; }
.post-body > * + * { margin-top: 4px; }
.post-text { color: var(--ink-2); font-size: var(--fs-body); line-height: 1.55; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; letter-spacing: -.003em; }
.post-text.truncated { position: relative; max-height: 6.8em; overflow: hidden; }
.post-text.truncated::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2.2em; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 80%); pointer-events: none; }
.read-more { display: inline; color: var(--accent); font-size: var(--fs-sub); font-weight: 500; margin-left: 2px; }
.read-more::before { content: ' '; }

.post-title { font-size: var(--fs-title); font-weight: 600; color: var(--ink); margin: 2px 0 6px; line-height: 1.25; letter-spacing: -.022em; }
.post-card-title { font-size: var(--fs-card-title); font-weight: 600; color: var(--ink); margin: 0 0 2px; line-height: 1.35; letter-spacing: -.018em; }

/* 视频播放器(本地 MP4) */
.post-video {
    position: relative; width: 100%;
    margin-top: 0;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(15,15,30,.04);
}
.post-video video {
    display: block; width: 100%; height: auto; max-height: 70dvh;
    background: #000;
}
.post-video-link {
    display: inline-block; margin-top: 0;
    color: var(--accent); font-size: var(--fs-body);
    word-break: break-all; overflow-wrap: anywhere;
}

.post-imgs { display: grid; gap: 4px; margin-top: 0; }
.post-imgs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.post-imgs.imgs-1 { grid-template-columns: 1fr; }
.post-imgs.imgs-1 img { aspect-ratio: 16 / 9; border-radius: var(--r); }
.post-imgs.imgs-2 { grid-template-columns: 1fr 1fr; }
.post-imgs.imgs-3 { grid-template-columns: 1fr 1fr 1fr; }

.post-foot { display: flex; gap: 6px; margin-top: var(--gap-block); }
.post-foot .act {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px;
    color: var(--ink-3); font-size: var(--fs-meta); font-weight: 400;
    transition: color .15s var(--ease); letter-spacing: -.003em;
    min-height: 32px;
}
.post-foot .act .ic { width: 16px; height: 16px; flex: 0 0 auto; }
.post-foot .act:hover { color: var(--ink-2); }
.post-foot .act:active { opacity: .5; }
.post-foot .act.like.on { color: var(--accent); font-weight: 500; }
.post-foot .act.like.on .ic { animation: likePop .3s var(--ease); fill: var(--accent); }
.post-foot .act.delete { color: var(--ink-3); margin-left: auto; padding: 6px 4px; }
.post-foot .act.delete:hover { color: var(--ink); }
@keyframes likePop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   论坛列表页头(简)
   ========================================================================== */
.page-home .page-title { font-size: 36px; font-weight: 600; letter-spacing: -.03em; margin: 32px 0 28px; color: var(--ink); }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -.025em; margin: 32px 0 24px; color: var(--ink); }

.seg-pill {
    display: flex; background: transparent; border-radius: 0; padding: 0;
    margin-bottom: 32px; border-bottom: 1px solid var(--line);
    gap: 32px;
}
.seg-pill .seg {
    flex: 0 0 auto; text-align: center; padding: 10px 0;
    color: var(--ink-3); font-weight: 400; transition: color .15s var(--ease);
    font-size: 14px; letter-spacing: -.005em;
    border: 0;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    display: inline-block;
    margin-bottom: 0;
}
.seg-pill .seg.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }

.btn-publish {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    background: var(--ink); color: #fff;
    border-radius: var(--r); font-size: 14px; font-weight: 500;
    margin-bottom: 28px;
    transition: opacity .15s var(--ease);
    letter-spacing: -.005em;
}
.btn-publish:hover { background: #1f1f23; }
.btn-publish .ic { width: 18px; height: 18px; }

/* ==========================================================================
   详情页(简) — 帖子 + 评论区合并为一张卡
   ========================================================================== */
/* 详情页不显示底部导航栏(双保险,即使 render_footer 误传 true 也能隐藏) */
body:has(.page-detail) .tabbar { display: none !important; }
body:has(.page-detail) .app { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important; }
.page-detail .post-card {
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    padding-bottom: 14px;
}
.comments {
    background: #fff;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    border: 1px solid var(--line);
    border-top: 0;
    padding: 4px var(--pad-x) 0;
    margin-top: -1px;
    box-shadow: var(--shadow-1);
}
.comments h3 { font-size: var(--fs-mini); font-weight: 500; margin: 16px 0 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.comments .empty { color: var(--ink-3); text-align: center; padding: 32px 0 36px; font-size: var(--fs-body); }
.cmt { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cmt:last-child { border-bottom: 0; }
.cmt .avatar { width: 32px; height: 32px; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-name { font-size: var(--fs-meta); font-weight: 500; color: var(--ink); letter-spacing: -.005em; }
.cmt-time { color: var(--ink-3); font-weight: 400; font-size: var(--fs-sub); margin-left: 6px; }
.cmt-text { font-size: var(--fs-body); line-height: 1.65; margin-top: 4px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); letter-spacing: -.003em; }

/* 长按反馈 */
.cmt {
    transition: background .15s var(--ease), transform .15s var(--ease);
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
}
.cmt.cmt-own { cursor: pointer; }
.cmt.cmt-pressing {
    background: var(--bg-dim);
    transform: scale(.985);
}
.cmt-form {
    display: flex; gap: 8px; margin-top: -1px;
    background: #fff; padding: 14px var(--pad-x) 16px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    border: 1px solid var(--line);
    border-top: 0;
    box-shadow: var(--shadow-1);
}
.cmt-form input {
    flex: 1; padding: 10px 0; border: 0; outline: 0;
    background: transparent; font-size: var(--fs-body); color: var(--ink);
    letter-spacing: -.005em; font-weight: 400;
    min-width: 0;
}
.cmt-form input::placeholder { color: var(--ink-3); }
.cmt-form button {
    white-space: nowrap; padding: 8px 16px;
    background: var(--ink); color: #fff;
    border-radius: var(--r-sm); font-size: var(--fs-meta); font-weight: 500;
    letter-spacing: -.005em;
    transition: opacity .15s var(--ease);
}
.cmt-form button:hover { opacity: .85; }

/* 评论图片按钮 */
.cm-img-btn {
    background: transparent !important;
    color: var(--ink-2) !important;
    padding: 6px !important;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    border-radius: 6px !important;
    width: 34px; height: 34px;
    flex: 0 0 auto;
    transition: background .12s var(--ease), color .12s var(--ease) !important;
}
.cm-img-btn:hover { background: var(--bg-dim) !important; color: var(--ink) !important; opacity: 1 !important; }
.cm-img-btn:active { background: var(--line) !important; }
.cm-img-btn .ic { width: 20px; height: 20px; }

/* 评论图片预览缩略图(发送前) */
.cm-img-preview {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 0 var(--pad-x) 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    margin-top: -1px;
}
.cm-img-preview[hidden] { display: none; }
.cm-img-preview .thumb {
    position: relative;
    width: 64px; height: 64px;
    border-radius: 6px; overflow: hidden;
    background: var(--bg-dim);
    border: 1px solid var(--line);
}
.cm-img-preview .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.cm-img-preview .thumb .x {
    position: absolute; top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: rgba(0,0,0,.6); color: #fff;
    border: 0; border-radius: 50%;
    font-size: 11px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    padding: 0;
}

/* 评论中的图片网格 */
.cmt-imgs {
    display: grid; gap: 4px;
    margin-top: 8px;
    max-width: 320px;
}
.cmt-imgs.imgs-1 { grid-template-columns: 1fr; }
.cmt-imgs.imgs-2 { grid-template-columns: repeat(2, 1fr); }
.cmt-imgs.imgs-3, .cmt-imgs.imgs-4, .cmt-imgs.imgs-5, .cmt-imgs.imgs-6,
.cmt-imgs.imgs-7, .cmt-imgs.imgs-8, .cmt-imgs.imgs-9 {
    grid-template-columns: repeat(3, 1fr);
}
.cmt-imgs a {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 6px; overflow: hidden;
    border: 1px solid var(--line);
}
.cmt-imgs img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ==========================================================================
   topbar(简 · 仅细线)
   ========================================================================== */
.topbar {
    display: flex; align-items: center; padding: clamp(14px, 0.6rem + 0.6vw, 20px) 0;
    border-bottom: 1px solid var(--line);
}
.topbar .back { font-size: clamp(20px, 1rem + 0.6vw, 24px); color: var(--ink); padding: 0 14px 0 0; line-height: 1; font-weight: 300; }
.topbar h2 { margin: 0; font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem); font-weight: 600; letter-spacing: -.015em; }
.topbar.topbar-create { position: relative; }
.topbar.topbar-create h2 { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; margin: 0; }
.topbar.topbar-create .cancel { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: var(--fs-body); padding: 6px 4px; font-weight: 500; }

/* ==========================================================================
   表单(简)
   ========================================================================== */
.form-label {
    display: block;
    font-size: 11px; font-weight: 500; color: var(--ink-3);
    margin: 32px 0 10px;
    letter-spacing: .08em; text-transform: uppercase;
}
.form-label:first-child { margin-top: 0; }
/* ==========================================================================
   发布页 — 深度美化 v10
   ========================================================================== */
.page-create-immersive { padding: 0 0 100px; background: #fff; }
.page-create-immersive .topbar {
    position: relative; height: 48px;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 0 20px; border-bottom: 1px solid var(--line-2);
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.page-create-immersive .topbar .cancel {
    color: var(--ink-2); font-size: 14px; font-weight: 500; padding: 6px 4px;
}

.create-hero {
    position: relative;
    padding: clamp(28px, 1.2rem + 2vw, 48px) var(--pad-x) clamp(20px, 0.8rem + 1.5vw, 32px);
    background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%);
    overflow: hidden;
}
.create-hero-deco {
    position: absolute; top: -40px; right: -60px;
    width: clamp(160px, 30vw, 260px); height: clamp(160px, 30vw, 260px); border-radius: 50%;
    background: radial-gradient(circle, rgba(91,89,216,.08) 0%, rgba(91,89,216,0) 70%);
    pointer-events: none;
}
.create-hero h1 {
    font-size: var(--fs-h1); font-weight: 600; color: var(--ink);
    margin: 0 0 8px; letter-spacing: -.028em; line-height: 1.1;
    position: relative;
}
.create-hero p {
    font-size: var(--fs-body); color: var(--ink-3); margin: 0;
    letter-spacing: -.003em; position: relative;
}

.create-form { padding: 8px var(--pad-x) 0; }
.create-form .form-field { margin-bottom: clamp(16px, 0.8rem + 0.8vw, 24px); }
.create-form .form-label {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--fs-sub); font-weight: 500; color: var(--ink-2);
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 10px;
}
.create-form .form-label-ic { width: 14px; height: 14px; color: var(--ink-3); flex: 0 0 auto; }
.create-form .form-label-tag {
    margin-left: auto; font-size: var(--fs-mini); font-weight: 400;
    color: var(--ink-3); text-transform: none; letter-spacing: -.003em;
    background: var(--bg-soft); padding: 2px 8px; border-radius: 6px;
}

.form-input {
    width: 100%; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--bg-soft);
    font-size: var(--fs-body); color: var(--ink);
    box-sizing: border-box; font-weight: 400;
    letter-spacing: -.005em;
    transition: all .2s var(--ease);
    min-height: 44px;
}
.form-input:focus { border-color: var(--ink); background: #fff; }
.form-input::placeholder { color: var(--ink-3); }
.form-title { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); font-weight: 500; letter-spacing: -.015em; }

.create-form textarea {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 16px 18px; min-height: clamp(160px, 8rem + 6vw, 220px); background: var(--bg-soft);
    transition: all .2s var(--ease);
    line-height: 1.7; font-size: var(--fs-body); color: var(--ink);
    font-family: inherit; resize: none;
}
.create-form textarea:focus { border-color: var(--ink); background: #fff; }
.create-form textarea::placeholder { color: var(--ink-3); }

/* 视频上传(大拖拽区) */
.video-drop {
    position: relative;
    border: 1.5px dashed var(--line);
    border-radius: 14px;
    background: var(--bg-soft);
    transition: all .25s var(--ease);
    overflow: hidden;
}
.video-drop.dragover { border-color: var(--ink); background: #fff; }
.video-drop.has-file { border-style: solid; border-color: var(--line); background: #fff; }
.video-drop input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.video-drop-empty {
    padding: 36px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--ink-3);
}
.video-drop-ic { width: 32px; height: 32px; color: var(--ink-3); margin-bottom: 4px; }
.video-drop-title { font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: -.005em; }
.video-drop-hint { font-size: 12px; color: var(--ink-3); letter-spacing: -.003em; }

.video-drop-preview {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
}
.video-drop-preview[hidden] { display: none; }
.video-drop-preview video {
    width: 100px; height: 100px; border-radius: 10px;
    object-fit: cover; background: #000; flex: 0 0 auto;
}
.video-info { flex: 1; min-width: 0; padding: 0 4px; }
.video-name {
    font-size: 14px; font-weight: 500; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}
.video-meta {
    font-size: 12px; color: var(--ink-3);
    letter-spacing: -.003em;
}
.video-remove {
    flex: 0 0 auto; width: 32px; height: 32px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-2); transition: all .2s var(--ease);
}
.video-remove:hover { background: var(--bg-soft); color: #c33; border-color: #fcc; }
.video-remove svg { width: 14px; height: 14px; }

/* 图片区 */
.img-picker {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.create-form .add-img {
    width: 80px; height: 80px; border: 1.5px dashed var(--ink-3); border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--ink-3); font-size: 11px; gap: 2px; background: var(--bg-soft);
    transition: all .2s var(--ease); cursor: pointer;
}
.create-form .add-img:hover { border-color: var(--ink-2); color: var(--ink-2); }
.create-form .add-img .ic { width: 22px; height: 22px; }

.form-actions {
    margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--line-2);
}
.create-form .submit-btn {
    width: 100%; padding: 18px 24px;
    border-radius: 14px; border: 0; cursor: pointer;
    background: var(--ink); color: #fff;
    font-size: 15px; font-weight: 500; letter-spacing: -.005em;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .2s var(--ease);
    box-shadow: 0 1px 2px rgba(15,15,30,.08), 0 4px 12px rgba(15,15,30,.06);
}
.create-form .submit-btn:active { transform: scale(.985); opacity: .9; }
.create-form .submit-ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.create-form .submit-btn:hover .submit-ic { transform: translateX(2px); }

/* ==========================================================================
   Toast + 弹窗
   ========================================================================== */
.toast {
    position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(8px);
    background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
    font-size: 13px; z-index: 100; opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    font-weight: 500; letter-spacing: -.005em;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.app-modal {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: center; justify-content: center;
    background: rgba(15, 15, 30, .4);
    padding: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.app-modal.show { display: flex; animation: modalFade .18s var(--ease); }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.app-modal-card {
    background: #fff; border-radius: 16px;
    width: 100%; max-width: 320px;
    padding: 28px 24px 0;
    border: 1px solid var(--line);
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    text-align: center;
}
.app-modal-msg {
    color: var(--ink); font-size: 15px; line-height: 1.65;
    margin: 0 0 24px; word-break: break-word;
    letter-spacing: -.005em; font-weight: 400;
}
.app-modal-actions {
    display: flex;
    border-top: 1px solid var(--line);
    margin: 0 -24px;
}
.app-modal-btn {
    flex: 1; padding: 16px 0;
    background: transparent; border: 0;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    color: var(--ink); -webkit-tap-highlight-color: transparent;
    letter-spacing: -.005em;
    transition: background .15s var(--ease);
}
.app-modal-btn:active { background: var(--bg-soft); }
.app-modal-btn.cancel { color: var(--ink-2); }
.app-modal-btn.danger { color: var(--accent); }
.app-modal-btn + .app-modal-btn { border-left: 1px solid var(--line); }

/* ==========================================================================
   个人中心(简)
   ========================================================================== */
.page-profile { padding: 0 28px 90px; }
.me-card {
    background: transparent; color: var(--ink);
    text-align: center; margin-bottom: 40px;
    padding: 40px 0 32px;
    border-bottom: 1px solid var(--line);
}
.me-name { color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.me-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; letter-spacing: -.005em; }
.me-tabs { display: flex; justify-content: space-around; margin-top: 28px; }
.mt { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); font-size: 10px; flex: 1; padding: 6px 0; font-weight: 400; letter-spacing: .06em; }
.mt.on { color: var(--ink); }
.mt .ic { width: 20px; height: 20px; color: var(--ink-3); }
.mt.on .ic { color: var(--ink); }

.me-tabs-compact {
    display: flex; gap: 24px;
    background: transparent; border: 0; border-bottom: 1px solid var(--line);
    padding: 0 0 8px; margin: 32px 0 0;
}
.me-tabs-compact .mt { color: var(--ink-3); font-size: 12px; padding: 0 0 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.me-tabs-compact .mt.on { color: var(--ink); border-bottom-color: var(--ink); background: transparent; }

.me-list { background: transparent; border-radius: 0; overflow: hidden; margin-top: 24px; border: 0; }
.ml { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: 15px; font-weight: 400; letter-spacing: -.005em; transition: color .15s var(--ease); }
.ml:last-child { border-bottom: 0; }
.ml:active { color: var(--ink-2); }
.ml .ml-ic { width: 18px; height: 18px; color: var(--ink-2); margin-right: 12px; flex: 0 0 auto; }
.ml .kbd { color: var(--ink-3); font-style: normal; font-size: 14px; font-weight: 300; }
.kbd {
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
    background: var(--bg-soft); color: var(--ink-3);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-style: normal; font-weight: 500;
}

.logout-form { margin-top: 48px; }
.logout { width: 100%; padding: 14px; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: var(--r); font-weight: 500; font-size: 14px; letter-spacing: -.005em; transition: all .15s var(--ease); }
.logout:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   作者 tab(简)
   ========================================================================== */
.page-profile-author { padding: 0 28px 90px; }
.author-hero {
    margin: 32px 0 0; padding: 0 0 32px;
    background: transparent; color: var(--ink);
    text-align: center; border-bottom: 1px solid var(--line);
}
.author-avatar {
    width: 120px; height: 120px; border-radius: 20px;
    background: var(--bg-soft); margin: 0 auto 16px;
    overflow: hidden;
    position: relative;
}
.author-avatar img { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; display: block; }

/* 头像整个区域可点击(作为按钮) */
.author-avatar-btn {
    border: 0; padding: 0;
    display: block;
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.author-avatar-btn:hover { transform: scale(1.02); box-shadow: 0 6px 18px rgba(15,15,30,.08); }
.author-avatar-btn:active { transform: scale(.98); }

/* "更换头像"提示(hover 时显出) */
.avatar-edit-hint {
    position: absolute; left: 50%; bottom: 10px;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    border-radius: 999px;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .2s var(--ease);
    pointer-events: none;
}
.author-avatar-btn:hover .avatar-edit-hint,
.author-avatar-btn:focus .avatar-edit-hint { opacity: 1; }
.avatar-edit-hint svg { width: 12px; height: 12px; }
/* 移动端一直显示提示 */
@media (hover: none) {
    .avatar-edit-hint { opacity: 1; }
}

/* 头像选择弹窗 */
.avatar-picker {
    position: fixed; inset: 0; z-index: 250;
    display: flex; align-items: flex-end; justify-content: center;
}
.avatar-picker[hidden] { display: none; }
.avatar-picker-mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45);
    animation: sheetFadeIn .2s var(--ease) both;
}
.avatar-picker-sheet {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 8px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: sheetSlideUp .28s cubic-bezier(.2, .7, .2, 1) both;
    max-height: 80vh;
    overflow-y: auto;
}
.avatar-picker-title {
    text-align: center;
    font-size: 17px; font-weight: 600;
    color: var(--ink);
    padding: 6px 0 16px;
}

/* 预览区(同步显示当前选择) */
.avatar-picker-preview {
    position: relative;
    width: 96px; height: 96px;
    margin: 0 auto 14px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid var(--accent);
    background: var(--bg-soft);
    transition: border-color .2s var(--ease), transform .25s var(--ease);
}
.avatar-picker-preview img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.avatar-picker-preview.changed {
    animation: avatarPreviewPop .35s cubic-bezier(.2, .8, .3, 1.2) both;
}
.avatar-picker-preview-tag {
    position: absolute; top: 6px; right: 6px;
    padding: 2px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0;
}
@keyframes avatarPreviewPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* 上传预览 + 确认 */
.avatar-upload-preview {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    margin: 8px 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.avatar-upload-preview[hidden] { display: none; }
.avatar-upload-preview img {
    width: 64px; height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid var(--line);
}
.avatar-upload-info {
    flex: 1; min-width: 0;
    text-align: left;
}
.avatar-upload-info .name {
    font-size: var(--fs-meta); font-weight: 500;
    color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avatar-upload-info .size {
    font-size: var(--fs-sub); color: var(--ink-3);
    margin-top: 2px;
}
.avatar-upload-actions {
    display: flex; gap: 6px;
}
.avatar-upload-cancel,
.avatar-upload-confirm {
    padding: 7px 12px;
    border-radius: 8px;
    border: 0;
    font-size: var(--fs-sub); font-weight: 500;
    cursor: pointer;
    transition: background .12s var(--ease);
}
.avatar-upload-cancel {
    background: transparent; color: var(--ink-2);
    border: 1px solid var(--line);
}
.avatar-upload-cancel:hover { background: var(--bg-soft); }
.avatar-upload-confirm {
    background: var(--accent);
    color: #fff;
}
.avatar-upload-confirm:hover { background: #0758b3; }
.avatar-upload-confirm:disabled { opacity: .55; cursor: not-allowed; }

/* 上传中 */
.avatar-uploading {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: 10px;
    color: var(--ink-2);
    font-size: var(--fs-meta);
    margin: 8px 0;
}
.avatar-uploading[hidden] { display: none; }
.avatar-uploading .spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* 预设头像网格(4 列) */
.avatar-picker-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 0 16px;
}
.avatar-preset {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s var(--ease), border-color .15s var(--ease);
    background: var(--bg-soft);
    display: block;
}
.avatar-preset:hover { transform: scale(1.04); }
.avatar-preset.selected { border-color: var(--accent); }
.avatar-preset img {
    width: 100%; height: 100%; object-fit: cover;
    pointer-events: none;
}

/* 操作行(上传 / 重置) */
.avatar-picker-actions {
    display: flex; gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--line-2);
}
.avatar-action {
    flex: 1; height: 44px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--bg-soft);
    color: var(--ink);
    border: 0; border-radius: 10px;
    font-size: var(--fs-meta); font-weight: 500;
    cursor: pointer;
    transition: background .12s var(--ease);
}
.avatar-action:hover { background: var(--line); }
.avatar-action svg { width: 18px; height: 18px; color: var(--accent); }

.avatar-picker-close {
    width: 100%; height: 44px;
    background: var(--bg-soft);
    color: var(--ink);
    border: 0; border-radius: 10px;
    font-size: var(--fs-meta); font-weight: 500;
    cursor: pointer;
}
.author-name { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.022em; color: var(--ink); }
.author-id { margin-top: 6px; font-size: 13px; color: var(--ink-3); letter-spacing: -.005em; }
.author-id .badge {
    color: var(--ink-2); background: var(--bg-soft);
    padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 500; margin-right: 6px;
    letter-spacing: .04em;
}
.author-stats { margin-top: 28px; display: flex; justify-content: space-around; gap: 2px; }
.author-stats .ast { flex: 1; min-width: 0; text-align: center; color: var(--ink); text-decoration: none; padding: 6px 0; }
.author-stats .num { font-size: 24px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: -.025em; }
.author-stats .lbl { font-size: 10px; color: var(--ink-3); margin-top: 6px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }

.big-entry {
    display: flex; align-items: center; gap: 16px;
    background: transparent; padding: 20px 0;
    margin: 24px 0 0;
    border: 0; border-bottom: 1px solid var(--line);
    box-shadow: none; border-radius: 0;
    color: var(--ink); text-decoration: none;
    transition: opacity .15s var(--ease);
}
.big-entry:active { opacity: .6; }
.big-entry .be-icon {
    width: 40px; height: 40px; border-radius: var(--r-sm);
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}
.big-entry .be-icon .ic { width: 20px; height: 20px; }
.big-entry .be-body { flex: 1; min-width: 0; }
.big-entry .be-title { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.big-entry .be-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.big-entry .be-arrow { font-size: 18px; color: var(--ink-3); font-weight: 300; flex: 0 0 auto; }

.sec-title {
    font-size: 11px; color: var(--ink-3); font-weight: 500;
    margin: 40px 0 16px; letter-spacing: .08em; text-transform: uppercase;
}

.service-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1px; margin-bottom: 24px;
    background: var(--line);
    border: 1px solid var(--line); border-radius: var(--r);
    overflow: hidden;
}
.sg {
    background: #fff; padding: 28px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    text-decoration: none; color: var(--ink);
    border: 0; border-radius: 0; box-shadow: none;
    transition: background .15s var(--ease);
}
.sg:active { background: var(--bg-soft); }
.sg-icon {
    width: 36px; height: 36px; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-2);
}
.sg-icon svg { width: 18px; height: 18px; }
.sg-name { font-size: 13px; color: var(--ink); font-weight: 400; letter-spacing: -.005em; }

/* ==========================================================================
   发起管理(简)
   ========================================================================== */
.page-my-posts { padding: 0 28px 90px; }
.page-my-posts .topbar { padding: 18px 0; }
.my-posts-summary {
    color: var(--ink-3); font-size: 12px; padding: 0 0 16px;
    letter-spacing: .04em; font-weight: 400;
    display: flex; align-items: center; justify-content: space-between;
}
.clear-all {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--ink-3); font-size: 12px; font-weight: 400;
    background: transparent; border: 0;
    padding: 4px 8px;
    transition: color .15s var(--ease);
}
.clear-all:hover { color: var(--ink); }
.clear-all .ic { width: 12px; height: 12px; }

.page-my-posts .empty {
    background: transparent; border-radius: 0; padding: 60px 20px;
    text-align: center; border: 0; box-shadow: none;
}
.page-my-posts .empty p { color: var(--ink-3); margin: 0 0 18px; }
.page-my-posts .post-foot .act.view-detail { color: var(--ink-3); min-width: 24px; padding: 4px 4px; margin-left: auto; }
.page-my-posts .post-foot .act.view-detail:hover { color: var(--ink); }

/* ==========================================================================
   登录 / 注册(简)
   ========================================================================== */
.auth-page { padding: 0; background: #fff; }
.auth-card { background: #fff; margin: 88px 28px; padding: 0; }
.auth-card .auth-mark {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--ink);
    margin: 0 0 40px;
    position: relative;
}
.auth-card .auth-mark::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.auth-card h1 { margin: 0 0 12px; font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.auth-card .sub { color: var(--ink-3); margin: 0 0 48px; font-size: 15px; letter-spacing: -.005em; }
.auth-card .err {
    color: var(--ink); font-size: 13px; margin-bottom: 20px; padding: 12px 14px;
    background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-sm);
    font-weight: 400;
}
.auth-field {
    border-bottom: 1px solid var(--line);
    transition: border-color .2s var(--ease);
    margin-bottom: 4px;
}
.auth-field:focus-within { border-bottom-color: var(--ink); }
.auth-card input {
    width: 100%; padding: 16px 0;
    border: 0; outline: 0; background: transparent;
    font-size: 16px; color: var(--ink);
    letter-spacing: -.005em; font-weight: 400;
}
.auth-card input::placeholder { color: var(--ink-3); }
.remember-row {
    display: flex; align-items: center; gap: 8px;
    margin: 24px 0 32px;
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
}
.remember-row input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--ink);
    cursor: pointer;
}
.auth-foot { text-align: left; color: var(--ink-3); font-size: 13px; margin-top: 32px; letter-spacing: -.005em; }
.auth-foot a { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* ==========================================================================
   占位页
   ========================================================================== */
.page-simple .empty { text-align: center; padding: 120px 20px; color: var(--ink-3); }
.page-simple .empty h2 { color: var(--ink); font-size: 24px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.022em; }
.page-simple .empty p { font-size: 14px; line-height: 1.65; }
.page-simple .empty .btn { margin-top: 28px; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); font-size: 14px; }

/* ==========================================================================
   首页 v5 — 美式 normal(8 宫格 + 新鲜事 + 副标)
   ========================================================================== */
.page-home-sw { padding: 0 20px 40px; }

.sw-hero { padding: 28px 0 18px; }
.sw-hero-tag {
    display: inline-block;
    background: var(--bg-soft); color: var(--ink-2);
    padding: 6px 14px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .12em;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}
.sw-hero-title {
    font-size: 48px; font-weight: 700;
    line-height: 1.05; letter-spacing: -.03em;
    color: var(--ink); margin: 0 0 16px;
}
.sw-hero-slogan {
    font-size: 16px; line-height: 1.7; color: var(--ink-2);
    font-weight: 500; margin: 0 0 22px;
    letter-spacing: -.005em;
}
.sw-hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: #fff;
    padding: 14px 22px; border-radius: var(--r-sm);
    font-size: 14px; font-weight: 600;
    letter-spacing: -.005em;
    transition: all .2s var(--ease);
}
.sw-hero-cta:hover { background: #1f1f23; }
.sw-hero-cta:active { opacity: .9; }
.sw-hero-cta .arr { font-size: 16px; font-weight: 500; }

.sw-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin: 0 0 6px;
}
.sw-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); padding: 18px 6px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-decoration: none; color: var(--ink);
    box-shadow: var(--shadow-1);
    transition: all .2s var(--ease);
}
.sw-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.sw-card:active { transform: translateY(0); }
.sw-card-ic {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.sw-card-ic svg { width: 24px; height: 24px; }
.sw-card-name { font-size: 12px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.sw-card-sub {
    font-size: 8px; font-weight: 600;
    color: var(--ink-3); letter-spacing: .12em;
    text-transform: uppercase;
}

.sw-latest { margin: 8px 0 24px; }
.sw-sec-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 14px;
}
.sw-sec-head h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.sw-sec-link { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.sw-latest-list {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); overflow: hidden;
    box-shadow: var(--shadow-1);
}
.sw-latest-item {
    display: block; padding: 14px 16px;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink); text-decoration: none;
}
.sw-latest-item:last-child { border-bottom: 0; }
.sw-latest-item .meta {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--ink-3);
    font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    margin-bottom: 4px;
}
.sw-latest-item .nick { color: var(--ink-2); }
.sw-latest-item .title { font-size: var(--fs-body); font-weight: 500; color: var(--ink); letter-spacing: -.005em; }

.sw-quote {
    margin: 60px 0 20px; text-align: center;
    color: var(--ink-3); font-size: 13px;
    font-style: italic; font-weight: 400;
    letter-spacing: .02em;
}

/* ==========================================================================
   响应式断点
   < 360px  :小屏手机(去掉顶栏水平 padding,极小字号)
   480-767  :大屏手机
   768-1023 :小平板
   1024+    :PC 桌面(居中 + 阴影 + 多列)
   1280+    :大屏
   横屏      :手机横屏调整
   ========================================================================== */

/* 小屏手机(< 360px):极简留白 */
@media (max-width: 359px) {
    :root {
        --pad-x: 12px;
        --fs-body: 13px;
        --fs-card-title: 14px;
        --fs-title: 18px;
        --fs-h1: 22px;
    }
    .post-card { padding: 10px 12px; }
    .post-head { gap: 8px; }
}

/* PC / 平板(>= 768px):容器居中 + 阴影 */
@media (min-width: 768px) {
    body { background: var(--bg-dim); }
    .app {
        box-shadow: 0 8px 32px rgba(15,15,30,.06), 0 0 0 1px var(--line);
        margin-top: 0;
    }
    .page { padding: 0 calc(var(--pad-x) * 1.2) 32px; }
    .post-card { padding: 20px 24px; }
    .post-list { gap: 14px; }
    .post-foot { font-size: 14px; }
    .topbar { padding: 0 24px; }
    .topbar h2 { font-size: 18px; }
    .comments h3 { margin-top: 24px; }
}

/* 大屏(>= 1024px):增加容器宽度,提升留白 */
@media (min-width: 1024px) {
    :root {
        --fs-body: 15px;
        --fs-card-title: 17px;
        --fs-title: 26px;
    }
    .app { max-width: 760px; }
    .page { padding: 0 32px 40px; }
    .post-card { padding: 24px 28px; border-radius: 18px; }
    .post-list { gap: 16px; }
    .post-imgs.imgs-1 img { aspect-ratio: 21 / 9; }
}

/* 超大屏(>= 1280px):宽屏两列布局(列表页) */
@media (min-width: 1280px) {
    .app { max-width: 800px; }
    .post-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .post-list > .post-list-item:first-child { grid-column: 1 / -1; }
}

/* 桌面端 hover(只在非触摸设备) */
@media (hover: hover) and (pointer: fine) {
    .post-card:hover { box-shadow: 0 4px 16px rgba(15,15,30,.06), 0 1px 2px rgba(15,15,30,.04); }
    .post-card:active { transform: none; }
    .tab:hover { color: var(--ink-2); }
}

/* 横屏手机(高度小于 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .tabbar { padding-bottom: 0; }
    .app { padding-bottom: 60px; }
}

/* 减少动效(用户偏好) */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   图片查看器(全屏弹窗)
   ========================================================================== */
.img-viewer {
    position: fixed; inset: 0; z-index: 300;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: imgViewerFade .2s var(--ease) both;
    touch-action: pinch-zoom;
}
.img-viewer[hidden] { display: none; }
.img-viewer-img {
    max-width: 92vw; max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
    animation: imgViewerZoom .25s var(--ease) both;
    user-select: none;
    -webkit-user-drag: none;
}
.img-viewer-close {
    position: absolute; top: 14px; right: 14px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 0; border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .15s var(--ease), transform .15s var(--ease);
    padding: 0;
}
.img-viewer-close:hover { background: rgba(255, 255, 255, .25); }
.img-viewer-close:active { transform: scale(.92); }
.img-viewer-close svg { width: 18px; height: 18px; }

/* 顶部指示器 + 倒计时进度条 */
.img-viewer-head {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 1;
    pointer-events: none;
}
.img-viewer-head[hidden] { display: none; }
.img-viewer-counter {
    align-self: center;
    color: #fff; font-size: 13px; font-weight: 500;
    background: rgba(255, 255, 255, .14);
    padding: 4px 12px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.img-viewer-bars {
    display: flex; gap: 4px;
    width: 100%; max-width: 600px;
    margin: 0 auto;
}
.img-viewer-bar {
    flex: 1; height: 3px;
    background: rgba(255, 255, 255, .2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.img-viewer-bar::after {
    content: '';
    position: absolute; inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s var(--ease);
}
.img-viewer-bar.done::after { transform: scaleX(1); }
.img-viewer-bar.active::after { transform: scaleX(.5); }

/* 左右导航按钮 */
.img-viewer-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .12);
    color: #fff; border: 0; border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .15s var(--ease), opacity .2s var(--ease);
    padding: 0;
    z-index: 1;
}
.img-viewer-nav:hover { background: rgba(255, 255, 255, .24); }
.img-viewer-nav:active { transform: translateY(-50%) scale(.94); }
.img-viewer-nav.prev { left: 14px; }
.img-viewer-nav.next { right: 14px; }
.img-viewer-nav svg { width: 22px; height: 22px; }
.img-viewer-nav[hidden] { display: none; }

@keyframes imgViewerFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes imgViewerZoom {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .img-viewer, .img-viewer-img { animation: none; }
}

/* 帖子图 + 评论图:加上点击态(表示可点) */
.post-imgs img,
.cmt-imgs img {
    cursor: zoom-in;
    transition: opacity .12s var(--ease);
}
.post-imgs img:hover,
.cmt-imgs img:hover { opacity: .85; }

/* ==========================================================================
   公开个人主页 — 美国推特风(封面 + 浮头像 + 可视化统计)
   保留:抖音式粉紫渐变关注按钮(招牌)
   ========================================================================== */
:root {
    --twitter-bg:        #f2f5f9;
    --twitter-card:      #ffffff;
    --twitter-line:      #eef2f6;
    --twitter-line-2:    #dde5ef;
    --twitter-ink:       #0d1217;
    --twitter-ink-2:     #536471;
    --twitter-ink-3:     #8899a6;
    --twitter-blue:      #1d9bf0;
    --twitter-blue-soft: #f5faff;
    --twitter-blue-line: #cfe3f5;
}

.user-page {
    background: var(--twitter-bg);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* —— 顶部返回箭头 —— */
.user-back {
    position: fixed; top: 14px; left: 14px; z-index: 50;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--twitter-line);
    color: var(--twitter-ink);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    transition: transform .15s ease, background .15s ease;
}
.user-back:hover { background: #fff; transform: scale(1.05); }
.user-back:active { transform: scale(.92); }

/* —— 封面 banner —— */
.cover {
    position: relative;
    margin: 0 0 56px;        /* 给浮头像留位置 */
}
.cover-bg {
    width: 100%;
    height: 168px;
    border-radius: 0 0 28px 28px;
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
/* 6 个渐变预设 — 根据 user id 哈希分配 */
.banner-grad-1 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.banner-grad-2 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.banner-grad-3 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.banner-grad-4 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.banner-grad-5 { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); }
.banner-grad-6 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.cover-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 25% 35%, rgba(255, 255, 255, .35), transparent 45%),
        radial-gradient(circle at 75% 60%, rgba(255, 255, 255, .15), transparent 50%);
    pointer-events: none;
}
.cover-emoji {
    font-size: 64px;
    opacity: .85;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .12));
    transition: transform .4s cubic-bezier(.2, .8, .3, 1.2);
}
.cover:hover .cover-emoji { transform: scale(1.15) rotate(-5deg); }

/* 浮在封面下沿的头像 */
.cover-avatar {
    position: absolute;
    bottom: -44px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--twitter-card);
    padding: 4px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .04);
    z-index: 3;
}
.cover-avatar-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* —— 个人信息 —— */
.profile-info {
    padding: 0 22px;
    text-align: center;
}
.name-row {
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--twitter-ink);
    letter-spacing: -.025em;
    margin: 0;
}
.badge-mutual {
    font-size: 11px; font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff5e87, #7c3aed);
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0;
}
.profile-username {
    font-size: 12px;
    color: var(--twitter-ink-3);
    margin-bottom: 10px;
}
.profile-bio {
    font-size: 13px;
    color: var(--twitter-ink-2);
    line-height: 1.6;
    margin: 0 auto 16px;
    max-width: 320px;
    padding: 0 4px;
}

/* —— 可视化统计卡片 —— */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0 20px;
}
.stat-card {
    background: var(--twitter-card);
    border: 1.5px solid var(--twitter-line);
    border-radius: 14px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--twitter-ink);
    transition: all .2s cubic-bezier(.2, .9, .4, 1);
    cursor: pointer;
}
.stat-card:hover {
    background: #fafcfd;
    border-color: var(--twitter-line-2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}
.stat-card.is-active {
    border-color: var(--twitter-blue);
    background: var(--twitter-blue-soft);
}
.stat-viz {
    display: flex; align-items: flex-end;
    gap: 2px;
    height: 22px;
    width: 100%;
    justify-content: center;
}
.stat-bar {
    width: 5px;
    border-radius: 3px;
    background: var(--twitter-line-2);
    transition: height .4s ease;
    min-height: 4px;
}
.stat-bar-1 { background: var(--twitter-blue); }
.stat-bar-2 { background: #6c9ed6; }
.stat-bar-3 { background: #a8c3e6; }
.stat-number {
    font-weight: 700;
    font-size: 15px;
    color: var(--twitter-ink);
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-top: 2px;
}
.stat-label {
    font-size: 10px;
    color: var(--twitter-ink-3);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
}

/* —— 操作按钮 —— */
.user-actions {
    display: flex;
    gap: 10px;
    padding: 0 4px;
    margin-top: 4px;
}
.user-btn-action {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.005em;
    cursor: pointer;
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 5px;
    transition: all .18s cubic-bezier(.2, .9, .4, 1);
    text-decoration: none;
}

/* 抖音式粉紫渐变 — 关注主按钮(招牌) */
.user-btn-follow {
    background: linear-gradient(135deg, #ff5e87 0%, #e93b86 50%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(233, 59, 134, .28);
}
.user-btn-follow:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(233, 59, 134, .38);
}
.user-btn-follow:active { transform: scale(.96); }
.user-btn-follow .follow-icon-check { display: none; }

/* 已关注(浅灰描边) */
.user-btn-following {
    background: #f0f0f3;
    color: var(--twitter-ink-2);
    box-shadow: none;
}
.user-btn-following:hover { background: #e5e7eb; }
.user-btn-following:active { transform: scale(.96); }
.user-btn-following .follow-icon-add { display: none; }

/* 次按钮(私信 / 管理) — 白底细描边 */
.user-btn-secondary {
    flex: 0 0 auto;
    min-width: 100px;
    background: #fff;
    color: var(--twitter-ink);
    border: 1.5px solid var(--twitter-line-2);
}
.user-btn-secondary:hover {
    background: #f7f9fa;
    border-color: var(--twitter-ink-3);
}
.user-btn-secondary:active { transform: scale(.96); }

/* 自己时的"发帖子"按钮 — 黑底强调 */
.user-btn-manage {
    background: var(--twitter-ink);
    color: #fff;
    box-shadow: 0 2px 6px rgba(13, 18, 23, .12);
}
.user-btn-manage:hover {
    background: #1a232d;
    transform: translateY(-1px);
}
.user-btn-manage:active { transform: scale(.96); }

.user-btn-action:disabled {
    opacity: .55; cursor: not-allowed;
}

/* —— Tab 栏 —— */
.tab-bar {
    display: flex;
    border-bottom: 1.5px solid var(--twitter-line);
    margin: 22px 0 0;
    padding: 0 22px;
    gap: 26px;
    background: var(--twitter-bg);
}
.tab-pill {
    padding: 13px 0 11px;
    font-size: 14px;
    font-weight: 600;
    color: var(--twitter-ink-3);
    position: relative;
    cursor: pointer;
    transition: color .2s;
    letter-spacing: -.01em;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.tab-pill svg { opacity: .7; }
.tab-pill.on {
    color: var(--twitter-ink);
}
.tab-pill.on::after {
    content: "";
    position: absolute;
    bottom: -1.5px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: var(--twitter-ink);
    border-radius: 3px 3px 0 0;
}
.tab-pill.on svg { opacity: 1; }

/* —— 内容容器 —— */
.user-content {
    padding: 18px 16px 0;
}

/* —— 帖子卡片网格(2 列) —— */
.post-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.user-post-card {
    background: var(--twitter-card);
    border: 1.5px solid var(--twitter-line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .2s cubic-bezier(.2, .9, .4, 1);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .02);
    display: flex;
    flex-direction: column;
}
.user-post-card:hover {
    border-color: var(--twitter-line-2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05), 0 2px 6px rgba(0, 0, 0, .02);
    transform: translateY(-3px);
}
.user-post-card:active {
    transform: translateY(-1px) scale(.99);
}
.upc-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--twitter-bg);
}
.upc-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.upc-multi {
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(13, 18, 23, .72);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}
.upc-video {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(13, 18, 23, .72);
    color: #fff;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}
.upc-text {
    padding: 12px;
    flex: 1;
    display: flex;
    align-items: flex-start;
}
.upc-text-body {
    font-size: 12px;
    line-height: 1.55;
    color: var(--twitter-ink);
    font-weight: 500;
    word-break: break-word;
    letter-spacing: -.005em;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.upc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 10px;
    border-top: 1.5px solid var(--twitter-line);
    font-size: 11px;
    color: var(--twitter-ink-3);
    font-weight: 500;
}
.upc-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.upc-stats {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* —— 空状态 —— */
.empty-state {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--twitter-ink-3);
}
.empty-icon {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: .7;
}
.empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--twitter-ink-2);
    margin-bottom: 4px;
}
.empty-sub {
    font-size: 12px;
    color: var(--twitter-ink-3);
}

/* —— 关于卡片 —— */
.about-card {
    background: var(--twitter-card);
    border: 1.5px solid var(--twitter-line);
    border-radius: 16px;
    padding: 4px 18px;
    overflow: hidden;
}
.about-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--twitter-line);
    font-size: 13px;
}
.about-row:last-child { border-bottom: 0; }
.about-lbl {
    color: var(--twitter-ink-3);
    font-weight: 500;
}
.about-val {
    color: var(--twitter-ink);
    font-weight: 600;
}
.about-bio {
    padding: 14px 0 18px;
    border-top: 1px solid var(--twitter-line);
}
.about-bio .about-lbl { margin-bottom: 6px; display: block; }
.about-bio p {
    margin: 0;
    color: var(--twitter-ink-2);
    font-size: 13px;
    line-height: 1.6;
}

.user-bottom-safe {
    height: 20px;
}

/* —— 私信面板(底部 sheet) —— */
.msg-panel {
    position: fixed; inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.msg-panel[hidden] { display: none !important; }
.msg-mask {
    position: absolute; inset: 0;
    background: rgba(13, 18, 23, .45);
    opacity: 0;
    transition: opacity .25s ease;
}
.msg-sheet {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 14px 22px 28px;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.2, .9, .4, 1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
}
.msg-panel.show .msg-mask { opacity: 1; }
.msg-panel.show .msg-sheet { transform: translateY(0); }
.sheet-handle {
    width: 36px; height: 4px;
    background: var(--twitter-line-2);
    border-radius: 2px;
    margin: 0 auto 18px;
}
.msg-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--twitter-ink);
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: -.01em;
}
.msg-to-icon {
    margin-right: 4px;
}
.msg-input {
    width: 100%;
    min-height: 96px;
    max-height: 200px;
    background: #f7f9fa;
    border: 1.5px solid var(--twitter-line);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--twitter-ink);
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color .2s, background .2s;
}
.msg-input:focus {
    background: #fff;
    border-color: var(--twitter-blue-line);
}
.msg-count {
    text-align: right;
    font-size: 11px;
    color: var(--twitter-ink-3);
    margin-top: 4px;
}
.msg-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.msg-cancel,
.msg-send {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.msg-cancel {
    background: #f0f2f5;
    color: var(--twitter-ink-2);
}
.msg-cancel:hover { background: #e5e7eb; }
.msg-cancel:active { transform: scale(.97); }
.msg-send {
    background: var(--twitter-blue);
    color: #fff;
}
.msg-send:hover { background: #1a8cd8; }
.msg-send:active { transform: scale(.97); }

/* —— Toast —— */
.user-toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(13, 18, 23, .92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 11px 22px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.2, .9, .4, 1);
    z-index: 200;
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
    letter-spacing: -.005em;
}
.user-toast[hidden] { display: none !important; }
.user-toast.show { display: block; }
.user-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 头像链接样式 */
.avatar-link {
    display: block; line-height: 0;
    transition: transform .15s var(--ease);
}
.avatar-link:hover { transform: scale(1.05); }
.avatar-link:active { transform: scale(.95); }
.cmt .avatar-link { display: block; }
.cmt .avatar-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-home .my-posts-search,
.page-my-likes .my-posts-search,
.page-my-posts .my-posts-search,
.page-my-comments .my-posts-search {
    position: relative;
    display: flex; align-items: center;
    margin: 8px 0 12px;
    background: var(--bg-soft);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 12px;
    transition: all .2s var(--ease);
}
.page-my-likes .my-posts-search:focus-within,
.page-my-posts .my-posts-search:focus-within,
.page-my-comments .my-posts-search:focus-within,
.page-home .my-posts-search:focus-within {
    background: #fff;
    border-color: var(--ink);
}
.page-my-likes .my-posts-search .ic,
.page-home .my-posts-search .ic,
.page-my-posts .my-posts-search .ic,
.page-my-comments .my-posts-search .ic {
    width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 auto;
}
.page-my-likes .my-posts-search input,
.page-home .my-posts-search input,
.page-my-posts .my-posts-search input,
.page-my-comments .my-posts-search input {
    flex: 1; border: 0; outline: 0; background: transparent;
    padding: 12px 10px;
    font-size: var(--fs-body); color: var(--ink);
    letter-spacing: -.003em;
    min-width: 0;
}
.page-my-likes .my-posts-search input::placeholder,
.page-home .my-posts-search input::placeholder,
.page-my-posts .my-posts-search input::placeholder,
.page-my-comments .my-posts-search input::placeholder { color: var(--ink-3); }
.page-my-likes .my-posts-search .search-clear,
.page-home .my-posts-search .search-clear,
.page-my-posts .my-posts-search .search-clear,
.page-my-comments .my-posts-search .search-clear {
    flex: 0 0 auto; width: 24px; height: 24px;
    border: 0; background: var(--ink-3); color: #fff;
    border-radius: 50%; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s var(--ease);
}
.page-my-likes .my-posts-search .search-clear:hover,
.page-home .my-posts-search .search-clear:hover,
.page-my-posts .my-posts-search .search-clear:hover,
.page-my-comments .my-posts-search .search-clear:hover { background: var(--ink-2); }
.page-my-likes .my-posts-search .search-clear svg,
.page-home .my-posts-search .search-clear svg,
.page-my-posts .my-posts-search .search-clear svg,
.page-my-comments .my-posts-search .search-clear svg { width: 10px; height: 10px; }
.page-my-posts .filter-count,
.page-my-comments .filter-count { color: var(--ink-3); margin-left: 4px; font-weight: 400; }
.page-my-posts .no-match,
.page-my-comments .no-match {
    text-align: center; padding: 48px 20px; color: var(--ink-3);
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}
.page-my-posts .no-match p,
.page-my-comments .no-match p { margin: 0 0 8px; }
.page-my-posts .no-match .hint,
.page-my-comments .no-match .hint { font-size: var(--fs-sub); }
.page-my-posts .no-match .hint a,
.page-my-comments .no-match .hint a { color: var(--accent); }

/* ==========================================================================
   无限滚动(列表底部 sentinel + 防卡顿)
   ========================================================================== */
.list-sentinel {
    padding: 20px 0 24px;
    text-align: center;
    color: var(--ink-3);
    font-size: var(--fs-sub);
    min-height: 56px;
}
.list-loading {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: var(--ink-3);
    font-size: var(--fs-sub);
}
.list-loading[hidden] { display: none; }
.spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.list-end {
    color: var(--ink-3);
    font-size: var(--fs-mini);
    letter-spacing: .04em;
    padding: 12px 0;
}
.list-end[hidden] { display: none; }
.list-refresh {
    padding: 14px 16px;
    margin: 8px 16px 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-2);
    font-size: var(--fs-sub);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    flex-wrap: wrap;
}
.list-refresh[hidden] { display: none; }
.list-refresh button {
    background: var(--ink);
    color: #fff;
    border: 0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: var(--fs-sub);
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s var(--ease);
}
.list-refresh button:active { opacity: .8; }

/* ==========================================================================
   3D 立体大标题(DepthText 风格)
   ========================================================================== */
.depth-text {
    display: inline-block;
    perspective: var(--depth-text-perspective, 900px);
    font-size: var(--depth-text-font-size, clamp(3rem, 12vw, 7rem));
    font-weight: var(--depth-text-font-weight, 900);
    line-height: 1.05;
    color: var(--depth-text-face-color, #0a0a0a);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transform-style: preserve-3d;
    margin: 8px 0 6px;
}
.depth-text__stage {
    display: inline-block;
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
}
.depth-text__layer,
.depth-text__face {
    display: inline-block;
    white-space: pre;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: inherit;
}
.depth-text__layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-style: preserve-3d;
}
.depth-text__face {
    position: relative;
    z-index: 2;
    text-shadow: var(--depth-text-shadow, 0 22px 34px rgba(124, 58, 237, .36), 0 4px 8px rgba(0, 0, 0, .12));
}

/* (depth-text 适配样式已移除 — 大标题保持默认左对齐) */

/* prefers-reduced-motion:停止 3D 旋转 */
@media (prefers-reduced-motion: reduce) {
    .depth-text__stage { transform: none !important; }
}
.page-my-comments .topbar .cmt-count {
    margin-left: auto; padding: 2px 10px;
    background: var(--bg-soft); color: var(--ink-2);
    border-radius: 999px; font-size: var(--fs-mini); font-weight: 500;
    border: 1px solid var(--line);
}

/* 评论列表 / 删除按钮 */
.cmt-list {
    list-style: none; margin: 0; padding: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}
.cmt-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px var(--pad-x);
    border-bottom: 1px solid var(--line-2);
    transition: background .15s var(--ease);
}
.cmt-row[hidden],
.post-card[hidden] { display: none; }
.cmt-row:last-child { border-bottom: 0; }
.cmt-row:hover { background: var(--bg-soft); }
.cmt-row-body { flex: 1; min-width: 0; }
.cmt-row-content {
    color: var(--ink); font-size: var(--fs-body); line-height: 1.55;
    white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
    letter-spacing: -.003em;
}
.cmt-row-meta {
    margin-top: 6px;
    font-size: var(--fs-mini); color: var(--ink-3);
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.cmt-row-meta .dot { color: var(--ink-3); }
.cmt-row-meta a { color: var(--ink-2); }
.cmt-row-meta a:hover { color: var(--accent); }

.cmt-del {
    flex: 0 0 auto; width: 32px; height: 32px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-3); transition: all .2s var(--ease);
    margin-top: 2px;
}
.cmt-del:hover { color: #c33; border-color: #fcc; background: #fff5f5; }
.cmt-del:active { transform: scale(.92); }
.cmt-del svg { width: 14px; height: 14px; }

/* 评论高亮(从评论管理跳过来时闪烁) */
.cmt-highlight {
    animation: cmtFlash 0.6s ease-in-out 0s 2;
    background: linear-gradient(90deg, rgba(91,89,216,0) 0%, rgba(91,89,216,.10) 50%, rgba(91,89,216,0) 100%);
    background-size: 200% 100%;
    border-radius: 8px;
}
@keyframes cmtFlash {
    0% { background-position: 100% 0; }
    50% { background-position: 0 0; }
    100% { background-position: -100% 0; }
}

/* 评论删除按钮(作者可见) — 红色描边 + 垃圾桶 + "删除"文字 */
.cmt-trigger {
    flex: 0 0 auto;
    height: 28px; padding: 0 10px 0 8px;
    border: 1px solid transparent; background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--ink-3);
    font-size: var(--fs-sub); font-weight: 500;
    letter-spacing: -.005em;
    transition: all .15s var(--ease);
    align-self: center;
    opacity: 0; pointer-events: none;
}
.cmt.cmt-own .cmt-trigger {
    opacity: 1; pointer-events: auto;
    border-color: var(--line);
    background: #fff;
}
.cmt-trigger:hover {
    background: var(--danger-soft) !important;
    border-color: #f1aeae !important;
    color: var(--danger);
}
.cmt-trigger:active { transform: scale(.96); }
.cmt-trigger .ic { width: 14px; height: 14px; }

/* 底部 sheet 弹窗(iOS Action Sheet 风格) */
.sheet-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet-overlay[hidden] { display: none; }
.sheet-mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45);
    animation: sheetFadeIn .2s var(--ease) both;
}
.sheet {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    background: transparent;
    padding: 0 8px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: sheetSlideUp .28s cubic-bezier(.2, .7, .2, 1) both;
}
.sheet-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255, 255, 255, .5);
    margin: 0 auto 10px;
}
.sheet-section {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
}
.sheet-title {
    padding: 16px 20px 6px;
    text-align: center;
    font-size: 15px; font-weight: 600; color: var(--ink);
    letter-spacing: -.005em;
    line-height: 1.4;
}
.sheet-warn {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px; font-weight: 500;
    color: var(--danger);
    letter-spacing: 0;
}
.sheet-preview {
    padding: 4px 20px 16px;
    text-align: center;
    color: var(--ink-2);
    font-size: var(--fs-sub);
    line-height: 1.5;
    max-height: 60px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    word-break: break-word;
}
.sheet-actions { padding: 0; }
.sheet-cancel-wrap { margin-bottom: 0; }
.sheet-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 16px 20px;
    background: transparent; border: 0; cursor: pointer;
    font-size: 16px; font-weight: 500;
    color: var(--ink); letter-spacing: -.005em;
    transition: background .15s var(--ease);
}
.sheet-btn:active { background: var(--bg-dim); }
.sheet-btn svg { width: 20px; height: 20px; }
.sheet-btn.danger {
    color: #fff; font-weight: 600;
    background: #e5484d;
    font-size: 16px;
    letter-spacing: -.005em;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.sheet-btn.danger:active { background: #d33a3f; }
.sheet-btn.danger span { font-size: 16px; }
.sheet-btn.cancel { color: var(--ink); font-weight: 500; background: #fff; }

@keyframes sheetSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes sheetFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   删除评论弹窗(iOS Action Sheet 风格)
   ========================================================================== */
.sheet-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet-overlay[hidden] { display: none; }
.sheet-mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45);
    animation: sheetFadeIn .2s var(--ease) both;
}
.sheet {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    background: transparent;
    padding: 0 8px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: sheetSlideUp .28s cubic-bezier(.2, .7, .2, 1) both;
}
.sheet-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255, 255, 255, .5);
    margin: 0 auto 10px;
}
.sheet-section {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
}
.sheet-title {
    padding: 16px 20px 6px;
    text-align: center;
    font-size: 15px; font-weight: 600; color: var(--ink);
    letter-spacing: -.005em;
}
.sheet-preview {
    padding: 4px 20px 16px;
    text-align: center;
    color: var(--ink-2);
    font-size: var(--fs-sub);
    line-height: 1.5;
    max-height: 60px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    word-break: break-word;
}
.sheet-actions { padding: 0; }
.sheet-cancel-wrap { margin-bottom: 0; }
.sheet-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 16px 20px;
    background: transparent; border: 0; cursor: pointer;
    font-size: 16px; font-weight: 500;
    color: var(--ink); letter-spacing: -.005em;
    transition: background .15s var(--ease);
}
.sheet-btn:active { background: var(--bg-dim); }
.sheet-btn svg { width: 20px; height: 20px; }
.sheet-btn.danger {
    color: #fff; font-weight: 600;
    background: #e5484d;
    font-size: 16px;
    letter-spacing: -.005em;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.sheet-btn.danger:active { background: #d33a3f; }
.sheet-btn.danger span { font-size: 16px; }
.sheet-btn.cancel { color: var(--ink); font-weight: 500; background: #fff; }

@keyframes sheetSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes sheetFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 评论管理大入口(在 profile 页)— 微调 icon 颜色 */
.big-entry .be-icon-cmt { background: var(--accent-soft); color: var(--accent); }
.big-entry .be-icon-likes { background: #fff0f3; color: #ef4a6f; }

/* ============ ADMIN ============ */
.admin-body {
    background: #f3f4f6;
    color: #111827;
    min-height: 100vh;
}
.admin-top {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 52px;
    background: #111827;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    border-bottom: 1px solid #1f2937;
}
.admin-menu-btn {
    background: transparent;
    border: 0;
    color: inherit;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}
.admin-menu-btn:hover { background: #1f2937; }
.admin-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.admin-exit {
    color: #f3f4f6;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid #374151;
    border-radius: 6px;
}
.admin-exit:hover { background: #1f2937; }

.admin-shell {
    display: flex;
    min-height: calc(100vh - 52px);
}

.admin-side {
    width: 220px;
    background: #1f2937;
    color: #d1d5db;
    flex-shrink: 0;
    padding: 24px 0;
}
.admin-side-head {
    padding: 0 24px 20px;
    border-bottom: 1px solid #374151;
    margin-bottom: 16px;
}
.admin-side-name {
    color: #f9fafb;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.admin-side-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
}
.admin-side-nav {
    display: flex;
    flex-direction: column;
}
.admin-side-item {
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.12s;
}
.admin-side-item:hover { background: #374151; color: #f9fafb; }
.admin-side-item.on {
    background: #111827;
    color: #f9fafb;
    border-left: 3px solid #3b82f6;
    padding-left: 21px;
}
.admin-side-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}
.admin-side-item.on .admin-side-dot { opacity: 1; background: #3b82f6; }

.admin-side-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 20;
}
.admin-side-mask.show { display: block; }

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 64px;
    background: #f3f4f6;
}

.admin-toast {
    background: #059669;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: inline-block;
    transition: opacity 0.3s;
}
.admin-toast.hide { opacity: 0; }

.admin-page { max-width: 960px; margin: 0 auto; }
.admin-page-head {
    margin-bottom: 24px;
}
.admin-page-head h1 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}
.admin-page-sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.admin-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, transform 0.12s;
    display: block;
}
.admin-stat:hover {
    border-color: #3b82f6;
}
.admin-stat-num {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.admin-stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}
.admin-stat-delta {
    font-size: 11px;
    color: #059669;
    margin-top: 8px;
}

.admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.admin-col {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px 20px;
}
.admin-section {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list-row {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-list-row:last-child { border-bottom: 0; }
.admin-list-title {
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-list-title:hover { color: #3b82f6; }
.admin-list-meta {
    font-size: 11px;
    color: #9ca3af;
}

.admin-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-input {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #111827;
    outline: 0;
    min-width: 200px;
    transition: border-color 0.12s;
}
.admin-input:focus { border-color: #3b82f6; }
.admin-input.block { display: block; width: 100%; }

.admin-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.12s, border-color 0.12s;
}
.admin-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.admin-btn.primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}
.admin-btn.primary:hover { background: #2563eb; }
.admin-btn.danger {
    background: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}
.admin-btn.danger:hover { background: #fef2f2; }
.admin-btn.warn {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}
.admin-btn.warn:hover { background: #ffedd5; }
.admin-btn.ghost {
    background: transparent;
    color: #6b7280;
    border-color: transparent;
}
.admin-btn.ghost:hover { background: #f3f4f6; color: #111827; }

.admin-rows {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.admin-rows-empty {
    padding: 48px 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.admin-row-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 16px;
}
.admin-row-item:last-child { border-bottom: 0; }
.admin-row-main {
    flex: 1;
    min-width: 0;
}
.admin-row-title {
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-row-title:hover { color: #3b82f6; }
.admin-row-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-row-meta a {
    color: #9ca3af;
    text-decoration: none;
}
.admin-row-meta a:hover { color: #3b82f6; }
.admin-row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.admin-row-form {
    margin: 0;
    display: inline-block;
}

.admin-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}
.admin-tag.root {
    background: #fef3c7;
    color: #b45309;
}

.admin-pager {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.admin-pager-item {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
}
.admin-pager-item:hover { border-color: #3b82f6; color: #3b82f6; }
.admin-pager-item.on {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.admin-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 24px;
    max-width: 600px;
}
.admin-form-row { margin-bottom: 16px; }
.admin-form-label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}
.admin-form-actions { margin-top: 8px; }
.admin-form-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
}

.admin-empty {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 720px) {
    .admin-side {
        position: fixed;
        left: -240px;
        top: 52px;
        bottom: 0;
        z-index: 25;
        transition: left 0.2s;
    }
    .admin-side.show { left: 0; }
    .admin-main { padding: 16px; }
    .admin-row { grid-template-columns: 1fr; }
    .admin-row-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-row-actions {
        width: 100%;
    }
    .admin-row-actions form,
    .admin-row-actions .admin-btn {
        flex: 1;
        justify-content: center;
    }
}

.admin-toast.danger {
    background: #dc2626;
}

.admin-form-section {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 32px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}
.admin-form-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 16px;
}
.admin-form + .admin-form {
    margin-top: 16px;
}

/* ============ INSTALL ============ */
.wrap {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 24px;
}
.logo {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: -.01em;
}
.logo span { color: #9ca3af; margin: 0 4px; }
.sub {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 20px;
    text-align: center;
    line-height: 1.5;
}
.foot {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 24px;
}
.form { margin-top: 12px; }
.row { margin-bottom: 14px; }
.row label {
    display: block;
    font-size: 12px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}
.row input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    outline: 0;
    box-sizing: border-box;
}
.row input:focus { border-color: #111827; }
.hint-inline {
    color: #9ca3af;
    font-weight: 400;
    font-size: 11px;
    margin-left: 4px;
}
.seg {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}
.seg-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
}
.seg-item input { display: none; }
.seg-item:has(input:checked) {
    background: #111827;
    color: #fff;
}
.btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.12s;
}
.btn:hover { background: #f3f4f6; }
.btn.primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.btn.primary:hover { background: #1f1f23; }
.btn.ghost {
    background: transparent;
    border-color: #e5e7eb;
    color: #6b7280;
}
.btn.big {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
}
.err, .ok {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.err {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.ok-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.diag {
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    background: #f9fafb;
}
.diag summary {
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    list-style: none;
}
.diag summary::-webkit-details-marker { display: none; }
.diag table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
.diag td { padding: 6px 8px; border-bottom: 1px solid #f3f4f6; }
.d-status.ok { color: #059669; font-weight: 600; width: 24px; }
.d-status.fail { color: #dc2626; font-weight: 600; width: 24px; }
.d-name { font-weight: 500; color: #111827; }
.d-msg { color: #6b7280; font-size: 11px; }
.d-hint { margin-top: 10px; font-size: 11px; color: #9ca3af; }
.hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 12px 0 0;
}
.legal {
    font-size: 11px;
    color: #9ca3af;
    margin: 12px 0 0;
    line-height: 1.5;
}
.legal code {
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* ==========================================================================
   封号系统 — 用户列表 badge + 封禁弹窗
   ========================================================================== */
.admin-row-item.is-banned { background: #fef2f2; }
.admin-ban-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    background: #dc2626;
    color: #fff;
    border-radius: 3px;
    font-weight: 500;
}
.admin-ban-reason {
    font-size: 12px;
    color: #991b1b;
    margin-top: 4px;
}

.admin-modal { position: fixed; inset: 0; z-index: 200; }
.admin-modal[hidden] { display: none; }
.admin-modal-mask {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, .5);
}
.admin-modal-card {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    margin: 12vh auto 0;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.admin-modal-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.admin-modal-sub {
    margin: 0 0 20px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}
.admin-modal-sub b { color: #111827; }
.admin-modal-row { margin-bottom: 16px; }
.admin-modal-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}
.admin-modal-label .opt {
    font-weight: 400;
    color: #9ca3af;
    margin-left: 6px;
    font-size: 12px;
}
.admin-days { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-day-opt { cursor: pointer; }
.admin-day-opt input { position: absolute; opacity: 0; pointer-events: none; }
.admin-day-opt span {
    display: inline-block;
    font-size: 13px;
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    background: #fff;
    transition: all .15s var(--ease);
}
.admin-day-opt:hover span { border-color: #9ca3af; }
.admin-day-opt input:checked + span {
    background: #111827;
    border-color: #111827;
    color: #fff;
}
.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}
