:root {
  --primary: #05c3dd;
  --primary-dark: #0499ad;
  --primary-soft: rgba(5, 195, 221, 0.14);
  --bg: #f4fafb;
  --surface: #fff;
  --ink: #0a1f24;
  --muted: #5a7a82;
  --line: #dceef1;
  --soft: #eaf8fa;
  --danger: #f6465d;
  --success: #00c076;
  --gold: #c8923e;
  --celebrity: #f6c453;
  --radius: 18px;
  --shadow: 0 16px 48px rgba(5, 80, 92, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.community-app { min-height: 100vh; }
.community-topbar {
  position: sticky; top: 0; z-index: 40; height: 56px; overflow: visible;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.04);
}
.community-topbar-inner {
  width: 100%; max-width: none; height: 100%; margin: 0; padding: 0 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.community-brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: url("../icons/icon.svg") center / 28px 28px no-repeat, var(--primary);
  flex-shrink: 0;
}
.brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.top-search {
  position: relative; flex: 1; min-width: 0; max-width: 320px;
  display: flex; align-items: center;
}
.top-search-icon {
  position: absolute; left: 12px; width: 16px; height: 16px; color: #65676b; pointer-events: none;
}
.top-search input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; border: 0; border-radius: 20px;
  background: #f0f2f5; color: var(--ink); outline: none;
}
.top-search input::placeholder { color: #65676b; }
.top-search-results {
  position: absolute; left: 0; right: auto; top: calc(100% + 8px); z-index: 50;
  width: min(360px, 80vw); max-height: 420px; overflow: auto;
  padding: 8px; border-radius: 12px; background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
}
.search-label { padding: 8px 10px 4px; font-size: 13px; font-weight: 800; color: var(--ink); }
.search-empty { padding: 16px; color: var(--muted); font-size: 13px; }
.search-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: inherit;
}
.search-row:hover { background: #f0f2f5; }
.search-row span { min-width: 0; display: grid; }
.search-row em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-avatar, .search-avatar.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--soft); font-size: 14px;
}
.desktop-nav {
  display: flex; align-items: stretch; height: 56px; justify-self: center;
}
.desktop-nav a {
  width: 112px; height: 100%; display: grid; place-items: center;
  color: #65676b; border-bottom: 3px solid transparent; border-radius: 0;
  padding: 0; font-size: 0;
}
.desktop-nav a svg { width: 26px; height: 26px; }
.desktop-nav a:hover { background: #f0f2f5; border-radius: 8px; height: 48px; align-self: center; }
.desktop-nav a.is-active {
  color: var(--primary); border-bottom-color: var(--primary); background: transparent;
}
.desktop-nav a.is-active:hover { height: 100%; border-radius: 0; background: transparent; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.circle-button, .icon-button, .avatar-button, .language-button {
  border: 0; background: #e4e6eb; color: #050505; cursor: pointer; display: grid; place-items: center;
}
.circle-button, .icon-button { width: 40px; height: 40px; border-radius: 50%; }
.circle-button svg, .icon-button svg { width: 20px; height: 20px; }
.circle-button:hover, .icon-button:hover { background: #d8dadf; }
.avatar-button {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px;
  padding: 0; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  font-weight: 800; line-height: 0; clip-path: circle(50%);
}
.avatar-button img {
  width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%;
}
.language-button { height: 36px; min-width: 56px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 800; }
.lang-button { padding: 0; overflow: hidden; }
.lang-button-flag {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
#langModal .modal-card { width: min(400px, 100%); }
.lang-list { display: grid; gap: 8px; margin-top: 6px; }
.lang-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.lang-option img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.lang-option > span { font-weight: 700; }
.lang-current { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--primary); font-style: normal; }
.lang-option.is-active { border-color: var(--primary); background: #e8fbfe; }
.lang-option:hover { background: #f0f2f5; }
.lang-option.is-active:hover { background: #e8fbfe; }
.nav-badge {
  position: absolute; top: -4px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 9px; color: #fff; background: #e41e3f; font-size: 10px; font-weight: 800;
}
.tab-icon-wrap { position: relative; display: inline-grid; place-items: center; }
.notification-wrap { position: relative; }
.notification-panel {
  position: absolute; z-index: 120; top: calc(100% + 10px); right: 0;
  width: min(360px, calc(100vw - 24px)); max-height: min(480px, calc(100vh - 80px));
  overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff;
  box-shadow: 0 18px 40px rgba(5, 80, 92, .16);
}
.notification-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.notification-panel-head button {
  padding: 0; border: 0; background: transparent; color: var(--primary-dark);
  cursor: pointer; font-size: 12px; font-weight: 800;
}
.notification-list { max-height: 410px; overflow-y: auto; }
.notification-item {
  width: 100%; display: grid; grid-template-columns: 8px 1fr; gap: 8px;
  padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); background: #fff; text-align: left; cursor: pointer; font: inherit;
}
.notification-item:hover, .notification-item.is-unread { background: #f4fcfe; }
.notification-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-dot { background: var(--primary); }
.notification-item strong, .notification-item small, .notification-item time { display: block; }
.notification-item strong { font-size: 13px; }
.notification-item small { margin-top: 4px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.notification-item time { margin-top: 5px; color: #8aa4aa; font-size: 11px; }
.notification-empty { padding: 32px 14px; color: var(--muted); text-align: center; font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.community-main {
  width: 100%; max-width: none;
  min-height: calc(100vh - 56px); margin: 0;
  padding: 16px 12px 72px;
}
.mobile-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 64px;
  display: none; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96);
}
.mobile-tabs a, .mobile-tabs button {
  border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700;
}
.mobile-tabs a svg, .mobile-tabs button svg { width: 22px; height: 22px; }
.mobile-tabs a.is-active, .mobile-tabs button.is-active { color: var(--primary-dark); }
.pull-refresh {
  --pull-y: 0px;
  position: fixed; z-index: 35; top: 48px; left: 50%;
  display: none; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px;
  border: 1px solid rgba(5, 195, 221, .24); border-radius: 999px;
  background: rgba(255, 255, 255, .96); color: var(--primary-dark);
  box-shadow: 0 8px 22px rgba(6, 42, 61, .14); font-size: 12px; font-weight: 800;
  opacity: 0; transform: translate(-50%, -48px); transition: opacity .16s, transform .16s;
  pointer-events: none;
}
.pull-refresh svg { width: 17px; height: 17px; }
.pull-refresh.is-pulling, .pull-refresh.is-refreshing {
  opacity: 1; transform: translate(-50%, calc(var(--pull-y) - 48px));
}
.pull-refresh.is-ready { color: #087b8c; }
.pull-refresh.is-refreshing svg { animation: pull-spin .8s linear infinite; }
@keyframes pull-spin { to { transform: rotate(360deg); } }
.back-to-top {
  position: fixed; z-index: 38; right: 16px; bottom: 78px;
  width: 44px; height: 44px; padding: 0; border: 1px solid rgba(5, 195, 221, .3);
  border-radius: 50%; background: rgba(255, 255, 255, .96); color: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(6, 42, 61, .2); cursor: pointer;
  display: none; place-items: center; opacity: 0; transform: translateY(12px) scale(.9);
  pointer-events: none; transition: opacity .18s, transform .18s;
}
.back-to-top svg { width: 23px; height: 23px; stroke-width: 2.2; }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.mobile-more { position: fixed; inset: 0; z-index: 160; }
body.mobile-more-open { overflow: hidden; }
.mobile-more-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2, 23, 33, .48); }
.mobile-more-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: min(82dvh, 720px);
  overflow: hidden; border-radius: 22px 22px 0 0; background: #fff;
  box-shadow: 0 -18px 48px rgba(6, 42, 61, .2);
}
.mobile-more-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line);
}
.mobile-more-head strong { color: var(--ink); font-size: 18px; }
.mobile-more-head button {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #eef4f5; color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1;
}
.mobile-more-content { max-height: calc(min(82dvh, 720px) - 58px); overflow-y: auto; padding: 10px 12px 28px; }
.mobile-more-content .feed-left { display: block; width: 100%; padding: 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.03em; }
.muted { color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 700;
}
.button.primary { border-color: transparent; background: linear-gradient(135deg, #17e0e0, var(--primary)); color: #04252b; }
.button.full { width: 100%; }
.button.sm { padding: 10px 14px; font-size: 13px; min-height: auto; }
.button.danger { color: var(--danger); border-color: rgba(246,70,93,.25); }
.auth-google { margin-top: 10px; gap: 10px; font-weight: 700; }
.auth-google svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-google:hover { border-color: var(--primary); }
.auth-code-row { display: flex; gap: 8px; align-items: stretch; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .button { flex-shrink: 0; align-self: stretch; }
.auth-switch-line { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch {
  border: 0; background: none; padding: 0; margin: 0;
  color: var(--primary-dark); font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.auth-switch:hover { color: var(--primary); }
#authStatus { margin-top: 10px; min-height: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.field .cm-select { width: 100%; min-width: 0; }
.field textarea { min-height: 96px; resize: vertical; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  width: 100%;
}
.feed-left {
  align-self: start;
  justify-self: start;
  position: sticky;
  top: 72px;
  width: min(100%, 280px);
}
.home-center {
  width: 100%;
  max-width: 680px;
  min-width: 0;
  justify-self: center;
  grid-column: 2;
}
.feed-right {
  align-self: start;
  justify-self: end;
  position: sticky;
  top: 72px;
  width: min(100%, 300px);
  grid-column: 3;
}
.feed-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: #65676b; font-weight: 700; font-size: 15px;
  text-align: left; cursor: pointer;
}
.side-link:hover { background: var(--primary-soft); color: var(--primary); }
.side-link.is-active { background: var(--primary-soft); color: var(--primary); }
.side-shortcuts {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.side-avatar, .side-avatar.avatar-fallback, .composer-avatar, .composer-avatar.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--soft); font-size: 14px; flex-shrink: 0;
}
.side-ico {
  width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; color: inherit;
}
.side-ico svg { width: 24px; height: 24px; }
.composer-top { display: flex; align-items: flex-start; gap: 10px; }
.composer-top textarea {
  flex: 1; min-height: 40px; max-height: 140px; padding: 10px 14px;
  border: 0; border-radius: 20px; background: #f0f2f5; resize: none;
}
.composer.composer-idle { padding: 10px 16px; display: block; }
.composer-idle-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.composer-prompt {
  flex: 1; min-width: 0; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 20px; background: #f0f2f5; color: #65676b;
  text-align: left; cursor: pointer; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-prompt:hover { background: #e4e6eb; }
.composer-quick { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.composer-quick-btn {
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.composer-quick-btn:hover { background: #f0f2f5; }
.composer-quick-btn svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.composer-quick-btn.is-video { color: #f02849; }
.composer-quick-btn.is-photo { color: #45bd62; }
.composer-quick-btn.is-emoji { color: #f7b928; }
.composer-quick-btn svg [data-fill="white"] { fill: #fff; }
.composer-quick-btn svg [data-stroke="white"] {
  fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round;
}

.create-post-card {
  width: min(500px, 96vw); max-height: min(92vh, 760px); padding: 0 0 16px;
  overflow: visible; display: flex; flex-direction: column; border-radius: 8px;
}
.create-post-user {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px 0;
}
.create-post-user .composer-avatar, .create-post-user .composer-avatar.avatar-fallback {
  width: 40px; height: 40px; border-radius: 50%;
}
.create-post-user-meta { min-width: 0; display: grid; gap: 4px; }
.create-post-user-meta .cm-select { min-width: 120px; }
.create-post-user-meta .cm-select-trigger {
  min-height: 28px; padding: 0 8px; border-radius: 8px; background: #e4e6eb;
  font-size: 12px; font-weight: 700;
}
.create-post-editor { padding: 8px 16px 0; }
.create-post-textwrap { position: relative; }
.create-post-editor textarea {
  width: 100%; min-height: 148px; padding: 8px 0;
  border: 0; background: transparent; resize: none; outline: none;
  font-size: 22px; line-height: 1.35;
}
.create-post-preview {
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin-top: 8px;
}
.create-post-thumb { position: relative; }
.create-post-thumb img, .create-post-thumb video,
.post-images video {
  width: 100%; border-radius: 12px; object-fit: cover; background: #000;
}
.create-post-thumb img, .create-post-thumb video { aspect-ratio: 1; max-height: 160px; }
.post-images video { max-height: 320px; }
.create-post-thumb button {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; cursor: pointer;
}
.create-post-add {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 12px 16px; padding: 8px 10px 8px 14px;
  border: 1px solid #e4e6eb; border-radius: 10px;
}
.create-post-add span { font-size: 14px; font-weight: 700; }
.create-post-add-btns { display: flex; gap: 2px; }
#createPostSubmit { width: calc(100% - 32px); margin: 0 16px; }
#createPostSubmit:disabled { opacity: .45; cursor: default; filter: grayscale(.25); }
.friends-list { display: grid; gap: 8px; }
.friend-card {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.friend-card .avatar, .friend-card .avatar-fallback { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--soft); }
.composer, .post-card, .panel-card, .thread-card, .group-card, .profile-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.composer, .post-card, .panel-card { padding: 12px 16px; margin-bottom: 12px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.composer-actions-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guest-composer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.guest-composer-text { margin: 0; flex: 1; min-width: 200px; }
.comment-guest-hint { margin: 10px 0 0; font-size: 13px; }
.link-button { background: none; border: none; padding: 0; color: var(--primary-dark); font: inherit; cursor: pointer; text-decoration: underline; }

.cm-select { position: relative; min-width: 148px; z-index: 1; }
.cm-select.is-open { z-index: 80; }
.cm-select-trigger {
  width: 100%; justify-content: space-between; padding-right: 12px;
  background: #fff; color: var(--ink);
}
.cm-select-label, .cm-select-option {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.cm-select-label { flex: 1; text-align: left; color: var(--ink); font-weight: 700; }
.cm-select-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-weight: inherit; }
.cm-flag {
  width: 20px; height: 15px; object-fit: cover; border-radius: 2px; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08); background: #e4e6eb;
}
.cm-flag.is-empty { display: inline-block; }
.cm-select-chevron {
  width: 16px; height: 16px; margin-left: 8px; flex-shrink: 0;
  stroke: var(--muted); transition: transform .16s ease;
}
.cm-select.is-open .cm-select-chevron { transform: rotate(180deg); }
.cm-select.is-disabled { opacity: .55; pointer-events: none; }
.cm-select.is-disabled .cm-select-trigger { cursor: not-allowed; }
.cm-select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); bottom: auto; z-index: 160;
  max-height: 280px; overflow-x: hidden; overflow-y: auto;
  padding: 6px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: var(--shadow);
}
.cm-select-option {
  width: 100%; min-height: 40px;
  padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font-weight: 600; text-align: left; cursor: pointer;
}
.cm-select-option:hover { background: var(--soft); }
.cm-select-option.is-active {
  color: var(--primary-dark); background: var(--primary-soft); font-weight: 800;
}

/* 隐藏仍存在的原生 select，统一走自定义组件 */
.field select,
.composer select {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7a82' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  padding-right: 38px;
}
.post-head { display: flex; gap: 12px; align-items: flex-start; }
.post-head .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--soft); }
.avatar-fallback {
  display: inline-grid; place-items: center; flex-shrink: 0;
  color: var(--primary-dark); background: var(--primary-soft); font-weight: 800;
}
.post-head .avatar-fallback { width: 44px; height: 44px; border-radius: 50%; font-size: 16px; }
.profile-link { display: inline-flex; flex-shrink: 0; color: inherit; }
.post-user-name { color: inherit; font: inherit; }
.post-user-name:hover { text-decoration: underline; }
.post-meta { flex: 1; min-width: 0; }
.post-meta strong, .thread-title strong, .profile-name strong { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.follow-sep { color: var(--muted); font-weight: 700; margin: 0 2px; }
.follow-text {
  border: 0; padding: 0; background: none; cursor: pointer;
  color: var(--primary-dark); font-size: 13px; font-weight: 800;
}
.follow-text:hover { text-decoration: underline; }
.follow-text.is-on { color: var(--muted); font-weight: 700; }
.post-body { margin: 12px 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }
.post-images { display: grid; gap: 6px; }
.post-images.is-single { grid-template-columns: 1fr; }
.post-images.is-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-images img, .post-images video {
  width: 100%; border-radius: 12px; cursor: pointer; background: #111;
}
.post-images.is-single img, .post-images.is-single video {
  max-height: 320px; object-fit: contain; aspect-ratio: auto;
}
.post-images.is-multi img, .post-images.is-multi video {
  aspect-ratio: 1; max-height: 200px; object-fit: cover;
}
.post-actions {
  display: flex; margin-top: 8px; padding-top: 4px;
  border-top: 1px solid var(--line);
}
.post-action {
  flex: 1; min-width: 0; min-height: 40px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 6px; background: transparent;
  color: #65676b; font-size: 15px; font-weight: 600; cursor: pointer;
}
.post-action svg { width: 20px; height: 20px; flex-shrink: 0; }
.post-action-count {
  min-width: 1ch; font-variant-numeric: tabular-nums; font-weight: 800; color: inherit;
}
.post-action:hover { background: #f2f3f5; }
.post-action.is-on { color: var(--primary-dark); }
.comment-box { margin-top: 4px; padding: 4px 0 8px; }
.comment-item { display: flex; gap: 10px; margin-top: 10px; }
.comment-item.is-reply { margin-left: 42px; }
.comment-item img, .comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--soft);
}
.comment-item .avatar-fallback { width: 32px; height: 32px; font-size: 12px; }
.comment-main { min-width: 0; flex: 1; }
.comment-reply-to { margin-top: 2px; font-size: 12px; color: #65676b; }
.comment-reply-btn {
  margin-top: 4px; padding: 0; border: 0; background: transparent;
  color: #65676b; font-size: 12px; font-weight: 600; cursor: pointer;
}
.comment-reply-btn:hover { color: var(--primary-dark); }
.comment-empty {
  display: grid; place-items: center; gap: 8px;
  padding: 48px 16px 32px; color: #65676b; text-align: center;
}
.comment-empty svg { width: 48px; height: 48px; color: #bcc0c4; }
.comment-empty strong { font-size: 16px; color: #050505; }
.comment-empty span { font-size: 14px; }

/* 链接预览（Open Graph）：帖子、评论、私聊、群聊共用一套卡片 */
.body-link { color: var(--primary-dark); overflow-wrap: anywhere; }
.body-link:hover { text-decoration: underline; }
.link-card {
  position: relative; display: block; margin: 10px 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px;
  background: #f7fbfc; color: inherit; text-decoration: none;
}
a.link-card:hover { background: var(--soft); border-color: var(--primary-soft); }
.link-card-media { display: block; background: var(--soft); }
.link-card-media img {
  display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover;
}
.link-card-copy { display: grid; gap: 3px; padding: 10px 12px; min-width: 0; }
.link-card-domain {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.link-card-title {
  font-size: 15px; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-card-desc {
  font-size: 13px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-card-remove {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.link-card-remove:hover { background: rgba(0,0,0,.78); }
.link-card-slot { margin: 0 16px 12px; }
.link-card-slot .link-card { margin: 0; }
.post-detail-composer-main .link-card-slot { margin: 0 0 8px; }
.chat-link-slot { margin: 0 12px 8px; }
.chat-link-slot .link-card { max-width: 320px; }
.comment-main .link-card, .chat-bubble .link-card { max-width: 320px; }
.chat-bubble .link-card { background: rgba(255,255,255,.86); }
.chat-bubble.mine .link-card { border-color: rgba(255,255,255,.5); }

.modal.post-modal { padding: 24px 12px; }
.post-detail-card {
  width: min(700px, 96vw); max-height: min(92vh, 880px); min-height: min(72vh, 640px);
  padding: 0; overflow: hidden; display: flex; flex-direction: column; border-radius: 8px;
}
.post-detail-head {
  position: relative; flex-shrink: 0; height: 60px;
  display: grid; place-items: center; border-bottom: 1px solid #e4e6eb;
}
.post-detail-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.post-detail-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: #e4e6eb; color: #050505;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.post-detail-close:hover { background: #d8dadf; }
.post-detail-scroll { flex: 1; min-height: 0; overflow: auto; }
.post-detail-scroll .post-card {
  margin: 0; padding: 12px 16px 8px; border: 0; box-shadow: none; border-radius: 0;
}
.post-detail-scroll .post-body { cursor: default; }
.post-detail-comments { padding: 0 16px 16px; }
.post-detail-composer {
  position: relative; z-index: 2; flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 12px; border-top: 1px solid #e4e6eb; background: #fff;
}
.post-detail-composer .composer-avatar,
.post-detail-composer .composer-avatar.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%;
}
.post-detail-composer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment-reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-radius: 10px; background: #f0f2f5; color: #050505; font-size: 13px;
}
.comment-reply-bar[hidden] { display: none !important; }
.comment-reply-cancel {
  border: 0; background: transparent; color: #65676b; font-size: 12px; font-weight: 600; cursor: pointer;
}
.comment-reply-cancel:hover { color: #050505; }
.post-detail-input-wrap {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px;
  min-height: 40px; padding: 4px 6px 4px 14px; border-radius: 20px; background: #f0f2f5;
}
.post-detail-input-wrap input {
  flex: 1; min-width: 0; height: 32px; border: 0; background: transparent; outline: none;
}
.post-detail-input-wrap input::placeholder { color: #65676b; }
.post-detail-icon,
.post-detail-send {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: #65676b; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.post-detail-icon svg, .post-detail-send svg { width: 18px; height: 18px; }
.post-detail-icon:hover, .post-detail-send:hover { background: #e4e6eb; }
.post-detail-send { color: var(--primary); }
.post-detail-send:disabled { color: #bcc0c4; cursor: default; }
.post-detail-send:disabled:hover { background: transparent; }
.post-detail-guest {
  flex: 1; min-height: 40px; display: flex; align-items: center;
  padding: 0 14px; border-radius: 20px; background: #f0f2f5; color: #65676b;
}
.emoji-picker { position: relative; flex-shrink: 0; }
.post-detail-icon { font-size: 18px; line-height: 1; }
.emoji-panel {
  position: fixed; z-index: 140;
  width: 292px; max-width: calc(100vw - 24px); max-height: 220px;
  overflow-x: hidden; overflow-y: auto;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 8px; border: 1px solid #e4e6eb; border-radius: 12px;
  background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.emoji-panel[hidden] { display: none; }
.emoji-item {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; font-size: 20px; line-height: 1; cursor: pointer;
}
.emoji-item:hover { background: #f0f2f5; }
#createPostEmojiSlot .post-detail-icon,
#createPostEmojiSlot .composer-quick-btn {
  width: 40px; height: 40px;
}
.chat-compose .emoji-picker .post-detail-icon {
  width: 40px; height: 40px; background: #f0f2f5;
}

.display-name.is-member {
  background: linear-gradient(90deg, #1a1208 0%, #c8923e 35%, #ffe7a8 55%, #1a1208 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: member-shine 4s linear infinite;
}
@keyframes member-shine { to { background-position: 220% center; } }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 800; line-height: 1.2; vertical-align: middle;
}
.badge svg {
  width: 10px; height: 10px; flex-shrink: 0;
}
.badge.member { color: #1a1208; background: linear-gradient(135deg, #ffe7a8, #c8923e); }
.badge.verified { color: #fff; background: var(--primary-dark); }
.badge.celebrity { color: #1a1208; background: var(--celebrity); }
.badge.official { color: #fff; background: #1b3a6b; }
.ad-slot { display: grid; gap: 10px; }
.ad-slot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--muted);
}
.ad-slot-title { order: 2; }
.ad-slot-apply {
  order: 1;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 7px 14px;
  background: linear-gradient(135deg, #17e0e0, var(--primary));
  color: #04252b; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 16px rgba(5, 195, 221, .35);
}
.ad-slot-apply svg { width: 15px; height: 15px; stroke-width: 2; }
.ad-slot-apply:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ad-slot-apply:active { transform: none; }
.ad-slot-list { display: grid; gap: 12px; }
.ad-slot-empty {
  padding: 18px 14px; border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); font-size: 13px; text-align: center;
}
.ad-card {
  display: grid; gap: 8px; padding: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.ad-card[data-ad-link] { cursor: pointer; }
.ad-card[data-ad-link]:hover { transform: translateY(-1px); transition: transform .15s; }
.ad-card.is-personal { border-left-color: var(--primary-dark); }
.ad-card.is-enterprise { border-left-color: #1b3a6b; }
.ad-card.is-official { border-left-color: var(--gold); }
.ad-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-card-tag { font-size: 11px; font-weight: 700; color: var(--muted); }
.badge.ad-badge-personal { color: #fff; background: var(--primary-dark); }
.badge.ad-badge-enterprise { color: #fff; background: #1b3a6b; }
.badge.ad-badge-official { color: #1a1208; background: linear-gradient(135deg, #ffe7a8, #c8923e); }
.ad-card-media { border-radius: 12px; overflow: hidden; }
.ad-card-media img { width: 100%; height: auto; display: block; }
.ad-card-title { margin: 0; font-size: 15px; font-weight: 800; }
.ad-name.is-personal { color: var(--primary-dark); }
.ad-name.is-enterprise { color: #1b3a6b; }
.ad-name.is-official {
  background: linear-gradient(90deg, #8a5a12 0%, #c8923e 42%, #ffe7a8 58%, #8a5a12 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: member-shine 4s linear infinite;
}
.ad-card-body { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ad-card-by { font-size: 12px; color: var(--muted); }
.ad-card-cta {
  display: block; width: 100%; padding: 9px 12px; margin-top: 2px;
  border-radius: 10px; background: var(--primary-soft);
  font-size: 13px; font-weight: 800; color: var(--primary-dark);
  text-align: center;
}
.ad-card.is-enterprise .ad-card-cta { color: #1b3a6b; background: rgba(27, 58, 107, .1); }
.ad-card.is-official .ad-card-cta { color: #6b4a10; background: rgba(200, 146, 62, .16); }
.ad-card[data-ad-link]:hover .ad-card-cta { filter: brightness(.97); }
.mobile-feed-ad { display: none; overflow: hidden; cursor: default; }
.mobile-feed-ad[data-ad-link] { cursor: pointer; }
.mobile-feed-ad-avatar {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
}
.mobile-feed-ad-avatar svg { width: 21px; height: 21px; }
.mobile-feed-ad .post-head > .badge { margin-left: auto; }
.mobile-feed-ad .post-body { cursor: inherit; }
.mobile-feed-ad .post-body strong { display: block; font-size: 16px; line-height: 1.4; }
.mobile-feed-ad .post-body p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.mobile-feed-ad-media { margin-top: 10px; border-radius: 12px; overflow: hidden; }
.mobile-feed-ad-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.mobile-feed-ad-cta {
  display: block; margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; font-weight: 800; text-align: center;
}
.mobile-feed-ad.is-enterprise .mobile-feed-ad-cta { color: #1b3a6b; background: rgba(27, 58, 107, .1); }
.mobile-feed-ad.is-official .mobile-feed-ad-cta { color: #6b4a10; background: rgba(200, 146, 62, .16); }

.member-card { max-width: 460px; display: grid; gap: 14px; }
.member-hero { display: grid; gap: 6px; justify-items: center; text-align: center; }
.member-hero-crown {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #ffe7a8, #c8923e); color: #4a3208;
}
.member-hero-crown svg { width: 24px; height: 24px; }
.member-hero h2 { margin: 0; font-size: 20px; }
.member-hero-sub { margin: 0; font-size: 13px; color: var(--muted); }
.member-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #14202b, #2a2010); color: #ffe7a8;
}
.member-plan-price { display: flex; align-items: baseline; gap: 4px; }
.member-plan-price strong { font-size: 24px; font-weight: 800; }
.member-plan-price span { font-size: 13px; opacity: .85; }
.badge.member-plan-badge { color: #1a1208; background: linear-gradient(135deg, #ffe7a8, #c8923e); }
.member-benefits { margin: 0; padding: 0 0 0 18px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.member-pending {
  padding: 12px 14px; border-radius: 12px; background: var(--soft);
  border: 1px solid var(--line); font-size: 13px; display: grid; gap: 4px;
}
.member-pending p { margin: 0; color: var(--muted); }
.member-pay { display: grid; gap: 12px; }
.member-pay-info {
  display: grid; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.pay-info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.pay-info-row span { color: var(--muted); font-weight: 700; }
.pay-info-row code { font-size: 12px; word-break: break-all; text-align: right; }
.pay-account-value { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pay-account-value code { min-width: 0; flex: 1; }
.pay-copy-button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  min-height: 30px; padding: 0 9px; border: 1px solid rgba(5, 195, 221, .35);
  border-radius: 9px; background: #fff; color: var(--primary-dark); cursor: pointer;
  font-size: 12px; font-weight: 800;
}
.pay-copy-button svg { width: 15px; height: 15px; }
.pay-copy-button span { color: inherit; }
.pay-copy-button:hover, .pay-copy-button.is-copied { border-color: var(--primary); background: #e8fbfe; }
.pay-info-qr { justify-self: center; }
.pay-info-qr img { width: 150px; height: 150px; object-fit: contain; border-radius: 10px; background: #fff; }
.pay-info-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.member-proof-pick { justify-self: start; }
.member-proof-preview { margin-top: 8px; }
.member-proof-preview img { max-width: 160px; border-radius: 10px; display: block; }

.ad-apply-card { max-width: 520px; display: grid; gap: 12px; }
.ad-kind-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-kind-option {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer;
}
.ad-kind-option.is-personal.is-active { border-color: var(--primary-dark); color: #fff; background: var(--primary-dark); }
.ad-kind-option.is-enterprise.is-active { border-color: #1b3a6b; color: #fff; background: #1b3a6b; }
.ad-kind-option.is-official.is-active { border-color: var(--gold); color: #1a1208; background: linear-gradient(135deg, #ffe7a8, #c8923e); }
.ad-quote {
  display: grid; gap: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.ad-quote-head { font-size: 13px; font-weight: 800; }
.ad-quote-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.ad-quote-row span { color: var(--muted); }
.ad-quote-row.is-total { padding-top: 6px; border-top: 1px solid var(--line); }
.ad-quote-row.is-total strong { color: var(--primary-dark); font-size: 15px; }
.side-link-member span:last-child { font-weight: 800; }
/* 侧栏第一项：名字 + 徽章 + 「个人主页」说明，横排，放不下时换行不溢出。
   让新用户看得出这项是进自己主页的。 */
.side-link-copy {
  min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px;
}
.side-link-copy .display-name { overflow-wrap: anywhere; }
.side-link-hint { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.side-link.is-active .side-link-hint { color: inherit; opacity: .75; }
.side-link-logout { margin-top: 6px; }
.side-link-logout:hover { background: rgba(246, 70, 93, .1); color: var(--danger); }

.badge.group-personal { color: #fff; background: var(--primary-dark); }
.badge.group-enterprise { color: #fff; background: #1b3a6b; }
.badge.group-official { color: #1a1208; background: linear-gradient(135deg, #ffe7a8, #c8923e); }
.group-name { color: inherit; font-weight: 800; }
.group-name.is-personal { color: var(--primary-dark); }
.group-name.is-enterprise { color: #1b3a6b; }
.group-name.is-official {
  background: linear-gradient(90deg, #8a5a12 0%, #c8923e 42%, #ffe7a8 58%, #8a5a12 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; animation: member-shine 4s linear infinite;
}
.group-head-open {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1;
  border: 0; background: transparent; text-align: left; cursor: pointer; padding: 0;
}
.group-head-open:hover { opacity: .86; }
.group-info-view { display: grid; gap: 10px; justify-items: center; text-align: center; margin-bottom: 16px; }
#groupInfoView[hidden], #groupSettingsForm[hidden], #groupAdminPermsWrap[hidden], #groupVerifyBox[hidden] {
  display: none !important;
}
.group-info-view .group-avatar, .group-info-view .group-avatar.avatar-fallback {
  width: 88px; height: 88px; border-radius: 22px; object-fit: cover; display: grid; place-items: center;
  font-size: 32px; font-weight: 800; background: var(--soft);
}
.group-info-name { font-size: 20px; font-weight: 800; }
.group-notice-style {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: stretch;
  margin-bottom: 12px;
}
.notice-style-toggles {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.notice-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.notice-toggle input { margin: 0; }
.notice-toggle:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.notice-toggle:has(input:disabled) { opacity: .55; pointer-events: none; }
.notice-style-tool {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.notice-style-tool > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.notice-style-tool input[type=color] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.group-notice-style .cm-select { min-width: 0; width: 100%; }
.group-notice-style .cm-select-trigger { min-height: 42px; }
.group-notice-icon-preview { width: 40px; height: 40px; border-radius: 10px; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.group-notice-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.group-admin-perms { display: grid; gap: 8px; margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.group-admin-perms .check { display: flex; align-items: center; gap: 8px; }

.messages-layout, .groups-layout {
  display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px;
  min-height: calc(100vh - 88px); width: 100%;
}
.list-panel, .chat-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.list-panel { display: flex; flex-direction: column; }
.list-panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.list-scroll { overflow: auto; max-height: 560px; }
.thread-card, .group-card { width: 100%; display: flex; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.thread-card:hover, .group-card:hover, .thread-card.is-active, .group-card.is-active { background: var(--soft); }
.thread-card img, .group-card img,
.thread-card .thread-avatar, .thread-card .avatar-fallback {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--soft);
}
/* 会话未读角标：用 margin-left:auto 顶到右侧，不改动 .thread-card 原有的 flex 布局 */
.thread-unread {
  margin-left: auto; align-self: center; flex-shrink: 0;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 10px;
  color: #fff; background: #e41e3f; font-size: 11px; font-weight: 800;
}
.thread-card.has-unread .muted { color: var(--ink); font-weight: 600; }

.chat-panel { display: flex; flex-direction: column; }
.chat-head {
  padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
/* 私聊头部的对方身份：头像和名字都可点进对方主页 */
.chat-head-peer {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%;
  color: inherit; text-decoration: none; vertical-align: middle;
}
/* 右上角操作区，和群聊头部的 .group-chat-actions 同位置同尺寸 */
.chat-head-actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
a.chat-head-peer { cursor: pointer; }
a.chat-head-peer:hover .display-name { text-decoration: underline; }
.chat-head-avatar, .chat-head-avatar.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--soft); display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.chat-head-name { min-width: 0; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mobile-chat-back {
  display: none; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: #eef4f5; color: var(--ink); cursor: pointer;
}
.mobile-chat-back svg { width: 20px; height: 20px; }
.chat-messages { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.chat-row.theirs { align-self: flex-start; }
.chat-row.mine { align-self: flex-end; }
.chat-row .chat-bubble { align-self: auto; max-width: 100%; }
.chat-msg-avatar, .chat-msg-avatar.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--soft); display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.chat-bubble { max-width: 78%; padding: 10px 12px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-bubble.mine { align-self: flex-end; background: var(--primary-soft); border: 1px solid rgba(5,195,221,.25); }
.chat-bubble.theirs { align-self: flex-start; background: #f7fbfc; border: 1px solid var(--line); }
.chat-bubble img, .chat-bubble video { max-width: 240px; border-radius: 10px; display: block; margin-top: 6px; }
.chat-compose { position: relative; z-index: 2; display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-compose input { flex: 1; }
.chat-compose label.button { position: relative; overflow: hidden; }
.chat-compose input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.group-chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
}
.group-chat-head .group-avatar, .group-chat-head .group-avatar.avatar-fallback {
  width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  background: var(--soft); display: grid; place-items: center; font-weight: 800;
}
.group-chat-copy { min-width: 0; flex: 1; overflow: hidden; }
.group-chat-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.group-chat-copy strong { display: block; }
.group-chat-actions { display: flex; gap: 6px; flex-shrink: 0; }
.group-notice, .group-pin {
  margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: #050505; background: #f7fbfc;
  display: flex; align-items: center; gap: 8px;
}
.group-notice { color: #65676b; }
.group-notice.is-card { border: 1px solid var(--line); border-radius: 12px; width: 100%; text-align: left; }
.group-notice-icon { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.group-pin { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-pin button, .chat-bubble-tools button {
  border: 0; background: transparent; color: var(--primary-dark); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0;
}
.chat-bubble-tools { display: flex; gap: 10px; margin-top: 6px; }
.chat-reply-quote {
  margin-bottom: 6px; padding: 6px 8px; border-left: 3px solid var(--primary);
  background: rgba(5,195,221,.08); border-radius: 0 8px 8px 0; font-size: 12px; color: #65676b;
}
.group-reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px 0; font-size: 13px;
}
.group-reply-bar[hidden] { display: none !important; }
.group-settings-card { width: min(480px, 100%); }
.group-verify-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.group-verify-box .muted { margin: 0; }
.group-verify-tools { padding: 0; background: transparent; box-shadow: none; }
.group-members-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 8px; }
.group-member-list, .group-invite-list { max-height: 280px; overflow: auto; display: grid; gap: 8px; }
.group-member-row, .group-invite-row {
  display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  flex-wrap: nowrap;
}
.group-member-row .group-member-copy, .group-invite-row span { min-width: 0; flex: 1; overflow: hidden; }
.group-member-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-more { flex-shrink: 0; margin-left: auto; }
.member-more .post-more-btn { width: 32px; height: 32px; }
.group-card .group-avatar, .group-card .group-avatar.avatar-fallback {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: var(--soft);
  display: grid; place-items: center; font-weight: 800; flex-shrink: 0;
}
.list-panel-head.group-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.group-list-tabs { display: flex; gap: 4px; }
.group-list-tabs button {
  border: 0; background: transparent; color: #65676b; font-weight: 800; cursor: pointer;
  padding: 6px 10px; border-radius: 999px;
}
.group-list-tabs button.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.group-cat-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.group-cat-chips button {
  border: 1px solid var(--line); background: #fff; color: #050505; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.group-cat-chips button.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.group-section-label { padding: 10px 16px 4px; font-size: 12px; font-weight: 800; color: #65676b; }
.group-link-row { display: flex; gap: 8px; }
.group-link-row input { flex: 1; }
.group-related { padding: 16px; border-top: 1px solid var(--line); }
.group-related h3 { margin: 0 0 8px; font-size: 14px; }
.group-join-preview { padding: 28px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.group-join-preview .group-avatar, .group-join-preview .group-avatar.avatar-fallback {
  width: 72px; height: 72px; border-radius: 18px; object-fit: cover; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: var(--soft);
}

.profile-page {
  width: min(1096px, 100%);
  margin: 0 auto;
}
.profile-hero {
  position: relative;
  overflow: visible;
  margin-bottom: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.profile-cover {
  position: relative;
  height: clamp(200px, 28vw, 350px);
  background: linear-gradient(135deg, #04252b, var(--primary));
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-edit-btn {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 6px;
  background: rgba(255,255,255,.92); color: #050505;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.cover-edit-btn svg { width: 16px; height: 16px; }
.cover-edit-btn:hover { background: #fff; }
.profile-identity {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  padding: 0 28px 20px; margin-top: -84px; position: relative; z-index: 1;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar, .profile-avatar.avatar-fallback {
  width: 168px; height: 168px; border-radius: 50%;
  border: 4px solid #fff; object-fit: cover; background: var(--soft);
  box-shadow: 0 0 0 1px rgba(0,0,0,.04);
}
.profile-avatar.avatar-fallback { font-size: 56px; }
.profile-avatar-cam {
  position: absolute; right: 8px; bottom: 14px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #e4e6eb; color: #050505; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
}
.profile-avatar-cam svg { width: 16px; height: 16px; }
.profile-avatar-cam:hover { background: #d8dadf; }
.profile-id-copy {
  flex: 1; min-width: 0; padding-top: 92px;
}
.profile-display-name {
  margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.03em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.profile-display-name .display-name { font-weight: 800; }
.profile-counts { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.profile-counts strong { color: var(--ink); }
.profile-count-link {
  border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.profile-count-link:hover { text-decoration: underline; }
.profile-actions {
  margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 92px; flex-shrink: 0;
}
.profile-tabs {
  display: flex; gap: 2px; overflow-x: auto;
  padding: 0 16px; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.profile-tab {
  flex: 0 0 auto; min-height: 52px; padding: 14px 16px 12px;
  border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: transparent; color: #65676b; font-weight: 700; cursor: pointer;
}
.profile-tab:hover { background: #f2f3f5; }
.profile-tab.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.profile-body { margin-top: 16px; }
.profile-columns {
  display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.profile-left { position: sticky; top: 72px; }
.profile-intro, .profile-friends-section {
  background: #fff; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  padding: 16px;
}
.intro-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.intro-head h2, .profile-friends-section h2, .profile-about .intro-head h2 {
  margin: 0; font-size: 20px;
}
.intro-edit {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #e4e6eb; color: #050505; cursor: pointer; display: grid; place-items: center;
}
.intro-edit svg { width: 16px; height: 16px; }
.intro-edit:hover { background: #d8dadf; }
.intro-row, .intro-row.is-link {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; margin: 0; padding: 8px 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left;
}
.intro-row.is-link { cursor: pointer; border-radius: 8px; }
.intro-row.is-link:hover { background: #f2f3f5; }
.intro-ico { width: 20px; height: 20px; flex-shrink: 0; color: #65676b; margin-top: 2px; }
.intro-ico svg { width: 20px; height: 20px; }
.intro-ico .cm-flag { width: 20px; height: 15px; margin-top: 3px; }
.intro-row span { overflow-wrap: anywhere; word-break: break-word; }
.profile-about { width: 100%; display: grid; gap: 16px; }
.about-tools {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 16px; background: #fff; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.about-tool {
  display: grid; justify-items: center; gap: 8px;
  min-height: 108px; padding: 18px 10px 14px; border: 0; border-radius: 12px;
  background: #f7f8fa; color: var(--ink); font-weight: 700; cursor: pointer;
}
.about-tool:hover { background: #eef1f4; }
.about-tool:disabled { cursor: default; }
.about-tool:disabled:hover { background: #f7f8fa; }
.about-tool.is-verified .about-tool-ico { color: var(--primary-dark); background: var(--primary-soft); }
.about-tool-ico {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.about-tool-ico svg { width: 22px; height: 22px; }
.about-official-status { grid-column: 1 / -1; margin: 0; text-align: center; }
.profile-friends-page { display: grid; gap: 16px; }
.profile-photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 8px; background: #fff; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.profile-photo { border: 0; padding: 0; background: none; cursor: pointer; overflow: hidden; border-radius: 6px; }
.profile-photo img, .profile-photo video {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.profile-feed { width: min(680px, 100%); margin: 0 auto; }
.profile-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.profile-stats strong { display: block; font-size: 18px; }
.profile-stats span { color: var(--muted); font-size: 12px; }
.edit-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.edit-avatar-row .profile-avatar { width: 72px; height: 72px; border-width: 2px; }
.edit-avatar-row .profile-avatar.avatar-fallback { font-size: 28px; }
.edit-cover-row { display: grid; gap: 10px; margin-bottom: 16px; }
.edit-cover-preview {
  height: 96px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #04252b, var(--primary));
}
.edit-cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-more { position: relative; margin-left: auto; flex-shrink: 0; }
.post-more-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #65676b; cursor: pointer;
  display: grid; place-items: center;
}
.post-save-btn { margin-left: auto; flex-shrink: 0; }
.post-save-btn.is-on { color: var(--primary-dark); }
.post-save-btn.is-on svg path { fill: currentColor !important; }
.post-more-btn svg { width: 20px; height: 20px; }
.post-more-btn svg circle { fill: currentColor; stroke: none; }
.post-more-btn:hover { background: #f2f3f5; }
.post-more-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 8;
  min-width: 160px; padding: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.post-more-menu button {
  width: 100%; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font-weight: 700; text-align: left; cursor: pointer;
}
.post-more-menu button:hover { background: #f2f3f5; }
.post-more-menu button.is-danger { color: var(--danger); }
body > .post-more-menu { z-index: 180; }
.post-card.is-hidden { opacity: .72; }
.post-hidden-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: #f2f3f5; color: #65676b; font-size: 11px; font-weight: 800; letter-spacing: .02em;
}

/* 统一滚动条样式：弹窗、下拉、面板、聊天等所有可滚动区域 */
.modal-card,
.create-group-scroll,
.post-detail-scroll,
.cm-select-menu,
.emoji-panel,
.notification-list,
.search-panel,
.list-scroll,
.chat-messages,
.group-member-list,
.group-invite-list,
.media-lightbox,
.field textarea,
textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(5, 195, 221, .45) transparent;
}
.modal-card::-webkit-scrollbar,
.create-group-scroll::-webkit-scrollbar,
.post-detail-scroll::-webkit-scrollbar,
.cm-select-menu::-webkit-scrollbar,
.emoji-panel::-webkit-scrollbar,
.notification-list::-webkit-scrollbar,
.search-panel::-webkit-scrollbar,
.list-scroll::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.group-member-list::-webkit-scrollbar,
.group-invite-list::-webkit-scrollbar,
.media-lightbox::-webkit-scrollbar,
.field textarea::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.modal-card::-webkit-scrollbar-track,
.create-group-scroll::-webkit-scrollbar-track,
.post-detail-scroll::-webkit-scrollbar-track,
.cm-select-menu::-webkit-scrollbar-track,
.emoji-panel::-webkit-scrollbar-track,
.notification-list::-webkit-scrollbar-track,
.search-panel::-webkit-scrollbar-track,
.list-scroll::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.group-member-list::-webkit-scrollbar-track,
.group-invite-list::-webkit-scrollbar-track,
.media-lightbox::-webkit-scrollbar-track,
.field textarea::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
  background: transparent;
}
.modal-card::-webkit-scrollbar-thumb,
.create-group-scroll::-webkit-scrollbar-thumb,
.post-detail-scroll::-webkit-scrollbar-thumb,
.cm-select-menu::-webkit-scrollbar-thumb,
.emoji-panel::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb,
.search-panel::-webkit-scrollbar-thumb,
.list-scroll::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.group-member-list::-webkit-scrollbar-thumb,
.group-invite-list::-webkit-scrollbar-thumb,
.media-lightbox::-webkit-scrollbar-thumb,
.field textarea::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgba(5, 195, 221, .45);
}
.modal-card::-webkit-scrollbar-thumb:hover,
.create-group-scroll::-webkit-scrollbar-thumb:hover,
.post-detail-scroll::-webkit-scrollbar-thumb:hover,
.cm-select-menu::-webkit-scrollbar-thumb:hover,
.emoji-panel::-webkit-scrollbar-thumb:hover,
.notification-list::-webkit-scrollbar-thumb:hover,
.search-panel::-webkit-scrollbar-thumb:hover,
.list-scroll::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.group-member-list::-webkit-scrollbar-thumb:hover,
.group-invite-list::-webkit-scrollbar-thumb:hover,
.media-lightbox::-webkit-scrollbar-thumb:hover,
.field textarea::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary);
}
.modal-card::-webkit-scrollbar-corner,
.post-detail-scroll::-webkit-scrollbar-corner,
.chat-messages::-webkit-scrollbar-corner,
.media-lightbox::-webkit-scrollbar-corner {
  background: transparent;
}
.media-lightbox {
  scrollbar-color: rgba(255, 255, 255, .4) transparent;
}
.media-lightbox::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, .4);
}
.media-lightbox::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, .62);
}

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,37,43,.45); }
.modal-card {
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow);
}
.modal-card.create-group-card {
  width: min(400px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 12px;
}
.modal-card.create-group-card > h2 { margin: 0 28px 8px 0; font-size: 20px; flex-shrink: 0; }
.modal-card.create-group-card form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.create-group-scroll { overflow: auto; min-height: 0; flex: 1; padding-right: 2px; }
.modal-card.create-group-card .muted { font-size: 12px; margin: 0 0 10px; }
.modal-card.create-group-card .edit-avatar-row { margin-bottom: 10px; }
.modal-card.create-group-card .edit-avatar-row .profile-avatar,
.modal-card.create-group-card .edit-avatar-row .profile-avatar.avatar-fallback { width: 52px; height: 52px; font-size: 22px; }
.modal-card.create-group-card .field { margin-bottom: 8px; }
.modal-card.create-group-card textarea,
.modal-card.create-group-card .field textarea { min-height: 48px; }
.modal-card.create-group-card .modal-actions {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-card.create-group-card #createGroupStatus { flex-shrink: 0; margin: 6px 0 0; min-height: 1.2em; }
#aboutCountryModal .modal-card,
#aboutPrivacyModal .modal-card,
#aboutPersonalModal .modal-card,
#groupPersonalVerifyModal .modal-card,
#profileEditModal .modal-card { overflow: visible; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 24px; cursor: pointer; color: var(--muted); }
.modal-card.confirm-card { width: min(380px, 100%); }
.modal-card.confirm-card > h2 { margin: 0 28px 10px 0; font-size: 18px; }
.modal-card.confirm-card .confirm-text { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; }
.modal-card.confirm-card .modal-actions { margin-top: 0; }
.modal-card.report-card { width: min(480px, 100%); }
.modal-card.report-card > h2 { margin: 0 30px 8px 0; }
/* 私聊「查看信息」弹窗 */
.modal-card.peer-info-card { width: min(420px, 100%); }
.modal-card.peer-info-card > h2 { margin: 0 30px 14px 0; font-size: 18px; }
.peer-info-head { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.peer-info-avatar, .peer-info-avatar.avatar-fallback {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--soft); display: grid; place-items: center; font-size: 22px; font-weight: 800;
}
.peer-info-name { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 17px; font-weight: 800; }
/* 简介卡在弹窗里不需要自己的白底和投影，跟着弹窗走 */
.peer-info-card .profile-intro { padding: 0; border-radius: 0; box-shadow: none; }
.peer-info-card .intro-head h2 { font-size: 15px; color: var(--muted); }
.report-reasons { margin: 18px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-reasons button {
  min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--text); font-weight: 700; text-align: left; cursor: pointer;
}
.report-reasons button:hover { border-color: #9dcbd1; background: #f2fbfc; }
.report-reasons button.is-selected { border-color: var(--primary); background: #daf7fa; color: #03768a; box-shadow: 0 0 0 2px rgba(5,195,221,.12); }
.report-card textarea { width: 100%; resize: vertical; }
.post-action.is-report:hover { color: #b42318; background: #fff1f0; }
@media (max-width: 520px) {
  .report-reasons { grid-template-columns: 1fr; }
}
.share-preview {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbfc;
}
.share-preview img, .share-preview video {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #e4e6eb; flex-shrink: 0;
}
.share-preview-copy { min-width: 0; display: grid; gap: 4px; }
.share-preview-copy strong { font-size: 14px; }
.share-preview-copy span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 16px; }
.share-link-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.share-via { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.share-nets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-net {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; text-align: left;
}
.share-net:hover { background: var(--soft); border-color: rgba(5,195,221,.35); }
.share-net-ico {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.share-net-ico svg { width: 18px; height: 18px; fill: currentColor !important; stroke: none !important; }
.share-net.is-whatsapp .share-net-ico { background: #25D366; }
.share-net.is-facebook .share-net-ico { background: #1877F2; }
.share-net.is-x .share-net-ico { background: #000; }
.share-net.is-telegram .share-net-ico { background: #26A5E4; }
.checkin-wrap { position: relative; }
#checkinButton { position: relative; }
.checkin-reminder {
  position: absolute; top: -2px; right: -2px; width: 10px; height: 10px;
  border: 2px solid #fff; border-radius: 50%; background: #e41e3f;
}
.checkin-nudge {
  position: absolute; z-index: 115; top: calc(100% + 8px); right: -8px;
  padding: 6px 10px; border: 0; border-radius: 9px; color: #04252b;
  background: var(--primary); box-shadow: 0 8px 22px rgba(5,195,221,.32);
  white-space: nowrap; cursor: pointer; font-size: 11px; font-weight: 800;
  animation: checkin-nudge 1.8s ease-in-out infinite;
}
.checkin-nudge::before {
  content: ""; position: absolute; right: 18px; top: -5px;
  width: 10px; height: 10px; background: var(--primary); transform: rotate(45deg);
}
@keyframes checkin-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.checkin-today { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: var(--primary-dark); }
.checkin-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.checkin-day {
  display: grid; gap: 4px; align-content: center; min-height: 76px; padding: 10px 6px;
  border: 1px solid var(--line); border-radius: 11px; text-align: center; background: var(--soft);
}
.checkin-day strong { font-size: 13px; line-height: 1.2; }
.checkin-day span { font-size: 11px; font-weight: 700; color: #65676b; line-height: 1.3; }
.checkin-day.is-current { border-color: var(--primary); background: #e8fbfe; }
.checkin-day.is-checked { background: var(--primary); color: #04252b; }
.checkin-day.is-checked span { color: #04252b; }
.toast {
  position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 240;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(4,37,43,.96); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1.5; text-align: left;
  box-shadow: 0 16px 36px rgba(4,37,43,.3);
  cursor: pointer; animation: toast-in .18s ease-out;
}
.toast[hidden] { display: none !important; }
.toast .toast-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--primary); }
.toast .toast-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast .toast-text { min-width: 0; overflow-wrap: anywhere; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 720px) {
  .toast { top: 66px; }
}
.media-lightbox {
  position: fixed; inset: 0; z-index: 140; display: grid; place-items: center;
  padding: 24px; overflow: auto;
}
.media-lightbox[hidden] { display: none !important; }
.media-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.media-lightbox-close {
  position: fixed; top: 16px; right: 18px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.media-lightbox img {
  position: relative; z-index: 1;
  max-width: min(92vw, 1100px); max-height: 88vh;
  object-fit: contain; cursor: zoom-in; user-select: none;
  transition: transform .18s ease;
}
.media-lightbox img.is-zoomed {
  max-width: none; max-height: none;
  width: auto; height: auto;
  transform: scale(1.8); cursor: zoom-out; transform-origin: center center;
}
.empty-state { padding: 48px 16px; text-align: center; color: var(--muted); }

@media (min-width: 901px) {
  .messages-layout, .groups-layout {
    height: calc(100vh - 144px);
    min-height: 480px;
  }
  .list-panel, .chat-panel { min-height: 0; }
  .list-scroll { flex: 1; min-height: 0; max-height: none; }
}

@media (max-width: 900px) {
  .feed-layout, .messages-layout, .groups-layout, .home-layout { grid-template-columns: 1fr; }
  .home-layout > .feed-left { display: none; }
  .home-center { max-width: none; grid-column: auto; }
  .feed-right { display: none; }
  .mobile-feed-ad { display: block; }
  .pull-refresh { display: flex; }
  .back-to-top { display: grid; }
  .messages-layout:not(.is-chat-open) > .chat-panel,
  .groups-layout:not(.is-chat-open) > .chat-panel { display: none; }
  .messages-layout.is-chat-open > .list-panel,
  .groups-layout.is-chat-open > .list-panel { display: none; }
  .messages-layout > .list-panel, .groups-layout > .list-panel {
    min-height: calc(100dvh - 152px);
  }
  .messages-layout.is-chat-open, .groups-layout.is-chat-open { min-height: 0; }
  .messages-layout.is-chat-open > .chat-panel,
  .groups-layout.is-chat-open > .chat-panel {
    height: calc(100dvh - 80px); min-height: 420px; border-radius: 14px;
  }
  .mobile-chat-back { display: inline-flex; }
  .chat-head:not(.group-chat-head) { display: flex; align-items: center; gap: 10px; }
  .chat-messages { padding: 12px; }
  .chat-bubble { max-width: 88%; }
  .chat-compose { flex-wrap: wrap; padding: 10px; }
  .chat-compose > input:not([type="file"]) { flex: 1 0 100%; width: 100%; min-height: 42px; }
  .chat-compose > .button { flex: 1; min-width: 0; padding-inline: 10px; }
  .group-chat-head { flex-wrap: wrap; }
  .group-chat-head .group-head-open { min-width: 0; }
  .group-chat-actions { width: 100%; justify-content: flex-end; padding-left: 46px; }
  body.mobile-chat-open .mobile-tabs { display: none; }
  body.mobile-chat-open .pull-refresh, body.mobile-chat-open .back-to-top { display: none; }
  body.mobile-chat-open .community-main { padding-bottom: 12px; }
  .desktop-nav a { width: 72px; }
  .profile-columns { grid-template-columns: 1fr; }
  .profile-left { position: static; }
}
@media (max-width: 760px) {
  .community-topbar-inner { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 10px; gap: 6px; }
  .desktop-nav { display: none; }
  .brand-text { position: static; width: auto; height: auto; clip: auto; overflow: hidden; max-width: 92px; font-weight: 800; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-left { gap: 5px; }
  .top-search { flex: 0 0 40px; width: 40px; max-width: 40px; }
  .top-search input {
    width: 40px; padding: 0; color: transparent; caret-color: transparent;
    cursor: pointer; background: #f0f2f5;
  }
  .top-search input::placeholder { color: transparent; }
  .top-search:focus-within {
    position: fixed; z-index: 90; top: 62px; left: 12px; right: 12px;
    width: auto; max-width: none; filter: drop-shadow(0 10px 24px rgba(6,42,61,.16));
  }
  .top-search:focus-within input {
    width: 100%; padding: 0 14px 0 38px; color: var(--ink); caret-color: auto; cursor: text; background: #fff;
    border: 1px solid var(--primary);
  }
  .top-search:focus-within input::placeholder { color: #65676b; }
  .top-search-results { position: fixed; top: 108px; left: 12px; right: 12px; width: auto; max-height: calc(100dvh - 128px); }
  .top-actions { gap: 5px; }
  .top-actions > a[href="#/messages"], .top-actions > #topAvatar { display: none; }
  .circle-button, .icon-button { width: 38px; height: 38px; }
  .mobile-tabs { display: grid; }
  .community-main { padding-bottom: 88px; }
  .modal.post-modal { padding: 0; }
  .post-detail-card {
    width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0;
  }
  .profile-cover { height: 200px; }
  .profile-identity {
    flex-direction: column; align-items: center; text-align: center;
    margin-top: -66px; padding: 0 16px 16px;
  }
  .profile-avatar, .profile-avatar.avatar-fallback { width: 132px; height: 132px; }
  .profile-avatar.avatar-fallback { font-size: 44px; }
  .profile-id-copy, .profile-actions { padding-top: 8px; }
  .profile-display-name { justify-content: center; }
  .profile-actions { margin: 0; width: 100%; justify-content: center; }
  .profile-left { position: static; }
  .profile-columns, .profile-photo-grid { grid-template-columns: 1fr; }
  .profile-photo-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-tabs { padding: 0 8px; }
  .cover-edit-btn span { display: none; }
  .cover-edit-btn { width: 36px; padding: 0; justify-content: center; }
  .notification-panel { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; }
}
@media (max-width: 430px) {
  .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .brand-mark { width: 38px; height: 38px; }
  .pay-info-row:first-child { align-items: flex-start; flex-direction: column; }
  .pay-account-value { width: 100%; justify-content: space-between; }
  .pay-account-value code { text-align: left; }
}
