:root {
    --primary: #FCC52A;
    --primary-deep: #d9a600;
    --primary-soft: #fff7d6;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #fafbfc;
    --text: #1d2129;
    --text-2: #4e5969;
    --text-3: #86909c;
    --line: #e9ecf0;
    --line-strong: #dfe3e8;
    --danger: #e34d59;
    --success: #19a974;
    --info: #3b82f6;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(20, 30, 50, .04);
    --shadow: 0 8px 28px rgba(20, 30, 50, .08);
    --shadow-lg: 0 20px 60px rgba(20, 30, 50, .16);
    --sidebar-w: 232px;
    --topbar-h: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
i { line-height: 1; }
::selection { background: var(--primary-soft); }

.app { min-height: 100vh; }
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 204px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--primary); color: #1d2129;
    display: grid; place-items: center; font-size: 22px;
    box-shadow: 0 4px 12px rgba(252, 197, 42, .25);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.3; }
.brand-copy strong { font-size: 16px; letter-spacing: .02em; }
.brand-copy span { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.global-search {
    flex: 1; max-width: 460px; height: 40px;
    display: flex; align-items: center; gap: 9px;
    background: var(--surface-soft); border: 1px solid var(--line);
    border-radius: 10px; padding: 0 12px; color: var(--text-3);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.global-search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(252,197,42,.13); }
.global-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--text); font-size: 13px; }
.global-search input::placeholder { color: var(--text-3); }
.global-search kbd { font-family: inherit; font-size: 10px; border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 5px; color: var(--text-3); background: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-pill, .icon-btn {
    border: 0; background: transparent; color: var(--text-2);
    border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s, transform .18s;
}
.nav-pill { height: 38px; padding: 0 12px; gap: 7px; font-size: 13px; white-space: nowrap; }
.nav-pill i { font-size: 16px; }
.nav-pill:hover, .icon-btn:hover { background: var(--bg); color: var(--text); }
.nav-pill.active { background: var(--primary-soft); color: #8a6800; }
.icon-btn { width: 38px; height: 38px; font-size: 18px; flex-shrink: 0; }
.icon-btn.small { width: 28px; height: 28px; font-size: 15px; }
.icon-btn.danger:hover { background: #fff0f1; color: var(--danger); }
.mobile-menu { display: none; }

.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--surface); border-right: 1px solid var(--line);
    padding: 22px 14px 16px; display: flex; flex-direction: column;
    position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    overflow-y: auto; z-index: 20;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 12px; color: var(--text-3); font-size: 12px; letter-spacing: .08em; }
.platform-nav { display: flex; flex-direction: column; gap: 4px; }
.platform-item {
    border: 0; width: 100%; background: transparent; border-radius: 10px;
    display: flex; align-items: center; gap: 11px; padding: 11px 12px;
    color: var(--text-2); text-align: left; transition: background .18s, color .18s;
    position: relative;
}
.platform-item:hover { background: var(--bg); color: var(--text); }
.platform-item.active { background: var(--primary-soft); color: #745600; }
.platform-item.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--primary); }
.platform-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; background: color-mix(in srgb, var(--pcolor, #86909c) 12%, white); color: var(--pcolor, #86909c); }
.platform-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.platform-count { font-size: 11px; color: var(--text-3); background: rgba(0,0,0,.035); border-radius: 20px; padding: 1px 7px; }
.platform-item.active .platform-count { background: rgba(252,197,42,.22); color: #8a6800; }
.platform-edit { opacity: 0; width: 24px; height: 24px; border: 0; background: transparent; color: var(--text-3); border-radius: 6px; display: grid; place-items: center; }
.platform-item:hover .platform-edit { opacity: 1; }
.platform-edit:hover { background: rgba(0,0,0,.06); color: var(--text); }
.add-platform { margin-top: 12px; border: 1px dashed var(--line-strong); background: transparent; color: var(--text-3); border-radius: 10px; padding: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; transition: all .18s; }
.add-platform:hover { border-color: var(--primary); color: #8a6800; background: var(--primary-soft); }
.sidebar-foot { margin-top: auto; padding: 24px 8px 0; }
.support-entry { position: relative; }
.support-note { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); color: var(--text-3); cursor: pointer; transition: border-color .18s, background .18s; }
.support-entry:hover .support-note { border-color: var(--primary); background: var(--primary-soft); }
.support-note i { font-size: 18px; color: var(--success); }
.support-note div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.support-note strong { font-size: 11px; color: var(--text-2); font-weight: 500; }
.support-note span { font-size: 10px; }
.support-pop { position: absolute; left: 0; bottom: calc(100% + 10px); width: 188px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; pointer-events: none; z-index: 40; }
.support-pop::after { content: ''; position: absolute; left: 26px; bottom: -6px; width: 10px; height: 10px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.support-pop img { width: 164px; height: 164px; object-fit: contain; border-radius: 8px; background: #fff; }
.support-pop span { font-size: 11px; color: var(--text-3); }
.support-entry:hover .support-pop, .support-entry:focus .support-pop { opacity: 1; visibility: visible; transform: none; }
.support-entry:focus { outline: none; }
.sidebar-mask { display: none; }

.main { flex: 1; min-width: 0; padding: 32px 36px 64px; }
.view { max-width: 1440px; margin: 0 auto; animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-title { display: flex; align-items: center; gap: 14px; }
.page-title-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--pcolor, #FCC52A) 14%, white); color: var(--pcolor, #d9a600); }
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--text-3); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn {
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2);
    height: 38px; padding: 0 15px; border-radius: 9px; display: inline-flex;
    align-items: center; justify-content: center; gap: 7px; font-size: 13px;
    transition: all .18s; white-space: nowrap;
}
.btn:hover { border-color: #cbd1d9; color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #2b2200; font-weight: 500; }
.btn.primary:hover { background: #f3bc16; border-color: #f3bc16; box-shadow: 0 4px 12px rgba(252,197,42,.25); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); box-shadow: none; }
.btn.danger { color: var(--danger); border-color: #ffd3d7; background: #fff7f8; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.stat-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.stat-ico.gold { background: var(--primary-soft); color: #b88600; }
.stat-ico.blue { background: #eef5ff; color: #3b82f6; }
.stat-ico.green { background: #eafaf3; color: #19a974; }
.stat-ico.purple { background: #f3efff; color: #8b5cf6; }
.stat-meta { display: flex; flex-direction: column; }
.stat-meta strong { font-size: 22px; line-height: 1.2; font-weight: 600; }
.stat-meta span { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-bar h2 { margin: 0; font-size: 15px; font-weight: 500; }
.section-bar .muted { color: var(--text-3); font-size: 12px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 30px; padding: 5px 12px; font-size: 12px; transition: all .18s; }
.chip:hover, .chip.active { border-color: var(--primary); background: var(--primary-soft); color: #8a6800; }

.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.account-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow-sm); cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative; overflow: hidden;
}
.account-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent, var(--primary)); opacity: 0; transition: opacity .2s; }
.account-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.account-card:hover::after { opacity: 1; }
.account-top { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; font-weight: 500; background: var(--avatar-bg, #fff7d6); color: var(--avatar-fg, #9a7400); flex-shrink: 0; }
.account-name { min-width: 0; flex: 1; }
.account-name h3 { margin: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name .platform-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); margin-top: 3px; }
.account-menu { opacity: 0; }
.account-card:hover .account-menu { opacity: 1; }
.account-note { color: var(--text-3); font-size: 12px; min-height: 38px; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.account-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; min-height: 22px; }
.tag { font-size: 10px; line-height: 1; padding: 5px 8px; border-radius: 6px; background: var(--bg); color: var(--text-2); }
.tag.gold { background: var(--primary-soft); color: #8a6800; }
button.tag { border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }
button.tag:hover { filter: brightness(.95); }
.account-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); }
.account-foot span { display: inline-flex; align-items: center; gap: 5px; }
.account-foot .fresh { color: var(--success); }
.account-foot .stale { color: #d98b00; }
.account-foot .arrow { color: var(--text-3); font-size: 15px; transition: transform .2s; }
.account-card:hover .account-foot .arrow { transform: translateX(3px); color: #8a6800; }

.empty-state { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 64px 24px; text-align: center; }
.empty-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--bg); color: var(--text-3); display: grid; place-items: center; font-size: 28px; margin: 0 auto 18px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.empty-state p { margin: 0 auto 20px; max-width: 420px; color: var(--text-3); font-size: 13px; }

.account-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 24px; display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-sm); }
.account-hero .avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 24px; }
.account-hero-main { flex: 1; min-width: 0; }
.account-hero h1 { margin: 0; font-size: 22px; font-weight: 600; }
.account-hero .hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.account-hero .hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.account-hero .hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.back-link { border: 0; background: transparent; color: var(--text-3); padding: 0; margin-bottom: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.back-link:hover { color: var(--text); }

.content-list { display: flex; flex-direction: column; gap: 12px; }
.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; transition: border-color .18s, box-shadow .18s; animation: fadeUp .25s ease both; }
.content-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.content-cover { width: 92px; height: 70px; border-radius: 9px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.content-body { flex: 1; min-width: 0; }
.content-title-row { display: flex; align-items: flex-start; gap: 8px; }
.content-title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; flex: 1; }
.content-title a:hover { color: #b88600; }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 5px; white-space: nowrap; line-height: 1.6; }
.badge.hot { background: #fff0e8; color: #e66a1f; }
.badge.star { background: var(--primary-soft); color: #8a6800; }
.content-summary { margin: 6px 0 10px; color: var(--text-3); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.content-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; color: var(--text-3); font-size: 11px; }
.content-meta span { display: inline-flex; align-items: center; gap: 4px; }
.content-meta .account-link { color: var(--text-2); }
.content-meta .account-link:hover { color: #b88600; }
.content-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.content-actions .icon-btn { width: 30px; height: 30px; font-size: 15px; }
.content-actions .icon-btn.starred { color: #d9a600; }

.timeline-group { margin-bottom: 30px; }
.timeline-date { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.timeline-date strong { font-size: 13px; font-weight: 500; white-space: nowrap; }
.timeline-date span { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.timeline-date::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.radar-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel h2 { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel > p { margin: 0 0 18px; color: var(--text-3); font-size: 12px; }
.word-cloud { min-height: 320px; display: flex; align-items: center; justify-content: center; gap: 12px 18px; flex-wrap: wrap; padding: 20px; background: var(--surface-soft); border: 1px dashed var(--line); border-radius: var(--radius); }
.word { padding: 5px 10px; border-radius: 8px; color: #7a5c00; background: var(--primary-soft); cursor: default; transition: transform .18s; }
.word:hover { transform: scale(1.06); }
.word small { font-size: 10px; opacity: .6; margin-left: 4px; }
.topic-list { display: flex; flex-direction: column; gap: 2px; }
.topic-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.topic-item:last-child { border-bottom: 0; }
.topic-rank { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; background: var(--bg); color: var(--text-3); flex-shrink: 0; }
.topic-item:nth-child(-n+3) .topic-rank { background: var(--primary-soft); color: #8a6800; }
.topic-name { flex: 1; font-size: 13px; }
.topic-count { font-size: 11px; color: var(--text-3); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.settings-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.settings-card h2 { margin: 0 0 8px; font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.settings-card h2 i { color: #b88600; }
.settings-card p { margin: 0 0 18px; color: var(--text-3); font-size: 12px; line-height: 1.8; }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settings-card.full { grid-column: 1 / -1; }
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-table tr:last-child td { border-bottom: 0; }
.info-table td:first-child { color: var(--text-3); width: 140px; }
.danger-zone { border-color: #ffd9dd; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,25,35,.42); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .18s ease; backdrop-filter: blur(2px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: modalIn .22s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--text-2); }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item textarea, .form-item select {
    width: 100%; border: 1px solid var(--line-strong); border-radius: 8px;
    padding: 9px 11px; outline: 0; color: var(--text); background: #fff;
    transition: border-color .18s, box-shadow .18s; font-size: 13px;
}
.form-item input:focus, .form-item textarea:focus, .form-item select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(252,197,42,.13); }
.form-item textarea { resize: vertical; min-height: 76px; }
.form-help { color: var(--text-3); font-size: 11px; }
.check-row { display: flex; gap: 20px; padding-top: 4px; }
.check-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-label input { accent-color: var(--primary); width: 15px; height: 15px; }
.icon-picker { display: flex; gap: 7px; flex-wrap: wrap; }
.icon-choice { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; color: var(--text-2); border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.icon-choice.active { border-color: var(--primary); background: var(--primary-soft); color: #8a6800; }
.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-choice { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.color-choice.active { box-shadow: 0 0 0 2px var(--text); }
.confirm-text { font-size: 14px; line-height: 1.9; color: var(--text-2); }
.confirm-text strong { color: var(--text); }

.toast-root { position: fixed; top: 88px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 240px; max-width: 380px; animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.toast.success i { color: var(--success); font-size: 18px; }
.toast.error i { color: var(--danger); font-size: 18px; }
.toast.leaving { opacity: 0; transform: translateX(16px); transition: all .2s; }

.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; gap: 14px; color: var(--text-3); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.keyword-list { display: flex; flex-direction: column; gap: 10px; }
.keyword-search-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; }
.keyword-search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.keyword-search-bar i { color: var(--text-3); font-size: 15px; }
.keyword-search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--text); }
.keyword-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; }
.keyword-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.keyword-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keyword-platforms { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.keyword-platform { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--pcolor, var(--text-2)); display: grid; place-items: center; font-size: 16px; transition: all .18s; }
.keyword-platform:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.keyword-ais { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-left: 14px; border-left: 1px solid var(--line); }
.keyword-platform.ai { color: #6b4fd8; background: #f6f3ff; border-color: #e4dcff; }
.custom-ico { width: 1.15em; height: 1.15em; object-fit: contain; border-radius: 4px; vertical-align: -0.15em; }
.icon-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-preview { width: 38px; height: 38px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface-soft); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.icon-preview img { width: 26px; height: 26px; object-fit: contain; }
.icon-upload input[type="file"] { font-size: 12px; color: var(--text-2); max-width: 230px; }
.custom-search-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.custom-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.custom-search-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: #f6f3ff; color: #6b4fd8; flex-shrink: 0; }
.custom-search-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.custom-search-main strong { font-size: 13px; font-weight: 500; }
.custom-search-main span { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-home { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; text-align: left; border-radius: 12px; transition: opacity .18s; }
.brand-home:hover { opacity: .82; }
.member-box { display: flex; align-items: center; gap: 6px; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--line); }
.member-chip { height: 38px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 30px; padding: 0 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.member-chip:hover { background: var(--bg); color: var(--text); }
.member-chip i { font-size: 16px; }
.member-chip em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 20px; background: var(--bg); color: var(--text-3); }
.member-chip em.ok { background: #eafaf3; color: #138a5b; }
.member-chip em.warn { background: #fff3e8; color: #c4691b; }
.member-chip em.bad { background: #fff0f1; color: var(--danger); }

.auth-root { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: linear-gradient(160deg, #fffdf4 0%, var(--bg) 55%); }
.auth-root[hidden] { display: none; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 30px 28px 26px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand div:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.auth-brand strong { font-size: 17px; }
.auth-brand span { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { height: 34px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-submit { width: 100%; height: 42px; }
.auth-note { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--text-3); }

.home-stats { grid-template-columns: repeat(4, 1fr); }
.admin-table { font-size: 13px; }
.admin-table th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--bg); padding: 2px 6px; border-radius: 5px; }
.code-copy { border: 0; background: transparent; padding: 0; cursor: pointer; }
.code-copy:hover code { background: var(--primary-soft); color: var(--text); }
.code-result-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; padding: 4px 2px; }
.code-result-list .code-copy { text-align: left; }
.code-result-list .code-copy code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--bg); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); display: block; transition: background .15s ease, border-color .15s ease; }
.code-result-list .code-copy:hover code { border-color: var(--primary); }
.admin-table .row-actions { display: flex; gap: 4px; }
.admin-table .fresh { color: var(--success); }
.admin-table .stale { color: #d98b00; }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 5px; white-space: nowrap; line-height: 1.6; background: var(--bg); color: var(--text-2); }

/* 平台公告 */
.announcement-panel { margin-top: 24px; padding: 20px 24px; }
.announcement-list { display: flex; flex-direction: column; gap: 14px; }
.announcement-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--card, #fff); transition: border-color .15s ease; }
.announcement-item:hover { border-color: var(--primary); }
.announcement-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.announcement-head strong { font-size: 14px; color: var(--text); }
.announcement-date { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.ann-actions { display: inline-flex; gap: 4px; }
.announcement-body { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; word-break: break-word; }
.announcement-link { margin-top: 10px; }
.empty-state.slim { padding: 20px; color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.empty-state.slim i { font-size: 16px; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .08); }

@media (max-width: 1180px) {
    .topbar { gap: 16px; padding: 0 20px; }
    .nav-pill span { display: none; }
    .nav-pill { padding: 0 10px; }
    .main { padding: 26px 24px 56px; }
    .radar-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    :root { --topbar-h: 64px; }
    .topbar { padding: 0 16px; gap: 12px; }
    .brand { min-width: 0; }
    .brand-copy span { display: none; }
    .brand-copy strong { font-size: 15px; }
    .brand-mark { width: 34px; height: 34px; font-size: 19px; border-radius: 10px; }
    .mobile-menu { display: inline-flex; width: 30px; }
    .global-search { max-width: none; }
    .global-search kbd { display: none; }
    .top-actions .nav-pill { display: none; }
    .sidebar { position: fixed; left: 0; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .sidebar-mask { display: block; position: fixed; inset: var(--topbar-h) 0 0; background: rgba(20,25,35,.35); z-index: 15; opacity: 0; pointer-events: none; transition: opacity .22s; }
    .sidebar-mask.show { opacity: 1; pointer-events: auto; }
    .main { padding: 22px 16px 48px; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-actions { justify-content: flex-end; }
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .account-grid { grid-template-columns: 1fr; }
    .account-hero { flex-wrap: wrap; padding: 20px; }
    .account-hero .hero-actions { width: 100%; justify-content: flex-end; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-card.full { grid-column: auto; }
    .form-grid { grid-template-columns: 1fr; }
    .form-item.full { grid-column: auto; }
    .content-cover { width: 72px; height: 60px; }
    .content-card { padding: 15px; gap: 12px; }
    .keyword-row { flex-wrap: wrap; }
    .keyword-platforms { justify-content: flex-start; }
    .keyword-ais { justify-content: flex-start; padding-left: 0; border-left: 0; }
    .home-stats { grid-template-columns: repeat(2, 1fr); }
    .member-chip span { display: none; }
    .admin-table th, .admin-table td { padding: 8px 6px; }
    .toast-root { left: 16px; right: 16px; top: 76px; }
    .toast { max-width: none; min-width: 0; }
}
@media (max-width: 520px) {
    .brand-copy { display: none; }
    .global-search { height: 36px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-ico { width: 34px; height: 34px; font-size: 16px; }
    .stat-meta strong { font-size: 19px; }
    .page-head h1 { font-size: 21px; }
    .content-cover { display: none; }
    .content-meta { gap: 9px; }
    .modal-backdrop { padding: 12px; }
    .modal { max-height: calc(100vh - 24px); }
    .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
    .account-hero .avatar { width: 50px; height: 50px; font-size: 20px; }
    .account-hero h1 { font-size: 19px; }
}
