:root {
    --bg: #f6f1ea;
    --bg-deep: #efe8dc;
    --card: #ffffff;
    --line: #e6ddd0;
    --line-soft: #f0e9df;
    --text: #2a241c;
    --mute: #8a8278;
    --brand: #F96A03;
    --brand-soft: #fff2e6;
    --brand-deep: #d45500;
    --deep: #2a241c;
    --ok: #2f9b5f;
    --ai: #5B8DEF;
    --danger: #d4533d;
    --shadow: 0 12px 32px rgba(42, 36, 28, 0.06);
    --radius: 0.9rem;
    --font: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", sans-serif;
}
html { font-size: 15px; }
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(1200px 480px at 12% -10%, rgba(249, 106, 3, 0.08), transparent 60%),
        linear-gradient(180deg, #faf6f0 0%, var(--bg) 40%, #f3eee6 100%);
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; }
button {
    border: none;
    background: var(--deep);
    color: #fff;
    border-radius: 0.65rem;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.ghost {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 600;
}
button.danger { background: var(--danger); }
button.brand { background: var(--brand); }
button.brand:hover { background: var(--brand-deep); }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(800px 400px at 80% 0%, rgba(249, 106, 3, 0.16), transparent 55%),
        linear-gradient(160deg, #fff8f1, #f3eee6 55%, #ebe4d8);
}
.login-card {
    width: min(24rem, 100%);
    background: var(--card);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(249, 106, 3, 0.08);
}
.brand-mark {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 0.75rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #ff8a2b, var(--brand));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(249, 106, 3, 0.28);
}
.logo {
    font-size: 1.85rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.08em;
}
.sub {
    text-align: center;
    color: var(--mute);
    margin: 0.35rem 0 1.25rem;
    font-size: 0.9rem;
}
.login-card input, .form-card input, .modal-card input, .modal-card textarea, .modal-card select,
.toolbar input, .toolbar select {
    width: 100%;
    border: 1px solid var(--line);
    background: #faf8f5;
    border-radius: 0.7rem;
    padding: 0.7rem 0.85rem;
    margin: 0.45rem 0;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-card input:focus, .form-card input:focus, .modal-card input:focus,
.modal-card textarea:focus, .toolbar input:focus, .toolbar select:focus {
    border-color: rgba(249, 106, 3, 0.55);
    box-shadow: 0 0 0 3px rgba(249, 106, 3, 0.12);
    background: #fff;
}
.login-card button, .form-card button { width: 100%; margin-top: 0.55rem; }
.hint { font-size: 0.78rem; color: var(--mute); text-align: center; margin-top: 0.85rem; }

.layout { display: flex; min-height: 100vh; }
.side {
    width: 14.5rem;
    background: linear-gradient(180deg, #322a22 0%, #241e18 100%);
    color: #fff;
    padding: 1.35rem 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
    padding: 0.2rem 0.55rem;
}
.brand-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background: linear-gradient(145deg, #ff8a2b, var(--brand));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
}
.brand-text { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.04em; }
.nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; overflow: auto; }
.nav-group {
    margin: 1rem 0.55rem 0.35rem;
    font-size: 0.7rem;
    color: #9a9186;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.nav-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    color: #d9d0c4;
    margin: 0;
    border-radius: 0.7rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; transform: none; }
.nav-btn.active {
    background: linear-gradient(135deg, #ff7a1a, var(--brand));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(249, 106, 3, 0.28);
}
.logout {
    margin-top: 0.85rem;
    background: transparent;
    border: 1px solid #5a4e3e;
    color: #d8cbb0;
    font-weight: 600;
}
.logout:hover { background: rgba(255, 255, 255, 0.05); transform: none; }

.main { flex: 1; padding: 1.5rem 1.75rem 2.5rem; overflow: auto; }
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}
.page-head h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.95rem; }
.tab {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 700;
}
.tab.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 6px 14px rgba(249, 106, 3, 0.22);
}
.toolbar {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.85rem;
    padding: 0.85rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.toolbar input, .toolbar select {
    width: auto;
    min-width: 10rem;
    margin: 0;
    flex: 1 1 10rem;
    height: 2.5rem;
    padding: 0 0.85rem;
    line-height: 1.2;
    vertical-align: middle;
}
.toolbar .date-input { min-width: 9rem; flex: 0 1 9.5rem; }
.toolbar .kw-input {
    min-width: 15rem;
    max-width: 18rem;
    flex: 1 1 15rem;
    width: 15rem;
}
.toolbar .media-select {
    width: auto;
    min-width: 7.5rem;
    flex: 0 0 auto;
    margin: 0;
}
.msg-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    width: 100%;
}
.results-thread { max-height: none; }
.msg-ops { margin-top: 0.55rem; }
.toolbar-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: nowrap;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}
.toolbar-actions .msg-action-btn {
    width: 5.5rem;
    min-width: 5.5rem;
    height: 2.5rem;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    border: 1px solid transparent;
    transform: none !important;
    vertical-align: middle;
}
.toolbar-actions .msg-action-btn.brand {
    border-color: var(--brand);
    box-shadow: none;
}
.toolbar-actions .msg-action-btn.ghost {
    border-color: var(--line);
}
.msg-hit-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
}
.msg-hit-row .msg-check {
    margin-top: 0.95rem;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    cursor: pointer;
}
.msg-hit-row .msg-bubble { flex: 1; margin-bottom: 0; }
.msg-result-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line-soft);
}
.msg-result-bar label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}
.msg-result-bar .check { width: 1.05rem; height: 1.05rem; }
.msg-result-bar .msg-action-btn {
    width: 5.5rem;
    min-width: 5.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--line);
    transform: none !important;
}
.msg-result-bar .msg-action-btn.danger {
    border-color: var(--danger);
    color: #fff;
}
.msg-result-bar .msg-action-btn.sq-clear-btn {
    width: auto;
    min-width: 5.5rem;
    padding: 0 0.85rem;
    background: #2f2a24;
    border-color: #2f2a24;
    color: #fff;
    font-weight: 800;
}
.msg-result-bar .msg-action-btn.sq-clear-btn:hover {
    background: #1c1915;
    border-color: #1c1915;
}
.posts-table {
    width: 100%;
    border-collapse: collapse;
}
.posts-table th,
.posts-table td {
    vertical-align: middle;
    white-space: nowrap;
}
.posts-table .post-col-check { width: 2.75rem; text-align: center; }
.posts-table .post-col-id {
    width: 3.5rem;
    font-weight: 800;
    color: var(--deep);
}
.posts-table .post-col-user { width: 8rem; }
.posts-table .post-col-content,
.posts-table .post-content-cell {
    white-space: normal;
    min-width: 16rem;
    max-width: 28rem;
}
.posts-table .post-col-time {
    width: 10rem;
    color: var(--mute);
    font-size: 0.82rem;
}
.posts-table .post-col-num {
    width: 3.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.posts-table .post-col-ops {
    width: 12.5rem;
    text-align: right;
    vertical-align: top;
}
.posts-table .post-op-btn {
    width: 2.4rem;
    min-width: 2.4rem;
    height: 2rem;
    padding: 0 !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    transform: none !important;
    box-shadow: none !important;
}
.fb-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 7.5rem;
}
.fb-ops {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    flex-wrap: nowrap;
}
.fb-reasons {
    width: max-content;
    max-width: 16rem;
    text-align: left;
    padding: 0.4rem 0.45rem 0.35rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px dashed #9aabbf;
    box-sizing: border-box;
}
.fb-reasons-label {
    font-size: 0.7rem;
    color: #7a8aa0;
    margin-bottom: 0.3rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.fb-reason-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.28rem 0.45rem;
    align-items: center;
}
.fb-reason {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.76rem;
    color: #3d4d63;
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
    padding: 0.12rem 0.28rem 0.12rem 0.18rem;
    border-radius: 0.3rem;
    border: none;
    background: transparent;
    font-family: inherit;
    margin: 0;
    box-shadow: none !important;
    transform: none !important;
}
.fb-reason:focus {
    outline: none;
}
.fb-reason:focus-visible {
    box-shadow: 0 0 0 2px rgba(47, 158, 90, 0.25) !important;
}
.fb-reason-mark {
    width: 0.92rem;
    height: 0.92rem;
    flex: 0 0 auto;
    box-sizing: border-box;
    border: 1px solid #c5d0de;
    border-radius: 0.22rem;
    background: #fff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fb-reason-mark::after {
    content: '';
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
}
.fb-reason.on {
    color: #1a7a3c;
    font-weight: 600;
}
.fb-reason.on .fb-reason-mark {
    border-color: #2f9e5a;
    background: #e8f8ee;
}
.fb-reason.on .fb-reason-mark::after {
    content: '✓';
    color: #1a7a3c;
}
/* ✕ 差评：选中原因偏红 */
.posts-table tr.is-fb-bad .fb-reason.on {
    color: #b42318;
}
.posts-table tr.is-fb-bad .fb-reason.on .fb-reason-mark {
    border-color: #d46565;
    background: #fdeeee;
}
.posts-table tr.is-fb-bad .fb-reason.on .fb-reason-mark::after {
    color: #b42318;
}
.posts-table tr.is-fb-good .fb-reasons {
    background: #f7fcf8;
    border-color: #7dcf98;
}
.posts-table tr.is-fb-bad .fb-reasons {
    background: #fffafa;
    border-color: #d9a0a0;
}
.fb-btn {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0 !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 0.45rem;
    border: 1px solid #d5dde8;
    background: #f7f9fc;
    color: #5a6a7e;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transform: none !important;
    box-shadow: none !important;
}
.fb-btn.good.on {
    background: #e8f8ee;
    border-color: #7dcf98;
    color: #1a7a3c;
}
.fb-btn.bad.on {
    background: #fdeeee;
    border-color: #e39a9a;
    color: #b42318;
}
.posts-table tr.is-fb-good td {
    background: rgba(232, 248, 238, 0.45);
}
.posts-table tr.is-fb-bad td {
    background: rgba(253, 238, 238, 0.5);
}
.msg-hit-row.is-fb-good .msg-bubble {
    box-shadow: inset 3px 0 0 #7dcf98;
}
.msg-hit-row.is-fb-bad .msg-bubble {
    box-shadow: inset 3px 0 0 #e39a9a;
}
.fb-ops.cmt-fb {
    margin-top: 0.45rem;
    justify-content: flex-start;
}
.post-text {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 0.4rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.post-thumb {
    position: relative;
    width: 3.8rem;
    height: 3.8rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3eee6;
    cursor: pointer;
    transform: none !important;
    box-shadow: none !important;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.post-thumb-video .post-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}
.post-media-audio {
    width: min(100%, 16rem);
}
.post-media-audio audio {
    width: 100%;
    height: 2.2rem;
}
.post-row-toggle {
    cursor: pointer;
}
.post-row-toggle:hover td {
    background: #f7fafc;
}
.post-row-toggle.is-expanded td {
    background: #eef5fb;
}
.post-cmt-panel-row > td {
    padding: 0 !important;
    border-bottom: none;
    background: transparent;
}
.post-cmt-slide {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}
.post-cmt-panel-row.is-open .post-cmt-slide {
    grid-template-rows: 1fr;
}
.post-cmt-inner {
    min-height: 0;
    overflow: hidden;
    background: #f4f7fb;
    border-bottom: 1px solid #d9e3ef;
}
.post-cmt-panel-row.is-open .post-cmt-inner {
    padding: 0.7rem 0.95rem 0.85rem;
    border-top: 1px solid #d9e3ef;
}
.post-cmt-head {
    font-size: 0.78rem;
    font-weight: 700;
    color: #5a6a7e;
    margin-bottom: 0.45rem;
}
.post-cmt-loading,
.post-cmt-empty {
    font-size: 0.85rem;
    color: #7a8899;
    padding: 0.55rem 0.1rem;
}
.post-cmt-item {
    background: #fff;
    border: 1px solid #e2eaf3;
    border-radius: 0.55rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.45rem;
}
.post-cmt-item.is-reply {
    margin-left: 1.2rem;
    background: #fafcfe;
}
.post-cmt-item.is-fb-good {
    box-shadow: inset 3px 0 0 #7dcf98;
}
.post-cmt-item.is-fb-bad {
    box-shadow: inset 3px 0 0 #e39a9a;
}
.post-cmt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    font-size: 0.75rem;
    color: #6a7a8c;
    margin-bottom: 0.3rem;
}
.post-cmt-text {
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.post-row-editing td {
    background: #fff7ef;
    border-bottom: 1px solid #efd2b5;
    vertical-align: top;
}
.post-edit-span { padding: 0.7rem 0.85rem !important; white-space: normal !important; }
.post-edit-panel {
    background: #fff;
    border: 1px solid #ebd2b8;
    border-radius: 0.85rem;
    overflow: hidden;
}
.post-edit-head {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding: 0.7rem 0.9rem;
    background: linear-gradient(180deg, #fffaf4 0%, #fff6ec 100%);
    border-bottom: 1px solid #f0dcc8;
}
.post-edit-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--deep);
}
.post-edit-title b { color: var(--brand-deep); }
.post-edit-sub {
    font-size: 0.78rem;
    color: var(--mute);
    font-weight: 600;
}
.post-edit-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13.5rem;
    gap: 0.9rem;
    padding: 0.85rem 0.9rem 0.95rem;
}
.post-edit-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.post-edit-side {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.7rem;
    background: #faf7f2;
    border: 1px solid var(--line-soft);
    border-radius: 0.7rem;
}
.post-edit-label,
.post-edit-side .post-edit-label {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--deep);
    letter-spacing: 0.02em;
}
.post-edit-label-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}
.post-edit-hint {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--mute);
}
.post-edit-empty {
    padding: 0.7rem 0.8rem;
    border: 1px dashed var(--line);
    border-radius: 0.55rem;
    color: var(--mute);
    font-size: 0.8rem;
}
.post-edit-text {
    width: 100%;
    min-height: 5rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    background: #fffdf9;
    box-sizing: border-box;
}
.post-edit-input {
    width: 100%;
    height: 2.15rem;
    border: 1px solid var(--line);
    border-radius: 0.45rem;
    padding: 0 0.45rem;
    font-size: 0.8rem;
    background: #fff;
    margin: 0;
    box-sizing: border-box;
}
.post-edit-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}
.post-edit-stats label {
    display: flex !important;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0 !important;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--mute);
}
.post-edit-num {
    width: 100%;
    height: 2.05rem;
    border: 1px solid var(--line);
    border-radius: 0.4rem;
    padding: 0 0.25rem;
    font-size: 0.82rem;
    text-align: center;
    background: #fff;
    margin: 0;
    box-sizing: border-box;
}
.post-edit-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.35rem;
}
.post-edit-actions .post-op-btn { width: 100%; min-width: 0; height: 2.2rem; }
.post-media-edit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.7rem;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
}
.post-media-edit-item {
    position: relative;
    width: 5rem;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
}
.post-media-edit-item.is-audio {
    width: min(100%, 16rem);
    align-items: stretch;
}
.post-media-edit-item.is-off { opacity: 0.42; }
.post-media-edit-item .post-thumb {
    width: 5rem;
    height: 5rem;
}
.post-media-kind {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mute);
    line-height: 1;
}
.post-media-check {
    position: absolute;
    top: 0.28rem;
    right: 0.28rem;
    z-index: 3;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0.3rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
    cursor: pointer;
}
.post-media-edit-item.is-audio .post-media-check {
    top: 0.4rem;
    right: 0.4rem;
}
.post-media-check .media-mark,
.post-media-check input[type="checkbox"] {
    width: 0.95rem !important;
    height: 0.95rem !important;
    min-width: 0.95rem;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 0.2rem !important;
    background: #fff !important;
    box-shadow: none !important;
    appearance: auto;
    -webkit-appearance: checkbox;
    cursor: pointer;
}
@media (max-width: 1100px) {
    .post-edit-body { grid-template-columns: 1fr; }
    .post-edit-side { order: -1; }
}
.media-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 12rem;
}
.media-preview img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 0.7rem;
    display: block;
}
.media-preview video {
    width: 100%;
    max-height: 70vh;
    border-radius: 0.7rem;
    background: #111;
}
.edit-media-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.55rem 0 0.35rem;
    padding: 0.65rem 0.75rem;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
}
.edit-media-item {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 !important;
    cursor: pointer;
    line-height: 1.3;
}
.edit-media-item .media-keep,
.modal-card input[type="checkbox"],
.modal-card input.check {
    width: 1.05rem !important;
    height: 1.05rem !important;
    min-width: 1.05rem;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    box-shadow: none !important;
    flex: 0 0 auto;
    appearance: auto;
    -webkit-appearance: checkbox;
}
.edit-media-item .edit-media-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.edit-media-thumb {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.4rem;
    object-fit: cover;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}
.post-inline-media { margin: 0; }
.ai-roles-table .ai-bio-cell,
.ai-plans-table td {
    max-width: 12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-plans-table .tag {
    background: #fff0e6;
    color: var(--brand-deep);
}
.ai-plan-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
@media (max-width: 900px) {
    .ai-plan-layout { grid-template-columns: 1fr; }
}
.ai-subhead {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.55rem;
    color: var(--ink, #222);
}
.ai-rank-table td,
.ai-rank-table th {
    white-space: nowrap;
}
.ai-score-hint {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: var(--mute);
}
.ai-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 36rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: #fff;
}
.ai-feed-list li {
    display: flex;
    gap: 0.65rem;
    align-items: baseline;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    line-height: 1.45;
}
.ai-feed-list li:last-child { border-bottom: 0; }
.ai-feed-list li.empty {
    color: var(--mute);
    justify-content: center;
    padding: 1.2rem;
}
.ai-feed-time {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: var(--mute);
    font-weight: 600;
}
.ai-feed-text { min-width: 0; word-break: break-word; }
.ai-style-note-label {
    display: block;
    margin: 0.35rem 0 0.35rem;
    font-size: 0.85rem;
    color: var(--mute);
    font-weight: 700;
}
.ai-style-note {
    width: 100%;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.ai-style-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 36rem;
    overflow: auto;
    padding-right: 0.15rem;
}
.ai-style-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
}
.ai-style-row input {
    min-width: 7rem;
    font-size: 0.9rem;
    margin: 0;
}
.ai-style-row input.grow {
    flex: 1 1 12rem;
    min-width: 10rem;
}
.ai-style-row .ai-style-del {
    flex: 0 0 auto;
    min-width: 3.2rem;
}
.ai-style-empty {
    padding: 1.2rem;
    text-align: center;
    color: var(--mute);
    font-size: 0.9rem;
    border: 1px dashed var(--line);
    border-radius: 0.55rem;
}
.modal-card label {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.85rem;
    color: var(--mute);
    font-weight: 700;
}
.modal-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1.1rem;
    flex-wrap: nowrap;
}
.modal-actions button {
    width: auto !important;
    min-width: 5.5rem;
    height: 2.45rem;
    margin: 0 !important;
    padding: 0 1rem;
    flex: 0 0 auto;
    transform: none !important;
}
.msg-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.95rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line-soft);
}
.pager-info { font-size: 0.82rem; color: var(--mute); font-weight: 600; }
.pager-btns { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pager-btn {
    min-width: 2.2rem;
    height: 2.1rem;
    padding: 0 0.65rem;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    font-weight: 700;
    font-size: 0.8rem;
}
.pager-btn:hover { transform: none; border-color: rgba(249, 106, 3, 0.45); }
.pager-btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.toolbar-tip {
    width: 100%;
    margin: 0;
    font-size: 0.78rem;
    color: var(--mute);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.stat-card .label { color: var(--mute); font-size: 0.85rem; font-weight: 600; }
.stat-card .num {
    font-size: 1.85rem;
    font-weight: 900;
    margin-top: 0.4rem;
    letter-spacing: -0.02em;
    color: var(--deep);
}
.stat-card .sub { margin-top: 0.55rem; font-size: 0.78rem; color: var(--mute); line-height: 1.55; }
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
    margin-bottom: 0.95rem;
    box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 0.85rem; font-size: 1.05rem; font-weight: 800; }
.announce-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.announce-check {
    flex: 0 0 auto;
    padding-top: 0.2rem;
    cursor: pointer;
}
.announce-check .check { width: 1.05rem; height: 1.05rem; }
.announce-body { flex: 1; min-width: 0; }
.announce-batch {
    position: sticky;
    bottom: 0;
    margin-top: 0.4rem;
    padding: 0.75rem 0;
    background: linear-gradient(180deg, transparent, var(--bg) 28%);
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
    .layout { flex-direction: column; }
    .side { width: 100%; }
}
.metric {
    background: var(--brand-soft);
    border-radius: 0.8rem;
    padding: 0.85rem;
    border: 1px solid rgba(249, 106, 3, 0.08);
}
.metric b { display: block; font-size: 1.25rem; margin-top: 0.25rem; }
.metric span { color: var(--mute); font-size: 0.78rem; font-weight: 600; }

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
}
th {
    background: #faf7f2;
    color: var(--mute);
    font-weight: 800;
    white-space: nowrap;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}
tr:hover td { background: #fffaf4; }
.room-title { font-weight: 800; color: var(--deep); }
.room-sub { font-size: 0.75rem; color: var(--mute); margin-top: 0.15rem; }
.avatar {
    width: 2.15rem; height: 2.15rem; border-radius: 50%;
    background: #efe8dc; display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: #f3f0ea;
    color: var(--mute);
    font-weight: 700;
}
.tag.ai { background: #eaf1ff; color: var(--ai); }
.tag.human { background: #fff0e6; color: var(--brand); }
.tag.online { background: #e6f7ed; color: #1a7f4b; }
.tag.hit { background: var(--brand-soft); color: var(--brand-deep); }
.ops { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ops button { padding: 0.4rem 0.7rem; font-size: 0.78rem; }

.modal {
    position: fixed; inset: 0; background: rgba(20, 16, 10, 0.45);
    display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1.25rem;
    backdrop-filter: blur(2px);
}
.modal-card {
    width: min(36rem, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 1.1rem;
    padding: 1.35rem;
    box-shadow: 0 24px 60px rgba(20, 16, 10, 0.2);
    border: 1px solid var(--line);
}
.modal-card.wide { width: min(52rem, 100%); }
.modal-card.mem {
    width: min(56rem, 100%);
    max-height: 92vh;
    padding: 1.45rem 1.55rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.modal-card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 800; }
.modal-sub { color: var(--mute); font-size: 0.82rem; margin-bottom: 0.95rem; }
.modal-actions { display: flex; gap: 0.55rem; justify-content: flex-end; margin-top: 0.95rem; }

/* —— AI 记忆面板 —— */
.mem-head { display: flex; flex-direction: column; gap: 0.35rem; }
.mem-head-main h3 { margin: 0; letter-spacing: 0.02em; }
.mem-sub { margin: 0.2rem 0 0; color: var(--mute); font-size: 0.8rem; }
.mem-toolbar { display: flex; flex-direction: column; gap: 0.4rem; }
.mem-label {
    display: block; margin: 0;
    font-size: 0.78rem; font-weight: 700; color: var(--mute);
    letter-spacing: 0.02em;
}
.mem-pick-row { display: flex; gap: 0.55rem; align-items: stretch; }
.mem-select {
    flex: 1; min-width: 0;
    height: 2.7rem; margin: 0;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0 0.85rem;
}
.mem-select-lg {
    min-height: 2.9rem;
    height: auto;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    line-height: 1.35;
    white-space: normal;
}
.mem-refresh { flex-shrink: 0; min-height: 2.9rem; padding: 0 1rem; }
.mem-body {
    flex: 1 1 auto;
    min-height: 22rem;
    max-height: min(58vh, 34rem);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #fbfaf7 0%, #fff 36%);
    padding: 0.95rem 1rem 1rem;
}
.mem-meta {
    display: flex; flex-direction: column; gap: 0.7rem;
    padding-bottom: 0.75rem; margin-bottom: 0.55rem;
    border-bottom: 1px dashed #ebe4d8;
}
.mem-meta-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem; }
.mem-meta-who strong { font-size: 1.05rem; }
.mem-meta-id, .mem-meta-phone {
    font-size: 0.75rem; color: var(--mute); font-weight: 600;
    background: #f3f0e9; padding: 0.12rem 0.45rem; border-radius: 999px;
}
.mem-filter {
    display: flex; flex-wrap: wrap; gap: 0.55rem;
    align-items: flex-end;
}
.mem-filter-item {
    display: flex; flex-direction: column; gap: 0.22rem;
    margin: 0; font-size: 0.72rem; font-weight: 700; color: var(--mute);
}
.mem-filter-item input {
    margin: 0 !important;
    height: 2.2rem;
    min-width: 9.5rem;
    border-radius: 0.65rem;
    font-weight: 600;
}
.mem-filter #memFilterGo {
    height: 2.2rem;
    padding: 0 0.9rem;
    margin-bottom: 1px;
}
.mem-tabs-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.75rem;
    margin: 0.15rem 0 0.7rem;
    width: 100%;
}
.mem-tabs {
    display: flex; gap: 0.35rem;
    margin: 0;
    padding: 0.25rem;
    background: #f3f0e9;
    border-radius: 0.85rem;
    width: fit-content;
    max-width: 100%;
}
.mem-tabs-sub {
    margin: 0;
    margin-left: auto;
    background: #ebe6dc;
}
.mem-tab {
    border: none;
    background: transparent;
    color: #6b6256;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.42rem 0.85rem;
    border-radius: 0.65rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.mem-tab-sub {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
}
.mem-tab:hover { background: rgba(255,255,255,0.55); }
.mem-tab.active {
    background: #fff;
    color: #2f2a24;
    box-shadow: 0 1px 4px rgba(20, 16, 10, 0.08);
}
.mem-tab-hint {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--mute);
}
.mem-tab.active .mem-tab-hint { color: var(--brand-deep); }
.mem-ch {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--brand-deep);
    background: rgba(249, 106, 3, 0.12);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}
.mem-session-head {
    list-style: none !important;
    margin: 0.45rem 0 0.1rem !important;
    padding: 0.15rem 0.1rem !important;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--mute);
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.mem-section { margin-top: 0.2rem; }
.mem-empty {
    color: var(--mute); text-align: center;
    padding: 2.4rem 1rem; font-size: 0.88rem;
}
.mem-empty.soft { padding: 0.85rem 0.15rem; text-align: left; font-size: 0.82rem; }
.mem-pin-list, .mem-turn-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 0.45rem;
}
.mem-pin-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    background: #fff8e8;
    border: 1px solid #f3e2b8;
}
.mem-pin-idx {
    flex-shrink: 0; width: 1.25rem; height: 1.25rem;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800;
    background: var(--brand); color: #fff;
    margin-top: 0.1rem;
}
.mem-pin-text { flex: 1; min-width: 0; font-size: 0.88rem; font-weight: 600; line-height: 1.45; }
.mem-unpin { flex-shrink: 0; padding: 0.28rem 0.55rem; font-size: 0.72rem; }
.mem-turn-list li {
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    border: 1px solid #efe9df;
    background: #fff;
}
.mem-turn-list li.is-ai { background: #f7fbf4; border-color: #e2ecda; }
.mem-turn-list li.is-human { background: #fff; }
.mem-turn-top {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
    margin-bottom: 0.28rem;
}
.mem-role {
    font-size: 0.68rem; font-weight: 800;
    padding: 0.1rem 0.42rem; border-radius: 999px;
    background: #ece7de; color: #5c564f;
}
.mem-turn-list li.is-ai .mem-role {
    background: #dff0d2; color: #3d6b28;
}
.mem-time, .mem-w { font-size: 0.7rem; color: var(--mute); font-weight: 600; }
.mem-tag {
    font-size: 0.68rem; font-weight: 800;
    color: var(--brand-deep); background: var(--brand-soft);
    padding: 0.1rem 0.4rem; border-radius: 999px;
}
.mem-turn-text {
    font-size: 0.9rem; line-height: 1.5; color: #2f2a24;
    word-break: break-word;
}
.mem-pager {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 0.5rem;
    margin-top: 0.75rem; padding-top: 0.55rem;
    border-top: 1px solid #efe9df;
}
.mem-pager-info { font-size: 0.75rem; color: var(--mute); font-weight: 600; }
.mem-pager-btns { display: flex; gap: 0.4rem; }
.mem-pager-btns button { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.mem-pager-btns button:disabled { opacity: 0.4; cursor: not-allowed; }
.mem-pin-box { display: flex; flex-direction: column; gap: 0.35rem; }
.mem-pin-box.in-detail {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.8rem;
    background: #fff8e8;
    border: 1px solid #f3e2b8;
}
.mem-pin-row { display: flex; gap: 0.5rem; align-items: stretch; }
.mem-pin-input {
    flex: 1; min-width: 0; margin: 0 !important;
    height: 2.45rem; border-radius: 0.7rem;
}
.mem-pin-row .brand { flex-shrink: 0; padding: 0 1.1rem; }
.mem-actions {
    margin-top: 0.15rem;
    justify-content: space-between;
    align-items: center;
}
.mem-actions-left { display: flex; gap: 0.55rem; }
.mem-btn {
    min-height: 2.35rem;
    padding: 0 1.05rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.mem-btn-delete {
    background: #fff;
    color: #b42318;
    border-color: #f0a8a0;
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.04);
}
.mem-btn-delete:hover {
    background: #fff1ef;
    border-color: #e58b82;
}
.mem-btn-clear {
    background: #2f2a24;
    color: #fff;
    border-color: #2f2a24;
}
.mem-btn-clear:hover {
    background: #1c1915;
}
.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    max-width: 34rem;
    box-shadow: var(--shadow);
}
.form-card label { display: block; margin-top: 0.55rem; font-size: 0.85rem; color: var(--mute); font-weight: 700; }
.empty { color: var(--mute); padding: 2rem; text-align: center; font-size: 0.9rem; }

.msg-thread {
    max-height: 58vh;
    overflow: auto;
    padding: 0.25rem 0.15rem;
}
.msg-bubble {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.65rem;
    background: #faf8f5;
}
.msg-bubble.is-hit {
    border-color: rgba(249, 106, 3, 0.35);
    background: #fff8f1;
}
.msg-bubble .meta {
    font-size: 0.75rem;
    color: var(--mute);
    margin-bottom: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    font-weight: 600;
}
.msg-text {
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--deep);
}
.msg-media { margin-top: 0.55rem; }
.msg-media audio {
    width: 100%;
    max-width: 28rem;
    height: 2.6rem;
    display: block;
}
.msg-media video {
    width: 100%;
    max-width: 28rem;
    max-height: 22rem;
    border-radius: 0.65rem;
    background: #111;
    display: block;
}
.msg-media img {
    max-width: min(100%, 22rem);
    max-height: 18rem;
    width: auto;
    height: auto;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    display: block;
    background: #f3eee6;
    object-fit: contain;
}
.msg-type {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #efe8dc;
    color: var(--mute);
    font-weight: 700;
}
.hits-panel { margin-bottom: 0.95rem; }
.hits-panel .panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.hits-panel .panel-head h2 { margin: 0; }
.check { width: 1rem; height: 1rem; }
.chart-panel { padding-bottom: 0.7rem; }
.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}
.chart-head h2 { margin: 0; font-size: 1.05rem; }
.chart-sum { font-size: 0.78rem; color: var(--mute); }
.chart-sum b { color: var(--text); font-size: 0.9rem; }
.chart-box {
    width: 100%;
    height: 15rem;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
}
.chart-box canvas {
    width: 100%;
    height: 100%;
    display: block;
}
