:root {
  --ink: #111114;
  --muted: #727187;
  --quiet: #8a8692;
  --line: #ececf6;
  --line-strong: #d7d2df;
  --surface: #fff;
  --surface-soft: #f8f7fb;
  --surface-purple: #f5f1ff;
  --purple: #6e40ff;
  --purple-dark: #4b22d6;
  --blue: #0797ff;
  --green: #00c8a5;
  --gold: #ffe045;
  --danger: #bd2c3b;
  --header-height: 76px;
  --left-width: 284px;
  --right-width: 332px;
  --radius: 14px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--surface); }
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; overflow: hidden; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(110,64,255,.26); outline-offset: 2px; }

.site-header {
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  position: relative;
  z-index: 30;
}
.brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; justify-self: start; }
.brand span { color: var(--purple); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { padding: 10px 14px; border-radius: 10px; font-size: .89rem; font-weight: 600; color: #38353e; white-space: nowrap; }
.site-nav a:hover { color: var(--purple); background: var(--surface-soft); }
.site-nav a[aria-current="page"] { color: var(--purple); background: var(--surface-purple); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.header-icon, .mobile-menu-button {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: transparent; color: #4d4954; cursor: pointer;
}
.header-icon:hover, .mobile-menu-button:hover { background: var(--surface-soft); color: var(--purple); }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); position: absolute; right: 8px; top: 7px; box-shadow: 0 0 0 2px #fff; }
.account-button { min-height: 42px; min-width: 88px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; font-size: .83rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.account-button:hover { border-color: var(--purple); color: var(--purple); }
.account-button .avatar { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--purple); color: #fff; font-size: .72rem; }
.mobile-menu-button { display: none; }
.mobile-nav { position: fixed; z-index: 35; top: var(--header-height); inset-inline: 0; padding: 12px 18px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 30px rgba(20,18,28,.08); }
.mobile-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mobile-nav a[aria-current="page"] { color: var(--purple); font-weight: 700; }

#communityApp { height: calc(100vh - var(--header-height)); }
.community-view { display: none; height: 100%; }
.community-view[data-active="true"] { display: grid; }
#feedView { grid-template-columns: var(--left-width) minmax(520px, 1fr) var(--right-width); }

.realm-rail, .context-rail, .thread-left, .thread-right, .me-sidebar, .me-context { min-width: 0; overflow-y: auto; scrollbar-width: thin; }
.realm-rail { padding: 24px 22px; border-right: 1px solid var(--line); }
.rail-heading { margin-bottom: 14px; }
.rail-heading strong { display: block; margin: 0 0 6px; font-size: 1.55rem; letter-spacing: -.04em; }
.rail-heading p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.realm-switcher { display: grid; gap: 5px; }
.realm-button {
  width: 100%; min-height: 57px; padding: 9px 11px; display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center;
  border-radius: 12px; background: var(--surface-soft); text-align: left; cursor: pointer; transition: transform .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}
.realm-button:hover { transform: translateX(3px); }
.realm-button[aria-pressed="true"] { color: var(--realm-ink, #fff); background: var(--realm-color); }
.realm-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--realm-color); background: color-mix(in srgb, var(--realm-color) 12%, white); }
.realm-button[aria-pressed="true"] .realm-icon { color: var(--realm-ink, #fff); background: rgba(255,255,255,.22); }
.realm-copy { min-width: 0; display: grid; gap: 2px; }
.realm-copy strong { font-size: .84rem; }
.realm-copy span { color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.realm-button[aria-pressed="true"] .realm-copy span { color: color-mix(in srgb, var(--realm-ink, #fff) 82%, transparent); }
.realm-button > svg { font-size: .85rem; }
.rail-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 3px 8px; font-size: .8rem; }
.rail-section-heading button { display: flex; align-items: center; gap: 2px; color: var(--muted); background: none; cursor: pointer; font-size: .7rem; }
.rail-section-heading button:hover { color: var(--purple); }
.circle-list { display: grid; gap: 2px; }
.circle-list button { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; padding: 10px 9px; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; font-size: .78rem; }
.circle-list button:hover { background: var(--surface-soft); }
.circle-list button[aria-current="true"] { color: var(--purple); background: var(--surface-purple); font-weight: 700; }
.circle-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--circle-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--circle-color) 12%, white); }
.circle-list button > svg { color: var(--quiet); font-size: .78rem; }

.discussion-desk { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto auto auto auto auto auto minmax(0,1fr); }
.desk-toolbar { padding: 20px 20px 14px; display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center; gap: 14px; }
.desk-title-block { min-width: 168px; }
.desk-title-block h1 { margin: 0; font-size: 1.56rem; letter-spacing: -.03em; }
.desk-title-block p { margin: 4px 0 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.search-box { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--quiet); transition: border-color .18s, box-shadow .18s; }
.search-box:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(110,64,255,.1); }
.search-box input { min-width: 0; flex: 1; height: 40px; border: 0; outline: 0; background: transparent; font-size: .78rem; }
.search-box input::placeholder { color: #77737e; }
.primary-button, .secondary-button, .quiet-button, .text-action {
  min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; font-size: .78rem; font-weight: 700; cursor: pointer; transition: transform .18s var(--ease), background .18s, border-color .18s;
}
.primary-button { color: #fff; background: var(--purple); box-shadow: 0 6px 16px rgba(83,40,223,.18); }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .52; cursor: wait; transform: none; }
.secondary-button { background: #fff; border: 1px solid var(--line-strong); }
.secondary-button:hover { border-color: var(--purple); color: var(--purple); }
.quiet-button, .text-action { background: transparent; color: var(--muted); }
.quiet-button:hover, .text-action:hover { color: var(--purple); background: var(--surface-soft); }
.circle-strip { padding: 0 20px 13px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.circle-strip::-webkit-scrollbar { display: none; }
.circle-chip { min-width: 142px; padding: 9px 12px; display: grid; grid-template-columns: 31px 1fr; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.circle-chip:hover { border-color: var(--circle-color); }
.circle-chip[aria-pressed="true"] { border-color: var(--circle-color); background: color-mix(in srgb, var(--circle-color) 5%, white); }
.chip-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--circle-color); font-size: .67rem; font-weight: 800; }
.circle-chip strong { display: block; font-size: .73rem; white-space: nowrap; }
.circle-chip small { display: block; margin-top: 2px; color: var(--muted); font-size: .63rem; }
.feed-controls { min-height: 52px; padding: 7px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.feed-controls > div { display: flex; gap: 4px; }
.feed-controls [data-sort] { min-height: 36px; padding: 0 13px; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: .76rem; }
.feed-controls [data-sort][aria-pressed="true"] { color: var(--purple); background: var(--surface-purple); font-weight: 700; }
.status-line { min-height: 0; padding: 0 20px; color: var(--muted); font-size: .72rem; overflow: hidden; }
.status-line:not(:empty) { min-height: 38px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.feed-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.feed-loading { display: grid; gap: 0; }
.feed-skeleton { height: 132px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#fff 20%,#f7f5fb 46%,#fff 72%); background-size: 260% 100%; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -160% 0; } }
.thread-row { position: relative; border-bottom: 1px solid var(--line); }
.thread-row[data-pinned="true"] { background: #fbf9ff; }
.thread-row-inner { min-height: 128px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; padding: 17px 20px; }
.user-avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: color-mix(in srgb, var(--avatar-color) 13%, white); color: var(--avatar-color); font-size: .73rem; font-weight: 800; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-open { min-width: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: .66rem; }
.type-label { color: var(--purple); font-weight: 700; }
.official-label { color: #7a4d00; background: #fff5d7; padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.seed-label { display: inline-flex; align-items: center; margin-inline: 4px; padding: 2px 6px; border-radius: 6px; color: #675f72; background: #f0eef4; font-size: .6rem; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.thread-title { margin: 7px 0 4px; font-size: .98rem; line-height: 1.45; letter-spacing: -.02em; }
.thread-open:hover .thread-title { color: var(--purple); }
.thread-summary { margin: 0; color: #55515c; font-size: .75rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-bottom { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.thread-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.thread-tag { padding: 3px 7px; border-radius: 6px; background: var(--surface-soft); color: #5c5764; font-size: .62rem; }
.thread-counts { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .66rem; white-space: nowrap; }
.thread-counts span { display: inline-flex; align-items: center; gap: 4px; }
.row-actions { display: flex; align-items: flex-start; gap: 3px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--purple); background: var(--surface-purple); }
.icon-button[aria-pressed="true"] { color: var(--purple); background: var(--surface-purple); }
.empty-state { min-height: 290px; display: grid; place-items: center; padding: 38px; text-align: center; }
.empty-state > div { max-width: 380px; }
.empty-mark { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 15px; color: var(--purple); background: var(--surface-purple); font-size: 1.35rem; }
.empty-state h3 { margin: 0 0 7px; font-size: 1rem; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: .75rem; line-height: 1.65; }
.mobile-realm-tabs { display: none; }

.context-rail { border-left: 1px solid var(--line); padding: 23px 20px; }
.context-section { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.context-section:last-child { border-bottom: 0; }
.context-kicker { margin: 0 0 12px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.context-circle-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.context-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--circle-color); font-size: .72rem; font-weight: 800; }
.context-circle-title h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; }
.context-description { margin: 0 0 14px; color: #5d5964; font-size: .72rem; line-height: 1.7; }
.follow-button { width: 100%; min-height: 42px; border: 1px solid var(--purple); border-radius: 11px; color: var(--purple); background: #fff; font-size: .75rem; font-weight: 700; cursor: pointer; }
.follow-button:hover, .follow-button[aria-pressed="true"] { color: #fff; background: var(--purple); }
.context-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.context-list li { display: flex; align-items: flex-start; gap: 8px; color: #504c56; font-size: .72rem; line-height: 1.55; }
.context-list svg { margin-top: 2px; color: var(--purple); flex: 0 0 auto; }
.related-list { display: grid; }
.related-button { width: 100%; padding: 9px 0; display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center; background: transparent; text-align: left; cursor: pointer; }
.related-button:hover strong { color: var(--purple); }
.related-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--circle-color); font-size: .6rem; font-weight: 800; }
.related-button strong { display: block; font-size: .7rem; }
.related-button small { display: block; margin-top: 2px; color: var(--muted); font-size: .61rem; }
.my-summary { padding: 15px; border-radius: var(--radius); background: var(--surface-purple); }
.my-summary-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.my-summary-head strong { font-size: .82rem; }
.my-summary-head button { color: var(--purple); background: transparent; cursor: pointer; font-size: .68rem; }
.realm-progress { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 8px; margin-top: 10px; font-size: .66rem; }
.progress-track { height: 3px; background: #ddd7ec; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--progress-color); }

.discovery-panel { padding: 4px 20px 20px; }
.discovery-intro { padding: 18px 0 12px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); }
.discovery-intro h3 { margin: 0; font-size: 1.1rem; }
.discovery-intro p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.discovery-list { display: grid; }
.discovery-row { padding: 18px 0; display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.discovery-row h4 { margin: 0 0 4px; font-size: .86rem; }
.discovery-row p { margin: 0; max-width: 64ch; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.discovery-row .follow-button { width: auto; padding-inline: 15px; }

.thread-layout { grid-template-columns: var(--left-width) minmax(560px,1fr) var(--right-width); }
.thread-left { border-right: 1px solid var(--line); padding: 21px 20px; }
.back-button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 4px; background: transparent; color: var(--muted); font-size: .73rem; cursor: pointer; }
.back-button:hover { color: var(--purple); }
.thread-left-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.thread-left-section h3 { margin: 0 0 12px; font-size: .76rem; }
.thread-left-section p { margin: 7px 0 0; color: var(--muted); font-size: .69rem; line-height: 1.65; }
.topic-link { width: 100%; padding: 8px 2px; display: flex; justify-content: space-between; color: var(--purple); background: transparent; font-size: .7rem; cursor: pointer; }
.thread-reader { min-width: 0; overflow-y: auto; padding: 26px 34px 70px; scroll-behavior: smooth; }
.thread-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: .68rem; }
.thread-breadcrumb button { padding: 0; background: transparent; color: inherit; cursor: pointer; }
.thread-breadcrumb button:hover { color: var(--purple); }
.reader-type { display: inline-flex; margin: 18px 0 8px; color: var(--purple); font-size: .7rem; font-weight: 700; }
.reader-title { max-width: 28ch; margin: 0; font-size: clamp(1.6rem,2.5vw,2.2rem); line-height: 1.23; letter-spacing: -.035em; }
.reader-author { margin-top: 17px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .68rem; }
.reader-author strong { color: var(--ink); }
.reader-author .user-avatar { width: 36px; height: 36px; border-radius: 11px; }
.reader-body { max-width: 72ch; padding: 25px 0; color: #302d34; font-size: .87rem; line-height: 1.92; }
.reader-body p { margin: 0 0 1em; }
.reader-body h2, .reader-body h3 { margin: 1.65em 0 .55em; line-height: 1.4; }
.reader-body h2 { font-size: 1.1rem; }.reader-body h3 { font-size: .98rem; }
.reader-body pre { padding: 14px 16px; overflow-x: auto; border: 1px solid #d9d2ea; border-radius: 10px; background: #faf8ff; color: #39314d; font-family: "SFMono-Regular", Consolas, monospace; font-size: .74rem; line-height: 1.65; }
.reader-body ul, .reader-body ol { padding-left: 1.3em; }
.reader-actions { padding: 12px 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.reader-actions .secondary-button[aria-pressed="true"] { color: var(--purple); border-color: var(--purple); background: var(--surface-purple); }
.reader-actions .danger-action { margin-left: auto; }
.danger-action { color: var(--danger); }
.reply-composer { margin: 24px 0 28px; }
.reply-composer h2, .comments-heading h2 { margin: 0; font-size: 1.05rem; }
.reply-composer p { margin: 5px 0 12px; color: var(--muted); font-size: .7rem; }
.reply-box { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.reply-box:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(110,64,255,.08); }
.reply-box textarea { width: 100%; min-height: 112px; padding: 14px; resize: vertical; border: 0; outline: 0; font-size: .78rem; line-height: 1.65; }
.reply-media { border-top: 1px solid var(--line); background: #fff; }
.reply-media-toolbar { min-height: 42px; padding: 6px 10px; display: flex; align-items: center; gap: 7px; }
.reply-media-toolbar > button { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; color: #1557ff; background: #edf5ff; cursor: pointer; font-size: .63rem; font-weight: 700; }
.reply-media-toolbar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.reply-media-selection { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .62rem; }
.reply-media-selection img { width: 38px; height: 38px; border-radius: 7px; object-fit: contain; background: #f3f6fa; }
.reply-media-selection span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-media-selection button { min-height: 28px; padding: 0 7px; border-radius: 7px; color: var(--danger); background: #fff0f1; cursor: pointer; font-size: .6rem; }
.reply-sticker-tray { max-height: 240px; padding: 9px; overflow-y: auto; border-top: 1px solid var(--line); background: #f7fbff; }
.reply-sticker-tray[hidden] { display: none; }
.reply-sticker-tray section + section { margin-top: 9px; padding-top: 8px; border-top: 1px solid #dce8f7; }
.reply-sticker-tray strong { display: block; margin-bottom: 6px; color: #526074; font-size: .62rem; }
.reply-sticker-empty p { margin: 0; color: #66768c; font-size: .62rem; line-height: 1.55; }
.reply-sticker-tray section > div { display: grid; grid-template-columns: repeat(auto-fill,minmax(58px,1fr)); gap: 6px; }
.reply-sticker-tray button { min-height: 64px; padding: 3px; border: 1px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; }
.reply-sticker-tray button:hover { border-color: #1557ff; }
.reply-sticker-tray img { width: 100%; height: 58px; object-fit: contain; }
.reply-box-footer { padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: #fcfbfd; }
.reply-box-footer span { color: var(--muted); font-size: .65rem; }
.comments-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.comment-list { display: grid; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-main { display: grid; grid-template-columns: 36px 1fr; gap: 10px; }
.comment .user-avatar { width: 36px; height: 36px; border-radius: 11px; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: .64rem; }
.comment-head strong { color: var(--ink); font-size: .72rem; }
.comment-body { margin: 7px 0 8px; color: #39363e; font-size: .76rem; line-height: 1.72; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 4px; }
.comment-actions button { min-height: 32px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: .64rem; }
.comment-actions button:hover, .comment-actions button[aria-pressed="true"] { color: var(--purple); background: var(--surface-purple); }
.comment-media-card { width: fit-content; max-width: min(460px,92%); margin: 8px 0; }
.comment-media-preview { display: block; max-width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #f4f7fb; cursor: pointer; }
.comment-media-preview img { display: block; width: auto; max-width: 100%; max-height: 320px; object-fit: contain; }
.comment-media-save-actions { display: none; align-items: center; gap: 7px; margin-top: 6px; }
.comment-media-card[data-actions-open="true"] .comment-media-save-actions { display: flex; }
.comment-media-save-actions button,.comment-media-save-actions a { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 8px; color: #1557ff; background: #edf5ff; cursor: pointer; font-size: .6rem; font-weight: 700; }
.comment-children { margin: 12px 0 0 46px; padding-left: 14px; border-left: 1px solid #d8d1e9; }
.comment-children .comment { padding: 13px 0; }
.inline-reply { margin: 10px 0 0 46px; display: grid; gap: 8px; }
.inline-reply textarea { min-height: 78px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; font-size: .73rem; }
.inline-reply textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(110,64,255,.08); }
.inline-reply > .inline-reply-actions { display: flex; justify-content: flex-end; gap: 7px; }
.inline-edit { margin-top: 8px; }
.thread-right { border-left: 1px solid var(--line); padding: 22px 20px; }
.side-card { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.side-card h3 { margin: 0 0 12px; font-size: .76rem; }
.author-card { display: grid; grid-template-columns: 42px 1fr; gap: 10px; }
.author-card p { grid-column: 1/-1; margin: 2px 0 0; color: var(--muted); font-size: .69rem; line-height: 1.6; }

.me-layout { grid-template-columns: var(--left-width) minmax(560px,1fr) var(--right-width); }
.me-sidebar { padding: 22px 20px; border-right: 1px solid var(--line); }
.me-profile { padding: 19px 0; display: flex; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.me-profile h1 { margin: 0 0 3px; font-size: 1.1rem; }
.me-profile p { margin: 0; color: var(--muted); font-size: .66rem; }
.me-nav { display: grid; gap: 3px; padding: 16px 0; }
.me-nav button { min-height: 42px; padding: 0 10px; display: flex; align-items: center; gap: 9px; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: .75rem; }
.me-nav button[aria-pressed="true"], .me-nav button:hover { color: var(--purple); background: var(--surface-purple); }
.me-mobile-tabs { display: none; }
.me-content { min-width: 0; overflow-y: auto; padding: 28px 34px 70px; }
.me-content-header { display: flex; align-items: end; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.me-content-header h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.035em; }
.me-content-header p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.me-section { padding: 22px 0; }
.realm-stat-list { display: grid; gap: 0; }
.realm-stat-row { padding: 18px 0; display: grid; grid-template-columns: 120px minmax(120px,1fr) 180px; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); }
.realm-stat-row h3 { margin: 0; font-size: .86rem; }
.realm-stat-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .63rem; }
.realm-stat-row .progress-track { height: 5px; }
.stat-numbers { display: flex; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: .65rem; }
.stat-numbers strong { color: var(--ink); }
.personal-list { display: grid; }
.personal-row { padding: 16px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; border-bottom: 1px solid var(--line); }
.personal-row button { padding: 0; background: transparent; text-align: left; cursor: pointer; }
.personal-row h3 { margin: 0 0 5px; font-size: .84rem; }
.personal-row p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.personal-row small { color: var(--muted); font-size: .63rem; }
.notification-row[data-unread="true"] { background: linear-gradient(90deg,var(--surface-purple),transparent); }
.me-context { padding: 22px 20px; border-left: 1px solid var(--line); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(23,22,27,.3); animation: fadeIn .2s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.composer-sheet { position: fixed; z-index: 60; top: 0; right: 0; width: min(520px,100vw); height: 100vh; padding: 24px 26px; overflow-y: auto; background: #fff; transform: translateX(104%); transition: transform .32s var(--ease); box-shadow: -18px 0 44px rgba(20,18,28,.14); }
.composer-sheet[aria-hidden="false"] { transform: translateX(0); }
.composer-sheet form { display: grid; gap: 16px; }
.sheet-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.sheet-header h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.035em; }
.sheet-header p { margin: 6px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.composer-sheet label, .report-dialog label { display: grid; gap: 7px; color: #4e4a54; font-size: .72rem; font-weight: 600; }
.composer-sheet input, .composer-sheet select, .composer-sheet textarea, .report-dialog select, .report-dialog textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; outline: 0; font-size: .78rem; font-weight: 400; }
.composer-sheet input, .composer-sheet select, .report-dialog select { min-height: 44px; padding: 0 12px; }
.composer-sheet textarea, .report-dialog textarea { min-height: 220px; padding: 12px; resize: vertical; line-height: 1.65; }
.composer-sheet input:focus, .composer-sheet select:focus, .composer-sheet textarea:focus, .report-dialog select:focus, .report-dialog textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(110,64,255,.08); }
.form-note { margin: -4px 0 0; padding: 11px 12px; border-radius: 10px; color: #4f4862; background: var(--surface-purple); font-size: .68rem; line-height: 1.6; }
.form-error { min-height: 0; color: var(--danger); font-size: .7rem; }
.form-error:not(:empty) { padding: 10px 12px; border-radius: 9px; background: #fff1f2; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.report-dialog { width: min(460px,calc(100vw - 28px)); padding: 22px; border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(20,18,28,.22); }
.report-dialog::backdrop { background: rgba(23,22,27,.36); }
.report-dialog form { display: grid; gap: 15px; }
.report-dialog textarea { min-height: 130px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; max-width: min(460px,calc(100vw - 32px)); padding: 11px 16px; border-radius: 11px; color: #fff; background: #242129; box-shadow: 0 10px 30px rgba(20,18,28,.18); font-size: .73rem; line-height: 1.5; opacity: 0; transform: translate(-50%,14px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.toast[data-show="true"] { opacity: 1; transform: translate(-50%,0); }

/* 2026-08 DeepSeek community playground — public community artwork, not house-generated stickers. */
.deepseek-community-hero {
  position: relative; min-height: 166px; margin: 0 20px 12px; padding: 21px 210px 19px 24px; overflow: hidden;
  border-radius: 18px; color: #f7fbff; isolation: isolate;
  background-image: linear-gradient(90deg,rgba(5,18,49,.96) 0%,rgba(8,32,77,.91) 48%,rgba(8,32,77,.28) 100%),url('/community/assets/deepseek-seaside.webp');
  background-size: cover; background-position: center;
  box-shadow: 0 12px 34px rgba(8,31,75,.16);
}
.deepseek-community-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 72% 16%,rgba(77,173,255,.28),transparent 36%); pointer-events: none; }
.deepseek-hero-copy { position: relative; z-index: 2; max-width: 560px; }
.hero-eyebrow { display: block; margin-bottom: 7px; color: #8fd3ff; font-size: .66rem; font-weight: 800; letter-spacing: .16em; }
.deepseek-community-hero h2 { margin: 0; font-size: clamp(1.26rem,2vw,1.72rem); line-height: 1.15; letter-spacing: -.04em; }
.deepseek-community-hero p { max-width: 56ch; margin: 8px 0 13px; color: rgba(240,247,255,.8); font-size: .72rem; line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-primary,.hero-secondary { min-height: 37px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-size: .7rem; font-weight: 800; }
.hero-primary { color: #071632; background: #88d5ff; }
.hero-primary:hover { background: #fff; }
.hero-secondary { color: #fff; border: 1px solid rgba(255,255,255,.32); background: rgba(8,22,51,.32); backdrop-filter: blur(8px); }
.hero-secondary:hover { border-color: #fff; }
.hero-credit { display: inline-block; margin-top: 8px; color: rgba(233,244,255,.62); font-size: .57rem; }
.hero-credit:hover { color: #fff; text-decoration: underline; }
.deepseek-hero-character { position: absolute; z-index: 1; right: 14px; bottom: -236px; width: 184px; height: auto; filter: drop-shadow(0 12px 22px rgba(3,12,30,.36)); transform: rotate(1.5deg); }

.chat-quick-actions { display: none; align-items: center; gap: 8px; }
.chat-quick-actions button { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: 11px; color: #1557ff; background: #eaf3ff; cursor: pointer; font-size: .72rem; font-weight: 750; }
.chat-quick-actions button:first-child { color: #fff; background: #1557ff; box-shadow: 0 7px 20px rgba(21,87,255,.18); }
.chat-quick-actions button:hover { background: #dcecff; }
.chat-quick-actions button:first-child:hover { background: #0d47d5; }
.chat-quick-actions svg { width: 17px; height: 17px; }
.community-mode-tabs { display: flex; gap: 4px; padding: 0 20px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.community-mode-tabs::-webkit-scrollbar { display: none; }
.community-mode-tabs button { flex: 0 0 auto; min-height: 38px; padding: 0 13px; border-radius: 10px; color: #5e5a64; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 650; }
.community-mode-tabs button:hover { color: #1557ff; background: #edf5ff; }
.community-mode-tabs button[aria-pressed="true"] { color: #fff; background: #1557ff; box-shadow: 0 6px 16px rgba(21,87,255,.2); }
.discussion-desk[data-mode="chat"] .circle-strip,.discussion-desk[data-mode="chat"] .feed-controls,
.discussion-desk[data-mode="stickers"] .circle-strip,.discussion-desk[data-mode="stickers"] .feed-controls,
.discussion-desk[data-mode="rooms"] .circle-strip,.discussion-desk[data-mode="rooms"] .feed-controls,
.discussion-desk[data-mode="wardrobe"] .circle-strip,.discussion-desk[data-mode="wardrobe"] .feed-controls { display: none; }
.discussion-desk[data-mode="chat"] { grid-template-rows: auto auto minmax(0,1fr); }
.discussion-desk[data-mode="chat"] .deepseek-community-hero,.discussion-desk[data-mode="chat"] .status-line { display: none; }
.discussion-desk[data-mode="chat"] .feed-scroll { min-height: 0; overflow: hidden; }
.discussion-desk[data-mode="chat"] .desk-toolbar { grid-template-columns: minmax(0,1fr) auto; }
.discussion-desk[data-mode="chat"] .search-box,.discussion-desk[data-mode="chat"] #openComposer,.discussion-desk[data-mode="chat"] .mobile-realm-tabs { display: none; }
.discussion-desk[data-mode="chat"] .chat-quick-actions { display: flex; }
body[data-community-view-mode="chat"] #feedView { grid-template-columns: minmax(0,1fr) var(--right-width); }
body[data-community-view-mode="chat"] .realm-rail { display: none; }
body[data-community-view-mode="chat"] .sl-companion-root { bottom: 116px !important; }

.playground-intro { padding: 20px 22px 12px; }
.playground-intro .eyebrow { margin: 0 0 5px; color: #1557ff; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.playground-intro h2 { margin: 0; font-size: 1.32rem; letter-spacing: -.035em; }
.playground-intro p { margin: 7px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.65; }

.chat-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: linear-gradient(180deg,#f7fbff 0,#fff 22%); }
.chat-channel-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid #dce8f7; background: rgba(247,251,255,.94); backdrop-filter: blur(10px); }
.chat-channel-bar > div { display: flex; gap: 5px; }
.chat-channel-bar button { min-height: 34px; padding: 0 11px; border-radius: 9px; color: #526074; background: #eaf1fa; cursor: pointer; font-size: .68rem; font-weight: 700; }
.chat-channel-bar button[aria-pressed="true"] { color: #fff; background: #1557ff; }
.chat-channel-bar span { color: #687486; font-size: .62rem; }
.chat-message-list { min-height: 0; padding: 15px 20px 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scroll-behavior: auto; }
.chat-message-stack { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.chat-message-list:focus-visible { outline: 2px solid #1557ff; outline-offset: -2px; }
.chat-message { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 10px; padding: 8px 0; }
.chat-message .user-avatar { width: 40px; height: 40px; border-radius: 12px; }
.chat-message-content { min-width: 0; }
.chat-message[data-me="true"] { grid-template-columns: minmax(0,1fr) 40px; }
.chat-message[data-me="true"] > .user-avatar { grid-column: 2; }
.chat-message[data-me="true"] > .chat-message-content { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; }
.chat-message[data-me="true"] .chat-message-head { justify-content: flex-end; }
.chat-message-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #7a8492; font-size: .61rem; }
.chat-message-head strong { color: #253247; font-size: .72rem; }
.appearance-badge { padding: 2px 6px; border-radius: 999px; color: #1557ff; background: #e8f2ff; font-size: .56rem; font-weight: 700; }
.chat-message-body { width: fit-content; max-width: min(660px,90%); margin: 5px 0 0; padding: 9px 12px; border: 1px solid #dbe6f5; border-radius: 3px 13px 13px; color: #29364a; background: #fff; box-shadow: 0 4px 14px rgba(18,48,91,.05); font-size: .74rem; line-height: 1.62; white-space: pre-wrap; }
.chat-message[data-me="true"] .chat-message-body { border-color: #bcd7ff; background: #edf5ff; }
.chat-message-sticker { display: block; width: min(220px,54vw); max-height: 240px; margin-top: 7px; object-fit: contain; object-position: left bottom; }
.chat-media-card { width: fit-content; max-width: min(520px,90%); margin-top: 7px; }
.chat-media-preview { display: block; width: fit-content; max-width: 100%; padding: 0; overflow: hidden; border: 1px solid #dbe6f5; border-radius: 13px; background: #edf3fb; box-shadow: 0 8px 24px rgba(18,48,91,.1); cursor: pointer; }
.chat-media-card[data-media-review="pending"] .chat-media-preview,.comment-media-card[data-media-review="pending"] .comment-media-preview { position: relative; cursor: default; }
.community-media-review-badge { position: absolute; right: 8px; bottom: 8px; min-height: 26px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 8px; color: #17335e; background: rgba(238,246,255,.96); box-shadow: 0 4px 14px rgba(18,48,91,.14); font-size: .6rem; font-weight: 800; }
.community-media-blocked { width: fit-content; max-width: min(520px,90%); min-height: 48px; margin-top: 7px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border-radius: 12px; color: #733044; background: #fff0f3; box-shadow: 0 5px 16px rgba(115,48,68,.08); font-size: .68rem; font-weight: 750; }
.community-media-blocked svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-message[data-me="true"] .community-media-blocked { margin-left: auto; }
.chat-media-preview .chat-message-sticker { margin-top: 0; }
.chat-message-image { display: block; width: auto; max-width: 100%; max-height: 380px; object-fit: contain; }
.chat-media-save-actions { display: none; align-items: center; gap: 7px; margin-top: 6px; }
.chat-media-card[data-actions-open="true"] .chat-media-save-actions { display: flex; }
.chat-media-save-actions button,.chat-media-save-actions a { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 8px; color: #1557ff; background: #eaf3ff; cursor: pointer; font-size: .6rem; font-weight: 750; }
.chat-message[data-me="true"] .chat-media-card { margin-left: auto; }
.chat-message[data-me="true"] .chat-media-save-actions { justify-content: flex-end; }
.chat-message-actions { margin-top: 5px; }
.chat-message-actions button { color: #8b94a1; background: transparent; cursor: pointer; font-size: .58rem; }
.chat-message-actions button:hover { color: var(--danger); }
.chat-composer { position: relative; z-index: 4; padding: 12px 20px 10px; border-top: 1px solid #dce8f7; background: #fff; box-shadow: 0 -8px 24px rgba(18,48,91,.06); }
.chat-composer-main { display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; gap: 8px; align-items: end; }
.chat-composer textarea { min-height: 42px; max-height: 106px; padding: 10px 12px; resize: vertical; border: 1px solid #cad8e9; border-radius: 11px; outline: 0; font-size: .75rem; line-height: 1.5; }
.chat-composer textarea:focus { border-color: #1557ff; box-shadow: 0 0 0 3px rgba(21,87,255,.08); }
.chat-composer button { min-height: 42px; padding: 0 13px; border-radius: 11px; cursor: pointer; font-size: .7rem; font-weight: 750; }
.chat-media-button,.chat-sticker-toggle { color: #1557ff; background: #e9f2ff; }
.chat-media-button { display: inline-flex; align-items: center; gap: 6px; }
.chat-media-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-send { color: #fff; background: #1557ff; }
.chat-send:disabled { cursor: wait; opacity: .68; }
.chat-composer[data-community-muted="true"] button:disabled { cursor: not-allowed; }
.chat-composer[data-locked="true"] textarea { cursor: pointer; color: #6d7888; background: #f5f7fa; }
.chat-composer[data-community-muted="true"] textarea { cursor: not-allowed; }
.community-muted-notice { margin-bottom: 10px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; border-radius: 12px; color: #6e3042; background: #fff0f3; box-shadow: 0 5px 18px rgba(110,48,66,.08); }
.community-muted-notice strong { grid-row: 1 / span 2; font-size: .72rem; }
.community-muted-notice span { font-size: .66rem; line-height: 1.5; }
.community-muted-notice b { font-variant-numeric: tabular-nums; }
.community-muted-notice small { color: #7f5260; font-size: .6rem; line-height: 1.45; }
.reply-composer > .community-muted-notice,.inline-reply + .community-muted-notice { margin-top: 10px; }
.chat-composer-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 7px; }
.chat-composer-hint { margin: 0; color: #6d7888; font-size: .62rem; line-height: 1.45; }
.chat-character-count { flex: 0 0 auto; color: #7a8492; font-size: .62rem; font-variant-numeric: tabular-nums; }
.chat-character-count[data-near-limit="true"] { color: #b64b2a; font-weight: 750; }
.chat-new-message-notice { position: absolute; top: -43px; right: 20px; min-height: 34px !important; padding: 0 12px !important; color: #fff; background: #1557ff; box-shadow: 0 7px 22px rgba(21,87,255,.24); }
.chat-new-message-notice[hidden] { display: none; }
.chat-sticker-tray { display: none; max-height: 260px; margin-bottom: 9px; padding: 9px; overflow-y: auto; border: 1px solid #dce8f7; border-radius: 12px; background: #f7fbff; }
.chat-sticker-tray[data-open="true"] { display: block; }
.chat-sticker-section + .chat-sticker-section { margin-top: 10px; padding-top: 9px; border-top: 1px solid #dce8f7; }
.chat-sticker-section-head { min-height: 34px; margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-sticker-section-head strong { color: #526074; font-size: .62rem; }
.chat-sticker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(68px,1fr)); gap: 7px; }
.chat-sticker-grid > button { position: relative; min-height: 76px; padding: 4px; border: 1px solid transparent; border-radius: 9px; background: #fff; cursor: pointer; }
.chat-sticker-grid > button:hover,.chat-sticker-grid > button[aria-pressed="true"] { border-color: #1557ff; }
.chat-sticker-tray img { width: 100%; height: 66px; object-fit: contain; }
.sticker-manage-button,.sticker-delete-toolbar button { min-height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: .61rem; font-weight: 750; }
.sticker-manage-button,.sticker-delete-toolbar button:first-child { color: #5b687a; background: #e9f0f8; }
.sticker-delete-toolbar { display: inline-flex; gap: 6px; align-items: center; }
.sticker-delete-toolbar .sticker-delete-confirm { color: #fff; background: #b93b4f; }
.sticker-delete-toolbar .sticker-delete-confirm:disabled { cursor: not-allowed; opacity: .46; }
.sticker-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #8190a5; border-radius: 6px; color: #fff; background: rgba(255,255,255,.92); font-size: .65rem; font-weight: 900; }
.chat-sticker-delete-choice[aria-pressed="true"] .sticker-check { border-color: #b93b4f; background: #b93b4f; }
.chat-selected-sticker { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 50px; color: #526074; font-size: .63rem; }
.chat-selected-sticker img { width: 52px; height: 52px; object-fit: contain; }
.chat-selected-sticker button { min-height: 28px; padding: 0 8px; color: var(--danger); background: #fff0f1; }
.chat-selected-image { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; align-items: center; margin: 0 0 9px 100px; padding: 8px 10px; border-radius: 11px; background: #f2f7fd; }
.chat-selected-image img { width: 64px; height: 52px; border-radius: 8px; object-fit: cover; background: #e4ebf4; }
.chat-selected-image span { min-width: 0; }
.chat-selected-image strong,.chat-selected-image small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-selected-image strong { color: #273448; font-size: .67rem; }
.chat-selected-image small { margin-top: 3px; color: #728095; font-size: .58rem; }
.chat-selected-image button { min-height: 30px; padding: 0 9px; color: var(--danger); background: #fff0f1; }

.meme-section { padding-top: 4px; }
.meme-section + .meme-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.meme-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin: 0 20px 10px; }
.meme-section-head p { margin: 0 0 3px; color: #1557ff; font-size: .58rem; font-weight: 800; letter-spacing: .12em; }
.meme-section-head h3 { margin: 0; color: #202938; font-size: .92rem; letter-spacing: -.02em; }
.meme-section-head > span { color: #68758a; font-size: .62rem; font-variant-numeric: tabular-nums; }
.meme-section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: #68758a; font-size: .62rem; font-variant-numeric: tabular-nums; }
.meme-empty { margin: 0 20px 8px; padding: 18px; display: flex; flex-wrap: wrap; gap: 5px 12px; align-items: center; border: 1px dashed #b9cae1; border-radius: 12px; color: #637085; background: #f7fbff; }
.meme-empty strong { color: #2e3a4d; font-size: .72rem; }
.meme-empty span { flex: 1 1 260px; font-size: .64rem; }
.meme-empty button { min-height: 32px; padding: 0 11px; border-radius: 8px; color: #fff; background: #1557ff; cursor: pointer; font-size: .62rem; font-weight: 750; }
.meme-source-note { margin: 0 20px 12px; padding: 10px 12px; color: #536072; background: #f2f7fd; box-shadow: inset 0 0 0 1px rgba(21,87,255,.12); font-size: .65rem; line-height: 1.6; }
.meme-source-note a { color: #1557ff; text-decoration: underline; }
.meme-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(148px,1fr)); gap: 1px; padding: 1px 20px 24px; background: #edf0f5; }
.meme-item { position: relative; min-height: 178px; margin: 0; display: grid; grid-template-rows: minmax(136px,1fr) auto; overflow: hidden; background: #fff; }
.meme-item img { width: 100%; height: 100%; min-height: 136px; max-height: 240px; object-fit: contain; background: #fff; }
.meme-item figcaption { display: flex; justify-content: space-between; gap: 7px; align-items: center; padding: 8px 9px; color: #505966; font-size: .62rem; }
.meme-item figcaption button { min-height: 28px; padding: 0 8px; border-radius: 7px; color: #1557ff; background: #edf5ff; cursor: pointer; font-size: .6rem; font-weight: 700; }
.meme-item figcaption button:disabled { cursor: wait; opacity: .62; }
.meme-item-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.meme-item figcaption .meme-delete { color: #b93b4f; background: #fff0f2; }
.meme-item figcaption .meme-delete:hover { color: #fff; background: #b93b4f; }
.meme-gallery-saved { padding-bottom: 8px; background: #dce8f7; }
.meme-item-saved,.meme-item-saved img { background: #fafdff; }
.meme-item-saved[data-delete-selected="true"] { z-index: 1; outline: 3px solid #b93b4f; outline-offset: -3px; }
.meme-select-control { position: absolute; top: 8px; right: 8px; z-index: 2; min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; color: #4b586a; background: rgba(255,255,255,.94); box-shadow: 0 4px 16px rgba(20,35,60,.14); cursor: pointer; font-size: .62rem; font-weight: 750; }
.meme-select-control span { width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid #8190a5; border-radius: 5px; color: #fff; }
.meme-select-control[aria-pressed="true"] { color: #fff; background: #b93b4f; }
.meme-select-control[aria-pressed="true"] span { border-color: #fff; }
.meme-item img[data-community-media-ready="loading"],.chat-message-image[data-community-media-ready="loading"],.comment-media-card img[data-community-media-ready="loading"] { background: linear-gradient(100deg,#edf2f8 25%,#f8fbff 45%,#edf2f8 65%); }
.meme-item[data-animated="true"]::before { content: '动图'; position: absolute; top: 7px; left: 7px; z-index: 1; padding: 3px 6px; border-radius: 6px; color: #fff; background: rgba(16,27,45,.76); font-size: .55rem; }

.model-room-stage { display: grid; grid-template-columns: repeat(5,minmax(150px,1fr)); gap: 1px; padding: 0 20px 24px; overflow-x: auto; background: #e8edf4; }
.model-room { min-width: 156px; min-height: 330px; display: grid; grid-template-rows: 210px auto; background: #fff; cursor: pointer; }
.model-room:hover { outline: 2px solid #1557ff; outline-offset: -2px; }
.model-room img { width: 100%; height: 210px; object-fit: contain; object-position: center bottom; background: linear-gradient(180deg,#f4f7fb,#e9eef7); }
.model-room-copy { padding: 13px; }
.model-room-copy strong { display: block; font-size: .82rem; }
.model-room-copy span { display: block; margin: 5px 0 10px; color: var(--muted); font-size: .63rem; line-height: 1.5; }
.model-room-copy button { padding: 0; color: #1557ff; background: transparent; cursor: pointer; font-size: .64rem; font-weight: 750; }

.wardrobe-layout { display: grid; grid-template-columns: minmax(210px,280px) minmax(0,1fr); gap: 25px; padding: 20px 24px 34px; }
.wardrobe-preview { position: sticky; top: 12px; align-self: start; min-height: 300px; padding: 22px; overflow: hidden; border-radius: 18px; color: #fff; background: linear-gradient(145deg,#071a3b,#1557ff); }
.wardrobe-preview::after { content: ''; position: absolute; width: 180px; height: 180px; right: -60px; bottom: -70px; border-radius: 50%; background: rgba(117,211,255,.22); }
.wardrobe-avatar { width: 86px; height: 86px; margin-bottom: 16px; display: grid; place-items: center; overflow: hidden; border: 5px solid #83d0ff; border-radius: 26px; background: #fff; color: #1557ff; font-size: 1.4rem; font-weight: 850; }
.wardrobe-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wardrobe-preview h3 { margin: 0; font-size: 1.2rem; }
.wardrobe-preview p { margin: 7px 0; color: rgba(255,255,255,.75); font-size: .68rem; line-height: 1.55; }
.wardrobe-preview .appearance-badge { display: inline-flex; color: #071a3b; background: #9cddff; }
.wardrobe-controls { display: grid; gap: 20px; }
.wardrobe-group { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wardrobe-group h3 { margin: 0 0 10px; font-size: .78rem; }
.wardrobe-options { display: flex; flex-wrap: wrap; gap: 7px; }
.wardrobe-options button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: #5c5764; background: #fff; cursor: pointer; font-size: .67rem; }
.wardrobe-options button[aria-pressed="true"] { color: #1557ff; border-color: #1557ff; background: #edf5ff; font-weight: 750; }
.wardrobe-save { justify-self: start; min-height: 42px; padding: 0 18px; border-radius: 11px; color: #fff; background: #1557ff; cursor: pointer; font-size: .72rem; font-weight: 750; }
.composer-meme-shortcut { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; background: #f2f7fd; }
.composer-meme-shortcut button { color: #1557ff; background: transparent; cursor: pointer; font-size: .68rem; font-weight: 750; }
.composer-meme-shortcut span { color: #6a7483; font-size: .61rem; }

body[data-community-theme="paper-lab"] { --purple: #6e40ff; }
body[data-community-theme="arcade-night"] { --purple: #ee4561; }
body[data-community-theme="citrus-club"] { --purple: #d87500; }

@media (max-width: 1260px) {
  :root { --left-width: 246px; --right-width: 286px; }
  .site-header { grid-template-columns: auto 1fr auto; }
  .site-nav { justify-self: center; gap: 2px; }
  .site-nav a { padding-inline: 9px; font-size: .8rem; }
  .realm-rail { padding-inline: 16px; }
  .context-rail, .thread-right, .me-context { padding-inline: 15px; }
  .thread-reader, .me-content { padding-inline: 26px; }
}

@media (max-width: 1040px) {
  #feedView, .thread-layout, .me-layout { grid-template-columns: 224px minmax(0,1fr); }
  body[data-community-view-mode="chat"] #feedView { grid-template-columns: minmax(0,1fr); }
  .context-rail, .thread-right, .me-context { display: none; }
  .site-nav a:nth-child(4), .site-nav a:nth-child(5) { display: none; }
}

@media (max-width: 760px) {
  body { height: auto; min-height: 100vh; overflow: auto; }
  :root { --header-height: 64px; }
  .site-header { height: var(--header-height); padding: 0 14px; grid-template-columns: 1fr auto; }
  .brand { font-size: 1.25rem; }
  .site-nav, .header-icon { display: none; }
  .header-actions { grid-column: 2; }
  .account-button { min-width: 70px; min-height: 40px; padding-inline: 12px; }
  .mobile-menu-button { display: grid; }
  #communityApp { height: auto; min-height: calc(100vh - var(--header-height)); }
  .community-view, .community-view[data-active="true"] { height: auto; min-height: calc(100vh - var(--header-height)); }
  #feedView, .thread-layout, .me-layout { display: none; grid-template-columns: 1fr; }
  #feedView[data-active="true"], .thread-layout[data-active="true"], .me-layout[data-active="true"] { display: grid; }
  .realm-rail, .thread-left, .me-sidebar { display: none; }
  .discussion-desk { height: auto; display: block; }
  .discussion-desk[data-mode="chat"] { height: calc(100dvh - var(--header-height)); min-height: 520px; display: grid; grid-template-rows: auto auto minmax(0,1fr); }
  .discussion-desk[data-mode="chat"] .feed-scroll { height: auto; min-height: 0; overflow: hidden; }
  .desk-toolbar { padding: 14px; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .mobile-realm-tabs { grid-column: 1/-1; display: flex; gap: 6px; overflow-x: auto; }
  .mobile-realm-tabs button { min-height: 38px; padding: 0 12px; border-radius: 9px; color: var(--muted); background: var(--surface-soft); white-space: nowrap; font-size: .72rem; }
  .mobile-realm-tabs button[aria-pressed="true"] { color: var(--realm-ink, #fff); background: var(--realm-color); }
  .desk-title-block { grid-column: 1/-1; }
  .desk-title-block h1 { margin: 0; color: var(--ink); font-size: 1.32rem; letter-spacing: -.03em; }
  .desk-title-block p { margin-top: 3px; font-size: .62rem; }
  .discussion-desk[data-mode="chat"] .desk-title-block { grid-column: auto; min-width: 0; }
  .discussion-desk[data-mode="chat"] .chat-quick-actions { justify-content: flex-end; }
  .chat-quick-actions button { min-width: 44px; padding-inline: 11px; }
  .search-box { min-width: 0; }
  .primary-button { min-width: 44px; padding-inline: 12px; }
  #openComposer span { display: none; }
  .circle-strip { padding-inline: 14px; }
  .circle-chip { min-width: 136px; }
  .feed-controls { padding-inline: 14px; }
  .feed-controls .quiet-button { font-size: 0; width: 42px; padding: 0; }
  .feed-controls .quiet-button svg { font-size: .9rem; }
  .feed-scroll { overflow: visible; }
  .thread-row-inner { grid-template-columns: 38px minmax(0,1fr); padding: 15px 14px; min-height: 0; }
  .thread-row .user-avatar { width: 38px; height: 38px; }
  .row-actions { grid-column: 2; justify-self: end; margin-top: -40px; }
  .thread-bottom { align-items: flex-end; }
  .thread-counts { gap: 8px; }
  .thread-summary { font-size: .72rem; }
  .thread-reader, .me-content { overflow: visible; padding: 18px 16px 60px; }
  .reader-title { font-size: 1.55rem; }
  .reader-actions .danger-action { margin-left: 0; }
  .comment-children { margin-left: 22px; padding-left: 10px; }
  .inline-reply { margin-left: 0; }
  .me-content-header { align-items: flex-start; gap: 12px; }
  .me-mobile-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 12px 0 0; border-bottom: 1px solid var(--line); }
  .me-mobile-tabs button { flex: 0 0 auto; padding-inline: 11px; }
  .realm-stat-row { grid-template-columns: 90px 1fr; }
  .stat-numbers { grid-column: 1/-1; justify-content: flex-start; }
  .composer-sheet { padding: 20px 18px; }
  .deepseek-community-hero { min-height: 208px; margin: 0 14px 11px; padding: 18px 115px 16px 17px; background-position: 58% center; }
  .deepseek-community-hero h2 { font-size: 1.2rem; }
  .deepseek-community-hero p { font-size: .67rem; }
  .deepseek-hero-character { right: -24px; bottom: -138px; width: 142px; }
  .hero-credit { max-width: 38ch; font-size: .52rem; }
  .community-mode-tabs { padding-inline: 14px; }
  .chat-channel-bar,.chat-message-list,.chat-composer { padding-inline: 14px; }
  .chat-channel-bar { align-items: flex-start; flex-direction: column; gap: 6px; }
  .chat-message-body { max-width: 96%; }
  .chat-composer-main { grid-template-columns: 42px 42px minmax(0,1fr) 58px; gap: 6px; }
  .chat-composer textarea { min-width: 0; font-size: 16px; resize: none; }
  .chat-composer button { padding-inline: 8px; }
  .chat-media-button { justify-content: center; }
  .chat-media-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .chat-selected-sticker { margin-left: 0; }
  .chat-selected-image { margin-left: 0; grid-template-columns: 52px minmax(0,1fr) auto; }
  .chat-selected-image img { width: 52px; height: 46px; }
  .meme-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); padding-inline: 14px; }
  .meme-item { min-height: 154px; }
  .model-room-stage { padding-inline: 14px; }
  .wardrobe-layout { grid-template-columns: 1fr; padding-inline: 16px; }
  .wardrobe-preview { position: relative; top: auto; min-height: 236px; }
  .sl-companion-root { right: 8px !important; bottom: 8px !important; }
  .sl-companion-callout { display: none !important; }
  .sl-companion-dock { width: 64px !important; min-height: 66px !important; grid-template-columns: 64px !important; }
  .sl-companion-character { width: 64px !important; height: 64px !important; }
  .sl-companion-presence { left: -1px !important; bottom: -2px !important; min-height: 23px !important; padding-inline: 7px !important; font-size: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
