*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ===== 主题：暖阳橘（默认） ===== */
:root { --bg: #F7F4EC; --bg-blur: rgba(247, 244, 236, .82); --surface: #FFFFFF; --surface-2: #F5F1E8; --border: #E8E1D5; --border-strong: #D9CEBE; --text: #3D332C; --text-dim: #80746A; --text-mute: #B3A89D; --accent: #C07B57; --accent-soft: #F5EBE5; --dot: #C07B57; --radius: 14px; --shadow: 0 1px 2px rgba(61, 51, 44, .03), 0 6px 20px rgba(61, 51, 44, .03); --shadow-hover: 0 2px 4px rgba(61, 51, 44, .04), 0 10px 26px rgba(61, 51, 44, .05); }
[data-theme="dark"] { --bg: #1A1816; --bg-blur: rgba(26, 24, 22, .82); --surface: #221F1C; --surface-2: #292521; --border: #36312C; --border-strong: #49423A; --text: #E6E3DF; --text-dim: #9F9791; --text-mute: #736C65; --accent: #D09A72; --accent-soft: #362B24; --dot: #D97757; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3); --shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .35); }

/* 海蓝 */
[data-theme-color="seablue"] { --bg: #F3F6F9; --bg-blur: rgba(243, 246, 249, .85); --surface: #FFFFFF; --surface-2: #EFF3F8; --border: #DBE3EC; --border-strong: #B8C6D6; --text: #1E293B; --text-dim: #475569; --text-mute: #94A3B8; --accent: #3A79B8; --accent-soft: #EAF2FA; --dot: #3A79B8; --shadow: 0 1px 2px rgba(30, 41, 59, .03), 0 6px 20px rgba(30, 41, 59, .03); --shadow-hover: 0 2px 4px rgba(30, 41, 59, .04), 0 10px 26px rgba(30, 41, 59, .05); }
[data-theme="dark"][data-theme-color="seablue"] { --bg: #0E131A; --bg-blur: rgba(14, 19, 26, .85); --surface: #1A222D; --surface-2: #232E3D; --border: #2A3646; --border-strong: #3F4E61; --text: #E2E8F0; --text-dim: #94A3B8; --text-mute: #64748B; --accent: #6BA2D6; --accent-soft: #1E3348; --dot: #6BA2D6; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3); --shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .35); }

/* 护眼绿 */
[data-theme-color="green"] { --bg:#F3F5F1; --bg-blur:rgba(243,245,241,.82); --surface:#FFFFFF; --surface-2:#F0F3EE; --border:#E2E7DF; --border-strong:#CDD5C8; --text:#2E362F; --text-dim:#6B766D; --text-mute:#98A69B; --accent:#5C8D76; --accent-soft:#E6F0EA; --dot:#5C8D76; }
[data-theme="dark"][data-theme-color="green"] { --bg:#181B19; --bg-blur:rgba(24,27,25,.82); --surface:#202421; --surface-2:#262B27; --border:#303732; --border-strong:#424B44; --text:#E2E5E3; --text-dim:#909A93; --text-mute:#68716B; --accent:#7BB391; --accent-soft:#26342B; }

/* 极客紫 */
[data-theme-color="purple"] { --bg:#F6F4F9; --bg-blur:rgba(246,244,249,.82); --surface:#FFFFFF; --surface-2:#F1EEF6; --border:#E3DEF0; --border-strong:#D0C9E0; --text:#2E2B36; --text-dim:#716B80; --text-mute:#A39DB3; --accent:#7E6B8F; --accent-soft:#EBE6F0; --dot:#7E6B8F; }
[data-theme="dark"][data-theme-color="purple"] { --bg:#1A181D; --bg-blur:rgba(26,24,29,.82); --surface:#211E24; --surface-2:#28242C; --border:#35303A; --border-strong:#484150; --text:#E3E0E8; --text-dim:#9A95A3; --text-mute:#706A7A; --accent:#A997BC; --accent-soft:#2F2838; }

/* 樱花粉 */
[data-theme-color="pink"] { --bg:#F9F5F6; --bg-blur:rgba(249,245,246,.82); --surface:#FFFFFF; --surface-2:#F6EFEF; --border:#EEDFE1; --border-strong:#DEC8CA; --text:#3B3234; --text-dim:#857377; --text-mute:#B5A3A6; --accent:#B26A76; --accent-soft:#F5E6E8; --dot:#B26A76; }
[data-theme="dark"][data-theme-color="pink"] { --bg:#1C1819; --bg-blur:rgba(28,24,25,.82); --surface:#241F20; --surface-2:#2B2526; --border:#3A3133; --border-strong:#4F4245; --text:#EAE1E3; --text-dim:#A39496; --text-mute:#756568; --accent:#CF8E9A; --accent-soft:#3A272A; }

/* 抹茶青 */
[data-theme-color="cyan"] { --bg:#F2F7F6; --bg-blur:rgba(242,247,246,.82); --surface:#FFFFFF; --surface-2:#EAF2F1; --border:#DDE8E6; --border-strong:#C4D6D3; --text:#263331; --text-dim:#687C78; --text-mute:#94AAA6; --accent:#3E8A7B; --accent-soft:#E2F0ED; --dot:#3E8A7B; }
[data-theme="dark"][data-theme-color="cyan"] { --bg:#141918; --bg-blur:rgba(20,25,24,.82); --surface:#1C2220; --surface-2:#222A28; --border:#2D3835; --border-strong:#404F4B; --text:#E1E8E6; --text-dim:#8B9D99; --text-mute:#62736F; --accent:#68B8A6; --accent-soft:#1C362F; }

/* 晨雾灰 */
[data-theme-color="gray"] { --bg:#F5F5F5; --bg-blur:rgba(245,245,245,.82); --surface:#FFFFFF; --surface-2:#F0F0F0; --border:#E5E5E5; --border-strong:#D4D4D4; --text:#262626; --text-dim:#737373; --text-mute:#A3A3A3; --accent:#595959; --accent-soft:#F0F0F0; --dot:#595959; }
[data-theme="dark"][data-theme-color="gray"] { --bg:#181818; --bg-blur:rgba(24,24,24,.82); --surface:#202020; --surface-2:#262626; --border:#333333; --border-strong:#474747; --text:#E5E5E5; --text-dim:#9E9E9E; --text-mute:#707070; --accent:#A3A3A3; --accent-soft:#2E2E2E; }

/* 石墨蓝 */
[data-theme-color="indigo"] { --bg:#F2F4F8; --bg-blur:rgba(242,244,248,.82); --surface:#FFFFFF; --surface-2:#EAEDF3; --border:#DCE1E9; --border-strong:#C5CDD9; --text:#242B36; --text-dim:#626F82; --text-mute:#8E9AA9; --accent:#465E7B; --accent-soft:#E5EAF0; --dot:#465E7B; }
[data-theme="dark"][data-theme-color="indigo"] { --bg:#12161C; --bg-blur:rgba(18,22,28,.82); --surface:#1A2028; --surface-2:#202731; --border:#2B3542; --border-strong:#3E4C5E; --text:#E0E5EB; --text-dim:#8B9AAC; --text-mute:#647386; --accent:#7A96B8; --accent-soft:#212F40; }

/* ===== 基础重置 ===== */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif; font-size: 14.5px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transition: background-color .3s ease, color .3s ease; }
body.modal-open { overflow: hidden; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

/* ===== 图标通用 ===== */
.brand-mark, .avatar, .acc-ico, .nav-ico, .friend-ico { position: relative; overflow: hidden; flex-shrink: 0; }
.brand-mark img, .avatar img, .friend-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.brand-mark { width: 28px; height: 28px; }
.avatar { width: 46px; height: 46px; }

/* ===== 顶栏 ===== */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg-blur); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border-bottom: 1px solid var(--border); transition: background-color .3s ease, border-color .3s ease; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; font-weight: 600; font-size: 16.5px; letter-spacing: .02em; flex-shrink: 0; text-decoration: none; color: inherit; cursor: pointer; border-radius: 8px; transition: opacity .18s ease; }
.brand:hover { opacity: .78; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-mark { border-radius: 8px; background: linear-gradient(140deg, var(--accent), var(--accent-soft)); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.search-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.search-wrap input { width: 100%; height: 36px; padding: 0 14px 0 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 13.5px; outline: none; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.search-wrap input::placeholder { color: var(--text-mute); }
.search-wrap input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-mute); pointer-events: none; }
.icon-btn { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 16px; height: 16px; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* ===== 公告条 ===== */
.notice-bar { background: var(--surface); border-bottom: 1px solid var(--border); font-size: 12.5px; transition: background-color .3s ease, border-color .3s ease; }
.notice-bar-inner { max-width: 1120px; margin: 0 auto; padding: 7px 24px; display: flex; align-items: center; gap: 8px; min-height: 30px; }
.bar-tag { flex-shrink: 0; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
.bar-tag-pin { background: var(--dot); color: #fff; }
.bar-text { flex: 1; min-width: 0; padding: 0; border: none; background: transparent; font: inherit; color: var(--text-dim); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color .18s ease; }
.bar-text:hover { color: var(--text); }
.bar-dots { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.bar-dot-item { width: 14px; height: 14px; padding: 4px; border: none; border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.bar-dot-item::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--border-strong); transition: background-color .18s ease; }
.bar-dot-item.active::after { background: var(--accent); }

/* ===== 布局 ===== */
.layout { max-width: 1120px; margin: 0 auto; padding: 26px 24px 56px; display: grid; grid-template-columns: 160px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.cat-col { position: sticky; top: 84px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cat-title { margin: 0 0 8px; padding: 1px 2px 11px 16px; font-size: 13.5px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.cat-nav { display: flex; flex-direction: column; gap: 2px; }
.cat-tab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px 8px 16px; border: none; border-radius: 8px; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; transition: color .18s ease, background-color .18s ease; }
.cat-tab::before { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 3px; height: 14px; border-radius: 2px; background: transparent; transition: background-color .18s ease, height .18s ease; }
.cat-tab:hover { color: var(--text); background: var(--surface-2); }
.cat-tab:hover::before { background: var(--border-strong); height: 18px; }
.cat-tab.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.cat-tab.active::before { background: var(--accent); height: 20px; }
.cat-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tab-count { flex-shrink: 0; font-size: 11.5px; font-weight: 500; color: var(--text-mute); opacity: .75; }
.cat-tab.active .cat-tab-count { color: var(--accent); opacity: .85; }
.cat-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cat-random { display: block; width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .18s ease; }
.cat-random:hover { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.cat-random:active { transform: scale(.98); }

/* ===== 主区域 ===== */
.nav-search { position: sticky; top: 60px; z-index: 20; padding: 8px 0 16px; background: var(--bg); }
.nav-search .search-wrap { width: 100%; }
.nav-search .search-wrap input { height: 40px; padding: 0 16px 0 40px; font-size: 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.nav-search .search-wrap input::placeholder { color: var(--text-mute); }
.nav-search .search-wrap input:focus { background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.nav-search .search-icon { left: 14px; width: 16px; height: 16px; }
.group-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; margin-bottom: 18px; scrollbar-width: none; }
.group-nav::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-family: inherit; font-size: 12.5px; cursor: pointer; transition: all .18s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.nav-group + .nav-group { margin-top: 28px; }
.group-title { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; font-size: 12.5px; font-weight: 600; color: var(--text-mute); letter-spacing: .02em; position: relative; }
.group-title::before { content: ''; width: 3px; height: 11px; border-radius: 2px; background: var(--border-strong); }
.group-count { font-weight: 400; font-size: 11.5px; color: var(--text-mute); opacity: .75; }

/* ===== 卡片 ===== */
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-items: stretch; }
.layout > *, .nav-grid > * { min-width: 0; }
.nav-card { position: relative; display: flex; align-items: center; gap: 11px; height: 100%; padding: 12px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .3s ease; overflow: hidden; }
@media (hover: none) { .nav-card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
.nav-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.nav-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-ico { display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08); background: var(--surface-2); width: 34px; height: 34px; }
.nav-ico.nav-ico-img { background: var(--surface-2) !important; border: none; box-shadow: none; overflow: hidden; }
.nav-ico.nav-ico-img img { position: static !important; width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 0; border-radius: 0; }
.nav-info { min-width: 0; flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.nav-name { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-desc { font-size: 12px; line-height: 1.45; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-info-btn { display: none; position: absolute; right: 8px; bottom: 8px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-dim); font-family: Georgia, serif; font-size: 11px; font-weight: 700; font-style: italic; line-height: 1; align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 2; }
@media (hover: none) { .nav-card[data-truncated="true"] { padding-right: 34px; } .nav-card[data-truncated="true"] .nav-info-btn { display: flex; } }
mark { background: transparent; color: var(--accent); font-weight: 700; padding: 0; }
.nav-card.dropdown-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== 内联下拉 ===== */
.inline-links { position: fixed; z-index: 85; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06); opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; max-height: 60vh; overflow-y: auto; overflow-x: hidden; }
.inline-links.show { opacity: 1; transform: none; }
[data-theme="dark"] .inline-links { box-shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3); }
.inline-link { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.4; min-height: 40px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.inline-link:hover, .inline-link:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.inline-link-text { flex: 1; min-width: 0; overflow: hidden; display: flex; }
.inline-link-inner { white-space: nowrap; display: inline-block; }
.inline-link-badge { flex-shrink: 0; font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--dot); color: #fff; line-height: 1.4; }
@media (max-width: 640px) { .inline-links { padding: 5px; } .inline-link { padding: 9px 12px; min-height: 42px; } }

/* ===== 提示浮层 ===== */
.nav-tip { position: fixed; z-index: 80; max-width: min(280px, calc(100vw - 24px)); padding: 8px 11px; border-radius: 9px; background: #3A3733; color: #F5F4F1; font-size: 12px; line-height: 1.65; box-shadow: 0 6px 20px rgba(40, 34, 28, .2); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility .16s; pointer-events: none; word-break: break-word; }
.nav-tip.show { opacity: 1; visibility: visible; transform: none; }
[data-theme="dark"] .nav-tip { background: #D6D2CA; color: #191918; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
@media (hover: none) { .nav-tip { pointer-events: auto; cursor: pointer; font-size: 13px; padding: 10px 13px; } }

/* ===== 骨架屏 ===== */
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; border-radius: 8px; }
.skeleton-group-title { width: 120px; height: 12px; margin-bottom: 11px; }
.skeleton-card { height: 62px; border-radius: 12px; }
.skeleton-notice { height: 56px; border-radius: 10px; margin-bottom: 6px; }

/* ===== 右侧栏 ===== */
.side-col { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar { display: grid; place-items: center; border-radius: 14px; background: linear-gradient(140deg, var(--accent), var(--accent-soft)); color: #fff; font-size: 18px; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 0, 0, .1); }
.profile-meta { min-width: 0; }
.profile-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-bio { margin-top: 1px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.account-list { display: flex; flex-direction: column; gap: 2px; }
.account-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; text-decoration: none; color: inherit; transition: background-color .16s ease; }
.account-item:hover { background: var(--surface-2); }

/* 账号图标 */
.acc-ico { display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); border: none; box-shadow: none; width: 24px; height: 24px; flex-shrink: 0; overflow: hidden; }
.acc-ico img { position: static !important; width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 0; border-radius: 0; }

/* 夜间模式图标亮底适配 */
[data-theme="dark"] .nav-ico.nav-ico-img,
[data-theme="dark"] .acc-ico {
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.acc-label { font-size: 12.5px; color: var(--text-dim); flex-shrink: 0; }
.acc-value { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-block { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.qr-code { width: 76px; height: 76px; display: block; flex-shrink: 0; padding: 5px; border-radius: 10px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(60, 50, 40, .06); text-decoration: none; }
.qr-code img, .qr-code svg { display: block; width: 100%; height: 100%; }
.qr-code img { object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.qr-text { min-width: 0; }
.qr-title { font-size: 13px; font-weight: 600; }
.qr-desc { margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--text-dim); }

/* ===== 公告列表 ===== */
.panel-head { display: flex; align-items: center; gap: 8px; padding: 1px 2px 11px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.panel-title { margin: 0; font-size: 13.5px; font-weight: 600; flex-shrink: 0; }
.notice-search { flex: 1 1 auto; min-width: 0; margin-left: auto; }
.notice-search input { width: 100%; height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 12px; outline: none; transition: all .2s; }
.notice-search input::placeholder { color: var(--text-mute); }
.notice-search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.notice-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.notice-tab { padding: 3px 9px; border: none; border-radius: 6px; background: transparent; color: var(--text-mute); font-family: inherit; font-size: 11.5px; cursor: pointer; transition: all .16s; }
.notice-tab:hover { background: var(--surface-2); color: var(--text-dim); }
.notice-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice { display: flex; gap: 2px; padding: 10px 8px; border-radius: 10px; cursor: pointer; transition: background-color .18s ease; }
.notice + .notice { margin-top: 2px; }
.notice:hover, .notice:focus-visible { background: var(--surface-2); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.notice-body { min-width: 0; flex: 1; }
.notice-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
.tag-yellow { background: #FEF3C7; color: #92400E; }
.tag-green { background: #DCFCE7; color: #166534; }
.tag-purple { background: #F3E8FF; color: #6B21A8; }
.tag-blue { background: #DBEAFE; color: #1E40AF; }
.tag-indigo { background: #E0E7FF; color: #3730A3; }
.tag-pink { background: #FCE7F3; color: #9D174D; }
.tag-orange { background: #FFEDD5; color: #9A3412; }
.tag-red { background: #FEE2E2; color: #991B1B; }
.tag-cyan { background: #CCFBF1; color: #115E59; }
.tag-brown { background: #F5F5F4; color: #44403C; }
[data-theme="dark"] .tag-yellow { background: #42321A; color: #FCD34D; }
[data-theme="dark"] .tag-green { background: #143924; color: #86EFAC; }
[data-theme="dark"] .tag-purple { background: #331B4D; color: #D8B4FE; }
[data-theme="dark"] .tag-blue { background: #1E293B; color: #93C5FD; }
[data-theme="dark"] .tag-indigo { background: #1F1F3D; color: #A5B4FC; }
[data-theme="dark"] .tag-pink { background: #3B1D2B; color: #F9A8D4; }
[data-theme="dark"] .tag-orange { background: #3D2312; color: #FDBA74; }
[data-theme="dark"] .tag-red { background: #3B1E1E; color: #FCA5A5; }
[data-theme="dark"] .tag-cyan { background: #113433; color: #5EEAD4; }
[data-theme="dark"] .tag-brown { background: #292524; color: #D6D3D1; }
.pin { font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: var(--dot); color: #fff; line-height: 1.6; }
.notice h3 { margin: 0 0 1px; font-size: 13px; font-weight: 600; line-height: 1.55; color: var(--text); }
.notice p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { padding: 26px 12px; text-align: center; font-size: 12.5px; color: var(--text-mute); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-lg { padding: 60px 20px; font-size: 13.5px; }
.notice-list:empty { flex: 0 !important; padding: 0 !important; }
.side-col .panel > .empty { flex: 1; }

/* ===== 弹窗基础 ===== */
.modal-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(30, 28, 24, .38); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: all .22s; }
.modal-mask.show { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 560px; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(40, 34, 28, .18); transform: translateY(10px) scale(.98); transition: transform .22s; }
.modal-mask.show .modal { transform: none; }

/* 修改：标题栏与底部按钮一样的边框分割线，标题与 X 同行 */
.modal-head { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-close { margin-left: auto; width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent; color: var(--text-mute); font-size: 20px; cursor: pointer; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-title { margin: 0; padding: 0; flex: 1; font-size: 16.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 24px; font-size: 13.5px; line-height: 1.75; color: var(--text-dim); word-break: break-word; }
.modal-body.plain { white-space: pre-line; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 10px; flex-shrink: 0; border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-btn { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 13px; text-decoration: none; transition: all .18s; }
.modal-btn:hover { opacity: .88; transform: translateY(-1px); }
.modal-btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border-strong); }
.modal-btn.ghost:hover { background: var(--accent-soft); border-color: transparent; }

/* ===== 公告内容排版 ===== */
.section + .section { margin-top: 18px; }
.section-title { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.section-title::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.section-text { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text-dim); }
.section-text a, .num-list a, .kv-value a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); }
.section-text a:hover, .num-list a:hover, .kv-value a:hover { border-bottom-style: solid; }
.section-text code, .num-list code, .kv-value code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--text); font-family: monospace; font-size: 12px; }
.kv-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.kv-item { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: baseline; font-size: 13px; }
.kv-label { color: var(--text-mute); font-weight: 500; flex-shrink: 0; font-family: monospace; font-size: 12px; }
.kv-value { color: var(--text); min-width: 0; word-break: break-word; }
.kv-note { display: block; margin-top: 1px; font-size: 12px; color: var(--text-mute); }
.num-list { margin: 0; padding: 0; list-style: none; counter-reset: item; display: flex; flex-direction: column; gap: 8px; }
.num-list li { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.7; color: var(--text-dim); counter-increment: item; }
.num-list li::before { content: counter(item); position: absolute; left: 0; top: 2px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 600; line-height: 1; }
.section-figure { margin: 0; }
.section-figure a { display: block; text-decoration: none; }
.section-figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in; transition: opacity .18s ease; }
.section-figure a:hover img { opacity: .92; }
.section-figure figcaption { margin-top: 7px; font-size: 12px; color: var(--text-mute); text-align: center; }
.section-img-fail { padding: 26px 12px; text-align: center; font-size: 12px; color: var(--text-mute); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; }
.modal-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* ===== 图片灯箱 ===== */
.lightbox { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 40px 24px 76px; background: rgba(15, 14, 12, .88); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: all .2s; cursor: default; overflow: hidden; touch-action: none; }
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 116px); object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); cursor: zoom-in; user-select: none; background: #fff; transform-origin: center center; will-change: transform; touch-action: none; }
.lightbox-img.dragging { cursor: grabbing; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 24px; cursor: pointer; }
.lightbox-close:hover { background: rgba(255, 255, 255, .18); }
.lightbox-bar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; font-size: 12px; color: rgba(255, 255, 255, .55); background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); }
.lightbox-open, .lightbox-zoom { padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.lightbox-open:hover, .lightbox-zoom:hover { background: rgba(255, 255, 255, .22); }

/* ===== 设置面板 ===== */
.settings-mask { position: fixed; inset: 0; z-index: 110; background: rgba(30, 28, 24, .32); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: all .22s; }
.settings-mask.show { opacity: 1; visibility: visible; }
.settings-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 88vw; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 32px rgba(40, 34, 28, .12); transform: translateX(100%); transition: transform .26s ease; }
.settings-mask.show .settings-panel { transform: none; }
.settings-head { display: flex; align-items: center; gap: 8px; padding: 18px 20px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.settings-title { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.settings-close { width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent; color: var(--text-mute); font-size: 20px; cursor: pointer; }
.settings-close:hover { background: var(--surface-2); color: var(--text); }
.settings-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 16px; }
.setting-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.setting-item:last-child { border-bottom: none; }
.setting-label { flex: 1 1 auto; min-width: 0; }
.setting-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.setting-desc { margin-top: 2px; font-size: 12px; color: var(--text-mute); }
.theme-colors { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; justify-content: flex-end; max-width: 140px; }
.color-dot { width: 26px; height: 26px; padding: 0; border: 2px solid var(--border); border-radius: 50%; background: var(--dot-bg, var(--accent)); cursor: pointer; transition: all .18s; }
.color-dot:hover { border-color: var(--border-strong); }
.color-dot.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.switch { flex-shrink: 0; position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background-color .18s ease; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transition: transform .18s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.setting-select { flex-shrink: 0; width: 130px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 12.5px; outline: none; cursor: pointer; }
.setting-select:focus { border-color: var(--accent); background: var(--surface); }
.segmented { flex-shrink: 0; display: inline-flex; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.segmented button { padding: 3px 10px; border: none; border-radius: 6px; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 12px; cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(60, 50, 40, .06); }
.settings-foot { flex-shrink: 0; padding: 12px 20px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.settings-actions { display: flex; gap: 8px; }
.settings-btn, .settings-reset { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-family: inherit; font-size: 13px; cursor: pointer; }
.settings-btn:hover, .settings-reset:hover { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.settings-reset { width: 100%; }

/* ===== 杂项 ===== */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(8px); z-index: 200; padding: 10px 18px; border-radius: 10px; background: #3A3733; color: #F5F4F1; font-size: 13px; box-shadow: 0 8px 24px rgba(40, 34, 28, .25); opacity: 0; visibility: hidden; transition: all .2s; pointer-events: none; }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast.error { background: #C0553D; }
[data-theme="dark"] .toast { background: #D6D2CA; color: #191918; }
.back-top { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .22s; }
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.friends-section { border-top: 1px solid var(--border); background: var(--surface); }
.friends-inner { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.friends-label { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-mute); }
.friends-grid { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.friend-card { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; color: var(--text-dim); font-size: 12px; max-width: 200px; transition: all .18s; }
.friend-card:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.friend-ico { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 600; line-height: 1; }
.friend-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 18px 24px 32px; font-size: 12px; color: var(--text-mute); text-align: center; }
.cat-block { display: flex; flex-direction: column; }
.sub-cats-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.28s ease, opacity 0.28s ease; overflow: hidden; }
.sub-cats-wrap.show { grid-template-rows: 1fr; opacity: 1; }
.sub-cats-inner { min-height: 0; display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px; }
.sub-tab { padding: 6px 10px 6px 26px; border: none; border-radius: 6px; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 12.5px; text-align: left; cursor: pointer; transition: all .15s; }
.sub-tab:hover { color: var(--text); background: var(--surface-2); }
.sub-tab.active { color: var(--accent); font-weight: 600; }

/* ===== 响应式：≤1024 ===== */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 20px; padding: 22px 16px 40px; }
  .cat-col { position: static; padding: 0; background: transparent; border: none; box-shadow: none; }
  .cat-title, .cat-foot { display: none; }
  .cat-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 1px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-tab { width: auto; flex-shrink: 0; padding: 7px 12px 9px; border-radius: 0; background: transparent; text-align: center; }
  .cat-tab::before { display: none; }
  .cat-tab:hover { background: transparent; color: var(--text); }
  .cat-tab.active { background: transparent; color: var(--accent); }
  .cat-tab.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
  .cat-tab-count { font-size: 10.5px; }
  .side-col { position: static; }
  .sub-cats-wrap { display: none !important; }
  .cat-block { display: contents; }
}

/* ===== 响应式：≥1025 ===== */
@media (min-width: 1025px) {
  .group-nav { display: none !important; }
  .notice-bar { position: sticky; top: 60px; z-index: 49; }
  .nav-search { position: sticky; top: calc(60px + var(--notice-bar-h, 0px)) !important; z-index: 30; background: var(--bg); padding: 16px 0 16px; margin-top: -16px; }
  .cat-col { position: sticky; top: calc(84px + var(--notice-bar-h, 0px)); max-height: calc(100vh - 110px - var(--notice-bar-h, 0px)); overflow-y: auto; scrollbar-width: none; }
  .cat-col::-webkit-scrollbar { display: none; }
  .side-col { position: sticky; top: calc(84px + var(--notice-bar-h, 0px)); height: calc(100vh - 100px - var(--notice-bar-h, 0px)); display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
  .side-col > .panel:first-child { flex-shrink: 0; }
  .side-col > .panel:last-child { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .panel-head, .notice-tabs { flex-shrink: 0; }
  .notice-list { flex: 1; overflow-y: auto; min-height: 0; padding: 4px 4px 16px 0; }
  .notice-list::-webkit-scrollbar { width: 6px; }
  .notice-list::-webkit-scrollbar-thumb { background: var(--border-strong); border: none; border-radius: 6px; }
  .notice-list::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
  .nav-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
  .nav-card { padding: 10px 12px; }
}

/* ===== 响应式：≤640 ===== */
@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; gap: 8px; }
  .brand { gap: 9px; font-size: 15.5px; }
  .brand-mark { width: 26px; height: 26px; }
  .notice-bar-inner { padding: 7px 14px; }
  .nav-search { top: 60px; padding: 6px 0 10px; margin-top: 0; }
  .nav-search .search-wrap input { height: 36px; font-size: 13px; padding: 0 12px 0 36px; }
  .nav-search .search-icon { left: 12px; width: 14px; height: 14px; }
  .cat-tab { padding: 6px 8px 8px 10px; font-size: 13px; }
  .nav-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
  .nav-card { padding: 11px 12px; }
  .nav-ico { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
  
  .modal-mask { padding: 14px; }
  .modal { max-height: 88vh; }
  /* 修改：手机端弹窗头部适配 */
  .modal-head { padding: 14px 18px; }
  .modal-title { padding: 0; }
  
  .modal-body { padding: 12px 18px 12px; }
  .modal-actions { padding: 12px 18px 16px; }
  .kv-item { grid-template-columns: 68px 1fr; gap: 8px; }
  .back-top { right: 16px; bottom: 16px; }
  .lightbox { padding: 20px 12px 66px; }
  .lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 20px; }
  .lightbox-hint { display: none; }
  .friends-inner { padding: 10px 14px; gap: 8px; }
  .settings-panel { width: 100vw; max-width: 100vw; }
  .settings-head { padding: 14px 16px 12px; }
  .settings-body { padding: 2px 16px 14px; }
  .settings-foot { padding: 10px 16px 14px; }
  .inline-link-inner { white-space: normal; word-break: break-all; line-height: 1.4; }
  .inline-link { align-items: flex-start; }
  .inline-link-badge { margin-top: 2px; }
}

/* ===== 响应式：≤400 ===== */
@media (max-width: 400px) {
  .cat-tab-count { display: none; }
}

/* ===== 内容淡入 & 空状态 ===== */
@keyframes fadeInContent { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fade-in-content { animation: fadeInContent .4s cubic-bezier(.25,.46,.45,.94) forwards; }
.external-search { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; }
.external-search p { margin: 0; font-size: 13px; color: var(--text-mute); }
.ext-search-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ext-btn { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-dim); font-size: 12.5px; text-decoration: none; cursor: pointer; transition: all .18s ease; }
.ext-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.setting-input { width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 12.5px; outline: none; transition: all .2s; }
.setting-input:focus { border-color: var(--accent); background: var(--surface); }

/* ===== 编辑器 ===== */
body.edit-mode .nav-card { border-color: var(--accent); border-style: dashed; padding-right: 66px; padding-bottom: 36px; }
body.edit-mode .nav-card:hover { transform: none; box-shadow: none; }
.edit-actions { position: absolute; right: 8px; top: 8px; display: none; flex-wrap: wrap; justify-content: flex-end; gap: 4px; z-index: 10; width: 48px; }
body.edit-mode .edit-actions { display: flex; }
.edit-btn { width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-dim); font-size: 12px; display: grid; place-items: center; cursor: pointer; }
.edit-btn:hover { background: var(--accent-soft); color: var(--accent); }
.edit-btn.del:hover { background: #C0553D; color: #fff; border-color: #C0553D; }
.floating-save { position: fixed; bottom: 24px; right: 24px; z-index: 90; padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); cursor: pointer; display: none; align-items: center; gap: 8px; }
body.edit-mode .floating-save { display: flex; }
.floating-save:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.add-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px; margin-top: 10px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s ease; }
.add-btn:hover { background: var(--surface); border-style: solid; transform: translateY(-1px); }
.group-actions { display: none; margin-left: auto; gap: 6px; }
body.edit-mode .group-actions { display: flex; }
.cat-actions { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; z-index: 5; }
.cat-actions .edit-btn { width: 18px; height: 18px; font-size: 10px; }
body.edit-mode .cat-tab .cat-actions { display: flex; }
body.edit-mode .cat-tab .cat-tab-count { display: none; }

/* ===== 编辑弹窗 ===== */
.edit-modal-title { margin: 0; padding: 0; }
.edit-modal-body { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.edit-save-btn { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.edit-links-section { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 4px; }
.edit-links-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.edit-links-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.edit-links-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.edit-link-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 6px; align-items: center; }
.edit-link-text, .edit-link-url { height: 30px !important; font-size: 12.5px !important; }
.edit-link-del { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-mute); font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: all .15s ease; }
.edit-link-del:hover { border-color: #C0553D; background: #C0553D; color: #fff; }
.edit-links-add { width: 100%; padding: 7px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-family: inherit; font-size: 12.5px; cursor: pointer; transition: all .15s ease; }
.edit-links-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
@media (max-width: 640px) { .edit-link-row { grid-template-columns: 1fr 1.4fr auto; } }

/* ===== 通用弹窗及 GitHub 设置 ===== */
.universal-modal { max-width: 360px; }
.universal-message { margin: 0 0 12px; line-height: 1.6; color: var(--text); font-size: 14px; }
.setting-item-github { flex-direction: column; align-items: stretch; gap: 8px; }
.setting-switch-wrap { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; width: 100%; }
.setting-switch-label { font-size: 13px; color: var(--text); font-weight: 500; }