/* ============================================================
   IOS OvO 社区 · 移动端优先样式
   移动端：底部标签栏 + 单列流 + 大触控区
   PC 端：左侧导航 + 中间内容 + 右侧栏
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg:        #0e0e10;
    --bg-soft:   #16161a;
    --bg-card:   #1a1a1f;
    --bg-hover:  #202027;
    --line:      #26262e;
    --line-soft: #1f1f26;
    --txt:       #e8e8ee;
    --txt-2:     #a0a0ad;
    --txt-3:     #6c6c7a;
    --pink:      #ff91b9;
    --pink-d:    #ff7aa8;
    --green:     #34d399;
    --blue:      #60a5fa;
    --gold:      #fbbf24;
    --red:       #f87171;
    --purple:    #a855f7;
    --r:         14px;
    --r-lg:      18px;
    --tab-h:     56px;
    --safe-b:    env(safe-area-inset-bottom, 0px);
    --safe-t:    env(safe-area-inset-top, 0px);
}

html { -webkit-text-size-adjust: 100%; }

body.cbody {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* ============ 移动端顶栏 ============ */
.c-top {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between;
    height: 52px; padding: 0 16px;
    padding-top: var(--safe-t);
    background: rgba(14,14,16,.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.c-top-title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.c-top-right { display: flex; align-items: center; gap: 4px; }
.c-top-icon {
    position: relative; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--txt-2);
}
.c-top-icon svg { width: 21px; height: 21px; }
.c-top-icon:active { background: var(--bg-hover); }
.c-dot {
    position: absolute; top: 8px; right: 9px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--pink); box-shadow: 0 0 0 2px var(--bg);
}
.c-top-login {
    font-size: 14px; font-weight: 600; color: var(--pink);
    padding: 6px 12px;
}

/* ============ 主内容区 ============ */
.c-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 12px 20px;
}

/* ============ 底部标签栏 ============ */
.c-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-around;
    height: var(--tab-h);
    padding-bottom: var(--safe-b);
    background: rgba(22,22,26,.96);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line-soft);
}
.c-tabbar a {
    position: relative;
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 100%;
    color: var(--txt-3); font-size: 10px;
    transition: color .15s;
}
.c-tabbar a svg { width: 23px; height: 23px; }
.c-tabbar a.on { color: var(--pink); }
.c-tabbar a.on svg { stroke-width: 2.2; }
.c-tabdot {
    position: absolute; top: 7px; left: 50%; margin-left: 6px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--pink);
}
.c-tab-plus {
    flex: 0 0 56px !important;
}
.c-tab-plus svg {
    width: 40px !important; height: 40px !important;
    padding: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), #ff6fa0);
    color: #1a1a1f; stroke: #1a1a1f !important;
    box-shadow: 0 4px 14px rgba(255,145,185,.35);
}
.c-tab-plus:active svg { transform: scale(.94); }

/* ============ PC 侧边栏（移动端隐藏）============ */
.c-side { display: none; }

/* ============ 卡片 ============ */
.c-card {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.c-card.flat { background: transparent; border: 0; padding: 0; }

/* ============ 帖子 ============ */
.post {
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: 14px 15px 8px;
    margin-bottom: 10px;
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.c-ava {
    position: relative; flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 50%;
    overflow: hidden; background: var(--bg-hover);
    display: block;
}
.c-ava img { width: 100%; height: 100%; object-fit: cover; }
.c-ava.lv-1 { box-shadow: 0 0 0 2px #9aa3b255; }
.c-ava.lv-2 { box-shadow: 0 0 0 2px #60a5fa88; }
.c-ava.lv-3 { box-shadow: 0 0 0 2px #34d39988; }
.c-ava.lv-4 { box-shadow: 0 0 0 2px #fbbf2488; }
.c-ava.lv-5 { box-shadow: 0 0 0 2px #f9731688; }
.c-ava.lv-6 { box-shadow: 0 0 0 2px #ff91b999; }
.c-ava.lv-7 { box-shadow: 0 0 0 2px #a855f799; }

.post-who { min-width: 0; flex: 1; }
.post-name {
    display: flex; align-items: center; gap: 6px;
    font-size: 14.5px; font-weight: 600; line-height: 1.3;
}
.post-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

.c-lv {
    display: inline-flex; align-items: center;
    height: 17px; padding: 0 6px;
    border-radius: 5px;
    font-size: 10px; font-weight: 600; line-height: 1;
    color: var(--lvc, #9aa3b2);
    background: color-mix(in srgb, var(--lvc, #9aa3b2) 16%, transparent);
    white-space: nowrap;
}

.post-body {
    font-size: 15px; line-height: 1.62;
    white-space: pre-wrap; word-break: break-word;
    margin: 2px 0 10px;
}
.post-body.clamp {
    display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-img {
    margin: 0 0 10px;
    border-radius: 12px; overflow: hidden;
    background: var(--bg-hover);
}
.post-img img { width: 100%; max-height: 420px; object-fit: cover; }

.post-acts {
    display: flex; align-items: center; gap: 4px;
    border-top: 1px solid var(--line-soft);
    margin: 0 -15px; padding: 4px 8px;
}
.post-acts button, .post-acts a {
    flex: 1; min-width: 0;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    height: 40px; border-radius: 9px;
    font-size: 12.5px; color: var(--txt-3);
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.post-acts svg { width: 18px; height: 18px; }
.post-acts button:active, .post-acts a:active { background: var(--bg-hover); }
.post-acts .liked { color: var(--pink); }
.post-acts .liked svg { fill: var(--pink); stroke: var(--pink); }

/* ============ 按钮 ============ */
.c-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 42px; padding: 0 18px;
    border-radius: 11px;
    background: var(--pink); color: #17171b;
    font-size: 15px; font-weight: 600;
    transition: transform .1s, opacity .15s;
}
.c-btn:active { transform: scale(.97); }
.c-btn:disabled { opacity: .45; }
.c-btn.block { display: flex; width: 100%; }
.c-btn.ghost {
    background: var(--bg-hover); color: var(--txt);
    border: 1px solid var(--line);
}
.c-btn.sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.c-btn.gray { background: var(--bg-hover); color: var(--txt-2); }

/* ============ 输入 ============ */
.c-input, .c-ta {
    display: block; width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 11px 13px;
    font-size: 15px;
    outline: none;
    transition: border-color .15s;
    -webkit-appearance: none;
}
.c-input:focus, .c-ta:focus { border-color: var(--pink); }
.c-ta { resize: vertical; min-height: 110px; line-height: 1.6; }
.c-input::placeholder, .c-ta::placeholder { color: var(--txt-3); }

/* ============ 通用 ============ */
.c-muted { color: var(--txt-3); font-size: 13px; }
.c-sec-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 700;
    padding: 6px 4px 10px;
}
.c-sec-title a { font-size: 13px; font-weight: 400; color: var(--txt-3); }

.c-empty {
    text-align: center; padding: 48px 20px;
    color: var(--txt-3); font-size: 14px;
}
.c-empty svg { width: 52px; height: 52px; margin: 0 auto 12px; opacity: .35; }

.c-alert {
    border-radius: 11px; padding: 11px 14px;
    font-size: 14px; margin-bottom: 12px;
}
.c-alert.err { background: #f8717118; border: 1px solid #f8717144; color: #fca5a5; }
.c-alert.ok  { background: #34d39918; border: 1px solid #34d39944; color: #6ee7b7; }

/* ============ 用户行（列表）============ */
.u-row {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 12px;
}
.u-row:active { background: var(--bg-hover); }
.u-row .c-ava { width: 46px; height: 46px; }
.u-info { flex: 1; min-width: 0; }
.u-info b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-info small { color: var(--txt-3); font-size: 12.5px; }

/* ============ 聊天 ============ */
.chat-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.chat-list-item:active { background: var(--bg-hover); }
.chat-list-item .c-ava { width: 48px; height: 48px; }
.chat-mid { flex: 1; min-width: 0; }
.chat-mid .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chat-mid b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mid time { font-size: 11.5px; color: var(--txt-3); flex: 0 0 auto; }
.chat-mid p {
    margin: 3px 0 0; font-size: 13.5px; color: var(--txt-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-unread {
    flex: 0 0 auto; min-width: 19px; height: 19px; padding: 0 6px;
    border-radius: 10px; background: var(--pink); color: #17171b;
    font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}

/* 聊天窗口 */
.chat-wrap {
    position: fixed; inset: 0; z-index: 60;
    display: flex; flex-direction: column;
    background: var(--bg);
}
.chat-head {
    display: flex; align-items: center; gap: 10px;
    height: 52px; padding: 0 12px; padding-top: var(--safe-t);
    background: rgba(22,22,26,.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
    flex: 0 0 auto;
}
.chat-head .back {
    width: 36px; height: 36px; margin-left: -6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--txt);
}
.chat-head .back svg { width: 22px; height: 22px; }
.chat-head b { font-size: 15.5px; font-weight: 600; }

.chat-body {
    flex: 1; overflow-y: auto;
    padding: 14px 12px 8px;
    -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 10px;
}
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; }
.msg .c-ava { width: 32px; height: 32px; flex: 0 0 32px; }
.msg .bubble {
    padding: 9px 13px;
    border-radius: 16px;
    font-size: 15px; line-height: 1.5;
    word-break: break-word; white-space: pre-wrap;
}
.msg.them { align-self: flex-start; }
.msg.them .bubble {
    background: var(--bg-card);
    border-bottom-left-radius: 5px;
}
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble {
    background: linear-gradient(135deg, #ff91b9, #ff7aa8);
    color: #1a1a1f;
    border-bottom-right-radius: 5px;
    font-weight: 500;
}
.msg-time {
    text-align: center; font-size: 11px; color: var(--txt-3);
    margin: 4px 0;
}

.chat-input {
    flex: 0 0 auto;
    display: flex; align-items: flex-end; gap: 8px;
    padding: 9px 12px;
    padding-bottom: calc(9px + var(--safe-b));
    background: var(--bg-soft);
    border-top: 1px solid var(--line-soft);
}
.chat-input textarea {
    flex: 1; resize: none;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px; line-height: 1.4;
    max-height: 110px;
    outline: none;
}
.chat-input textarea:focus { border-color: var(--pink); }
.chat-input button {
    flex: 0 0 40px; width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--pink); color: #1a1a1f;
    display: flex; align-items: center; justify-content: center;
}
.chat-input button:disabled { opacity: .4; }
.chat-input button svg { width: 20px; height: 20px; }

/* ============ 通知 ============ */
.notif {
    display: flex; gap: 11px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.notif.unread { background: #ff91b90a; }
.notif-ico {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}
.notif-ico.t-like    { background: #ff91b91f; }
.notif-ico.t-comment { background: #60a5fa1f; }
.notif-ico.t-chat    { background: #34d3991f; }
.notif-ico.t-level   { background: #fbbf241f; }
.notif-ico.t-task    { background: #a855f71f; }
.notif-ico.t-system  { background: #ffffff10; }
.notif-body { flex: 1; min-width: 0; }
.notif-body b { display: block; font-size: 14.5px; font-weight: 600; }
.notif-body p { margin: 3px 0 0; font-size: 13.5px; color: var(--txt-2); line-height: 1.5; }
.notif-body time { font-size: 11.5px; color: var(--txt-3); }

/* ============ 任务 ============ */
.task {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; border-bottom: 1px solid var(--line-soft);
}
.task-ico {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px;
    background: var(--bg-hover);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
}
.task-main { flex: 1; min-width: 0; }
.task-main b { display: block; font-size: 14.5px; font-weight: 600; }
.task-main small { color: var(--txt-3); font-size: 12.5px; }
.task-bar {
    height: 4px; border-radius: 2px; background: var(--bg-hover);
    margin-top: 7px; overflow: hidden;
}
.task-bar i {
    display: block; height: 100%; border-radius: 2px;
    background: linear-gradient(90deg, var(--pink), #ff6fa0);
    transition: width .3s;
}
.task-right { flex: 0 0 auto; text-align: right; }
.task-pts {
    display: block; font-size: 13px; font-weight: 700; color: var(--gold);
    margin-bottom: 5px;
}

/* ============ 个人中心 ============ */
.me-head {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 16px;
    background: linear-gradient(150deg, #1e1a22, #16161a 60%);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    margin-bottom: 12px;
}
.me-head .c-ava { width: 66px; height: 66px; }
.me-info { flex: 1; min-width: 0; }
.me-info h1 {
    margin: 0 0 4px; font-size: 19px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-info .sig {
    font-size: 13px; color: var(--txt-2); margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.me-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    margin-bottom: 12px;
    overflow: hidden;
}
.me-stat {
    padding: 14px 4px; text-align: center;
    border-right: 1px solid var(--line-soft);
}
.me-stat:last-child { border-right: 0; }
.me-stat b { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; }
.me-stat small { font-size: 11.5px; color: var(--txt-3); }

.exp-wrap { padding: 0 16px 14px; }
.exp-bar {
    height: 7px; border-radius: 4px; background: var(--bg-hover);
    overflow: hidden; margin-top: 8px;
}
.exp-bar i {
    display: block; height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--pink), #ff6fa0);
    transition: width .4s;
}

.me-menu { background: var(--bg-card); border-radius: var(--r-lg); overflow: hidden; }
.me-menu a {
    display: flex; align-items: center; gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
}
.me-menu a:last-child { border-bottom: 0; }
.me-menu a:active { background: var(--bg-hover); }
.me-menu .ico {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--bg-hover);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.me-menu .arrow { margin-left: auto; color: var(--txt-3); font-size: 17px; }

/* ============ 发帖页 ============ */
.composer { padding: 4px 0; }
.composer .c-ta {
    background: transparent; border: 0;
    padding: 8px 2px; font-size: 16.5px; min-height: 150px;
}
.composer-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.composer-count { font-size: 12.5px; color: var(--txt-3); }

/* ============ 帖子详情 ============ */
.post-detail { background: var(--bg-card); border-radius: var(--r-lg); padding: 16px; }
.comment {
    display: flex; gap: 10px; padding: 12px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.comment .c-ava { width: 34px; height: 34px; flex: 0 0 34px; }
.comment-main { flex: 1; min-width: 0; }
.comment-main .ch { display: flex; align-items: center; gap: 6px; }
.comment-main b { font-size: 13.5px; font-weight: 600; }
.comment-main time { font-size: 11.5px; color: var(--txt-3); margin-left: auto; }
.comment-main p {
    margin: 4px 0 0; font-size: 14.5px; line-height: 1.55;
    word-break: break-word; white-space: pre-wrap;
}

/* ============ 移动端隐藏 PC 元素 ============ */
.only-pc { display: none !important; }

/* ============================================================
   PC 端（>= 900px）：左侧导航 + 三栏
   ============================================================ */
@media (min-width: 900px) {
    body.cbody {
        padding-bottom: 0;
        padding-left: 232px;
    }
    .c-tabbar { display: none; }
    .c-top { display: none; }

    /* 侧边栏 */
    .c-side {
        display: flex; flex-direction: column;
        position: fixed; left: 0; top: 0; bottom: 0; width: 232px;
        padding: 22px 14px 18px;
        background: var(--bg-soft);
        border-right: 1px solid var(--line-soft);
        z-index: 50;
    }
    .c-logo {
        display: flex; align-items: baseline; gap: 5px;
        padding: 0 10px 24px;
        font-size: 21px; font-weight: 800; letter-spacing: .5px;
    }
    .c-logo-mark { color: var(--txt); }
    .c-logo-ovo { color: var(--pink); }

    .c-side-search {
        display: flex; align-items: center; gap: 8px;
        height: 38px; padding: 0 12px; margin-bottom: 14px;
        background: var(--bg-card);
        border: 1px solid var(--line-soft);
        border-radius: 10px;
    }
    .c-side-search svg { width: 17px; height: 17px; color: var(--txt-3); flex: 0 0 17px; }
    .c-side-search input {
        flex: 1; min-width: 0;
        background: none; border: 0; outline: none;
        font-size: 14px; color: var(--txt);
    }
    .c-side-search input::placeholder { color: var(--txt-3); }

    .c-nav { display: flex; flex-direction: column; gap: 3px; }
    .c-nav a {
        position: relative;
        display: flex; align-items: center; gap: 13px;
        height: 46px; padding: 0 13px;
        border-radius: 11px;
        font-size: 15.5px; color: var(--txt-2);
        transition: background .12s, color .12s;
    }
    .c-nav a svg { width: 22px; height: 22px; flex: 0 0 22px; }
    .c-nav a:hover { background: var(--bg-hover); color: var(--txt); }
    .c-nav a.on { background: #ff91b914; color: var(--pink); font-weight: 600; }
    .c-badge {
        position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
        min-width: 19px; height: 19px; padding: 0 6px;
        border-radius: 10px; background: var(--pink); color: #17171b;
        font-size: 11px; font-weight: 700; font-style: normal;
        line-height: 19px; text-align: center;
    }

    .c-side-me {
        margin-top: auto;
        display: flex; align-items: center; gap: 10px;
        padding: 10px; border-radius: 12px;
        background: var(--bg-card);
        border: 1px solid var(--line-soft);
    }
    .c-side-me:hover { background: var(--bg-hover); }
    .c-side-me img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
    .c-side-me div { min-width: 0; }
    .c-side-me b {
        display: block; font-size: 14px; font-weight: 600;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .c-side-me small { font-size: 11.5px; color: var(--txt-3); }
    .c-side-login {
        margin-top: auto; text-align: center;
        height: 44px; line-height: 44px;
        border-radius: 11px; background: var(--pink); color: #17171b;
        font-weight: 600;
    }

    /* 主区 */
    .c-main {
        max-width: 640px;
        margin: 0 auto;
        padding: 24px 24px 60px;
        display: block;
    }
    /* PC 端隐藏移动端专属元素 */
    .only-mb { display: none !important; }
    /* 顶栏隐藏后不要留空 */
    .c-top { display: none !important; }
    .post { padding: 16px 18px 10px; }
    .post-acts { margin: 0 -18px; }
    .post-acts button:hover, .post-acts a:hover { background: var(--bg-hover); color: var(--txt-2); }

    .only-pc { display: block !important; }
    .only-mb { display: none !important; }

    /* 发帖页加宽 */
    .c-main.wide { max-width: 720px; }
}

/* ============ 超宽屏：内容居中 ============ */
@media (min-width: 1280px) {
    .c-main {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============ 触控反馈 ============ */
.c-tap { opacity: .72; }

/* ============ 滚动条 ============ */
@media (min-width: 900px) {
    ::-webkit-scrollbar { width: 9px; height: 9px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #33333d; border-radius: 5px; border: 2px solid var(--bg); }
    ::-webkit-scrollbar-thumb:hover { background: #44444f; }
}

/* ============ 小屏微调 ============ */
@media (max-width: 380px) {
    .c-main { padding: 10px 10px 20px; }
    .post { padding: 12px 12px 6px; }
    .post-acts { margin: 0 -12px; }
    .c-tabbar a { font-size: 9px; }
    .me-stats { grid-template-columns: repeat(2, 1fr); }
    .me-stat:nth-child(2) { border-right: 0; }
    .me-stat:nth-child(1), .me-stat:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
}

/* ============ 加载动画 ============ */
.spin {
    width: 18px; height: 18px;
    border: 2px solid #ffffff30;
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.c-loading { text-align: center; padding: 26px; color: var(--txt-3); font-size: 13.5px; }

/* ============ 移动端细节优化 ============ */

/* 安全区适配（iPhone 刘海屏） */
@supports (padding: max(0px)) {
    .c-top {
        padding-top: max(var(--safe-t), 0px);
    }
    .c-tabbar {
        padding-bottom: max(var(--safe-b), 0px);
    }
}

/* 输入框在 iOS 上不被放大（字号 < 16px 会触发缩放） */
@media (max-width: 899px) {
    .c-input, .c-ta, .chat-input textarea, input[type="text"], input[type="password"], input[type="search"] {
        font-size: 16px !important;
    }
}

/* 长按/选中 */
.post-body, .bubble, .comment-main p {
    -webkit-user-select: text;
    user-select: text;
}

/* 图片点击放大 */
.post-img img { cursor: zoom-in; }

/* 骨架屏 */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 8px;
}

/* 帖子正文换行保护 */
.post-body { overflow-wrap: break-word; word-break: break-word; }

/* 数字等宽 */
.me-stat b, .acct-points .num, .task-pts { font-variant-numeric: tabular-nums; }

/* 禁用双击缩放 */
.c-tabbar a, .post-acts a, .post-acts button { touch-action: manipulation; }

/* 横屏优化 */
@media (max-width: 899px) and (orientation: landscape) {
    .c-tabbar { height: 48px; }
    .c-top { height: 44px; }
    .c-main { padding-top: 8px; }
}

/* 深色滚动条（移动端隐藏） */
@media (max-width: 899px) {
    ::-webkit-scrollbar { display: none; }
    * { scrollbar-width: none; }
}

/* ============ Emoji 选择栏 ============ */
.emoji-bar {
    display: none;
    flex-wrap: wrap; gap: 2px;
    padding: 8px 0 10px;
    border-top: 1px solid var(--line-soft);
    margin-top: 8px;
}
.emoji-bar.on { display: flex; }
.emoji-btn {
    width: 38px; height: 38px;
    border-radius: 9px;
    font-size: 21px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.emoji-btn:active { background: var(--bg-hover); }

/* ============ 话题 / @提及 ============ */
.c-tag {
    color: var(--blue);
    font-weight: 500;
}
.c-tag:hover { text-decoration: underline; }
.c-mention {
    color: var(--pink);
    font-weight: 500;
}
.c-mention:hover { text-decoration: underline; }

/* 帖子正文里的链接不要破坏行高 */
.post-body a, .comment-main p a, .bubble a { word-break: break-all; }

/* ============ 表情回应 ============ */
.react-btn {
    display: inline-flex; align-items: center; gap: 4px;
    height: 32px; padding: 0 10px;
    border-radius: 16px;
    background: var(--bg-hover);
    border: 1px solid transparent;
    font-size: 15px; line-height: 1;
    transition: background .12s, border-color .12s, transform .1s;
}
.react-btn .rn { font-size: 12px; color: var(--txt-2); font-weight: 600; }
.react-btn.on {
    background: #ff91b91f;
    border-color: #ff91b966;
}
.react-btn.on .rn { color: var(--pink); }
.react-btn:active { transform: scale(.92); }

/* ============ 置顶标记 ============ */
.pin-tag {
    display: inline-flex; align-items: center; gap: 3px;
    height: 18px; padding: 0 7px;
    border-radius: 5px;
    background: #fbbf2422;
    color: var(--gold);
    font-size: 10.5px; font-weight: 600;
}

/* ============ 图片查看器 ============ */
.img-viewer {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, .94);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: fadeIn .18s ease;
    cursor: zoom-out;
}
.img-viewer img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 底部栏数字角标 */
.c-tabnum {
    position: absolute; top: 4px; left: 50%; margin-left: 5px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px;
    background: var(--pink); color: #17171b;
    font-size: 10px; font-weight: 700; font-style: normal;
    line-height: 16px; text-align: center;
}

/* 搜索高亮 */
.hl {
    background: #fbbf2440;
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* 聊天删除按钮 */
.chat-del {
    flex: 0 0 auto; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; color: var(--txt-3);
    margin-left: 4px;
}
.chat-del:active { background: var(--bg-hover); color: var(--red); }

/* 评论点赞 */
.c-like {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 6px; padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px; color: var(--txt-3);
    transition: background .12s, color .12s;
}
.c-like svg { width: 13px; height: 13px; }
.c-like:active { background: var(--bg-hover); }
.c-like.on { color: var(--pink); }
.c-like.on svg { fill: var(--pink); stroke: var(--pink); }
