/* css/style.css */
/* 基础主题与移动端适配 */
:root {
  --bg: #eef1f6;
  --card: rgba(255, 255, 255, 0.84);
  --card-solid: #ffffff;
  --text: #172033;
  --muted: #7d8798;
  --line: rgba(23, 32, 51, 0.08);
  --brand: #146b5c;
  /* 品牌色的 rgb 分量，主题换色时一起换，阴影和描边就跟着变 */
  --brand-rgb: 20, 107, 92;
  --brand-light: #dff2ed;
  --danger: #c2414b;
  --shadow: 0 10px 30px rgba(37, 49, 72, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.56;
}

img {
  display: block;
  max-width: 100%;
}

#app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  isolation: isolate;
}

#page-container {
  position: relative;
  z-index: 1;
}

/* 页面转场：只滑内容区，底部导航不动 */
.page-shell {
  position: relative;
  width: 100%;
}

html,
body {
  overscroll-behavior-x: none;
}

#page-container.is-modal-open {
  z-index: 70;
}

body.is-social-sheet-open {
  overflow: hidden;
}

/* 固定在底部的背景纹理，让玻璃层有内容可折射 */
.liquid-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  /* 主题配色会整体替换这层背景 */
  background: var(--bg-image,
    radial-gradient(circle at 12% 12%, rgba(126, 180, 228, 0.30), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(236, 173, 188, 0.27), transparent 30%),
    radial-gradient(circle at 14% 92%, rgba(97, 194, 160, 0.30), transparent 34%),
    radial-gradient(circle at 88% 96%, rgba(247, 190, 101, 0.28), transparent 34%),
    linear-gradient(155deg, #f4f6fa 0%, #e9edf4 48%, #f6f2ed 100%));
}

/* 一层极淡的颗粒，让渐变更耐看，不至于像纯色块 */
.liquid-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.07;
  pointer-events: none;
}

.page {
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-header.compact {
  margin-bottom: 14px;
}

/* 三级 / 四级页面左上角的返回键 */
.page-header.has-back {
  justify-content: flex-start;
  gap: 12px;
}

.page-header.has-back > .mode-chip {
  margin-left: auto;
}

.nav-back {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: var(--surface, rgba(255, 255, 255, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 2px 7px rgba(37, 49, 72, 0.12);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, background-color 160ms ease;
}

.nav-back:active {
  background: var(--surface, rgba(255, 255, 255, 0.96));
  transform: scale(0.93);
}

body.theme-dark .nav-back {
  background: var(--surface, rgba(255, 255, 255, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 2px 7px rgba(0, 0, 0, 0.35);
}

/* 首页、聊天页右上角的圆形图标按钮 */
.nav-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: var(--surface, rgba(255, 255, 255, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 2px 7px rgba(37, 49, 72, 0.12);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, background-color 160ms ease;
}

.nav-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.nav-icon:active {
  background: var(--surface, rgba(255, 255, 255, 0.96));
  transform: scale(0.93);
}

body.theme-dark .nav-icon {
  background: var(--surface, rgba(255, 255, 255, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 2px 7px rgba(0, 0, 0, 0.35);
}

.home-header-right {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.home-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.home-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

/* 首页头像也放大，和「我的」页保持同一档尺寸 */
.home-page .home-profile .avatar,
.home-page .home-profile .avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 19px;
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.14);
  font-size: 13px;
}

.home-profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.home-profile-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-profile-copy span {
  color: var(--muted);
  font-size: 11px;
}

.home-category {
  position: relative;
  z-index: 20;
  flex: none;
}

.category-button {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(225, 232, 241, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(56, 64, 76, 0.08),
    0 8px 24px rgba(39, 49, 66, 0.12);
  color: #d52232;
  font-size: 12px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-button::after {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.52), transparent 42%, rgba(255, 255, 255, 0.2));
  content: "";
  pointer-events: none;
}

.category-button:active,
.home-category.is-open .category-button {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(56, 64, 76, 0.08),
    0 5px 18px rgba(39, 49, 66, 0.16);
  transform: scale(0.94);
}

.category-dock {
  position: absolute;
  top: 54px;
  right: 0;
  display: grid;
  width: min(310px, calc(100vw - 32px));
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.68);
  border-radius: 19px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.38), rgba(226, 234, 244, 0.22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 36px rgba(38, 48, 65, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.92);
  transform-origin: top right;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    clip-path 220ms ease;
  clip-path: inset(0 44% 0 44% round 19px);
}

.home-category.is-open .category-dock {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  clip-path: inset(0 round 19px);
}

.category-option {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 13px;
  background: transparent;
  color: #667184;
  font-size: 12px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.category-option.active {
  background: linear-gradient(145deg, #ef4351, #cf1f30);
  box-shadow: 0 5px 14px rgba(207, 31, 48, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: white;
  transform: translateY(-1px);
}

.page-header h1,
.login-hero h1 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.mode-chip {
  flex: none;
  padding: 5px 10px;
  border: 1px solid rgba(var(--brand-rgb), 0.12);
  border-radius: 999px;
  background: rgba(223, 242, 237, 0.72);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.feed-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
}

.feed-head span,
.section-title span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.center {
  text-align: center;
}

/* 卡片与信息流 */
.post-list,
.review-list {
  display: grid;
  gap: 12px;
}

.post-list {
  transition: opacity 140ms ease, transform 140ms ease, filter 140ms ease;
}

.post-list.is-filtering {
  opacity: 0.28;
  filter: blur(1px);
  transform: translateY(4px);
}

.post-card,
.form-card,
.profile-card,
.social-stats-card,
.menu-card,
.info-card,
.login-card,
.comment-section,
.review-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.post-card {
  padding: 16px;
}

/* 长列表只渲染视口附近的卡片，减少首次布局和滚动时的绘制量。 */
.post-list > .post-card,
.chat-list > .chat-list-item,
.social-sheet-list > *,
.title-sheet-row,
.comment-item,
.user-admin-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.post-detail {
  padding: 12px 12px 9px;
  box-shadow: none;
}

.post-meta,
.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-meta > div,
.comment-meta > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.post-meta strong,
.comment-meta strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta span,
.comment-meta span {
  color: var(--muted);
  font-size: 11px;
}

.follow-button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.follow-button.active {
  background: rgba(23, 32, 51, 0.07);
  color: var(--muted);
}

.follow-button:active {
  transform: scale(0.95);
}

.avatar,
.profile-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 13px;
  object-fit: cover;
}

.avatar.small {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.avatar-fallback,
.avatar-anonymous,
.profile-fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #d9eee8, #b9ddd3);
  color: #22665a;
  font-size: 11px;
  font-weight: 700;
}

.avatar-anonymous {
  background: linear-gradient(145deg, #e8eaf0, #d4d8e1);
  color: #606b7b;
}

.post-content {
  display: -webkit-box;
  margin: 13px 0 0;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.post-content.full {
  display: block;
  overflow: visible;
}

/* 首页信息流使用更紧凑的卡片与图片布局，一屏展示更多内容 */
.home-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.home-page .home-header {
  margin-bottom: 9px;
}

.home-page .home-profile {
  gap: 8px;
}

.home-page .home-profile .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.home-page .feed-head {
  margin-bottom: 7px;
}

.broadcast-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 218, 91, 0.52), rgba(255, 232, 151, 0.27) 72%, rgba(255, 239, 181, 0.20));
  color: #755500;
  font-size: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 5px 16px rgba(179, 132, 0, 0.08);
}

.broadcast-bar::before,
.broadcast-bar::after {
  position: absolute;
  right: 4px;
  left: 4px;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    rgba(205, 151, 0, 0) 0%,
    rgba(205, 151, 0, 0.82) 3%,
    rgba(205, 151, 0, 0.82) 97%,
    rgba(205, 151, 0, 0) 100%
  );
  content: "";
}

.broadcast-bar::before {
  top: 0;
}

.broadcast-bar::after {
  bottom: 0;
}

.broadcast-icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: #e4a900;
  filter: drop-shadow(0 1px 2px rgba(191, 135, 0, 0.18));
}

.broadcast-marquee {
  position: relative;
  display: block;
  height: 15px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.broadcast-text {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  white-space: nowrap;
  font-size: 11px;
  line-height: 15px;
  animation: broadcast-scroll 9s linear infinite;
  will-change: transform;
}

@keyframes broadcast-scroll {
  from {
    transform: translate3d(100vw, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

.home-page .feed-head strong {
  font-size: 14px;
}

.home-page .feed-head span {
  font-size: 11px;
}

.home-page .post-list {
  gap: 9px;
}

.home-page .post-card {
  padding: 12px 12px 9px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(37, 49, 72, 0.065);
}

.home-page .post-meta {
  gap: 8px;
}

.home-page .post-meta .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.home-page .post-content {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.52;
  -webkit-line-clamp: 3;
}

.home-page .post-images {
  gap: 4px;
  margin-top: 9px;
  border-radius: 10px;
}

.home-page .post-images img {
  height: 112px;
  border-radius: 8px;
}

.home-page .post-images.count-1 img {
  height: auto;
  max-height: 215px;
  aspect-ratio: 16 / 8.5;
}

.home-page .post-images.count-2 img {
  height: 105px;
}

.home-page .post-images.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page .post-images.count-3 img {
  height: auto;
  aspect-ratio: 1;
}

.home-page .post-actions {
  min-height: 30px;
  margin-top: 8px;
  padding-top: 7px;
}

.home-page .like-button,
.home-page .comment-button,
.home-page .text-button {
  font-size: 12px;
}

.home-page .like-button span {
  font-size: 15px;
}

/* 双列模式：首页和个人主页的动态使用紧凑双列卡片 */
body.double-column-mode .post-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

body.double-column-mode .post-list > .loading-card,
body.double-column-mode .post-list > .empty-card {
  grid-column: 1 / -1;
}

body.double-column-mode .post-list .post-card {
  min-width: 0;
  padding: 11px 10px 8px;
  border-radius: 15px;
}

body.double-column-mode .post-list .post-meta {
  min-width: 0;
  gap: 6px;
}

body.double-column-mode .post-list .post-meta > div {
  min-width: 0;
  flex: 1;
}

body.double-column-mode .post-list .post-meta .avatar {
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 9px;
}

body.double-column-mode .post-list .post-meta strong,
body.double-column-mode .post-list .post-meta > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.double-column-mode .post-list .post-meta .title-chips {
  max-height: 23px;
  flex-wrap: nowrap;
  overflow: hidden;
}

body.double-column-mode .post-list .post-meta .title-chip:nth-child(n + 3) {
  display: none;
}

body.double-column-mode .post-list .post-content {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.48;
  -webkit-line-clamp: 5;
}

body.double-column-mode .post-list .post-actions {
  min-height: 28px;
  margin-top: 7px;
  padding-top: 6px;
}

body.double-column-mode .post-list .post-social-actions {
  gap: 8px;
}

body.double-column-mode .post-list .like-button,
body.double-column-mode .post-list .comment-button {
  min-height: 26px;
  font-size: 10px;
}

body.double-column-mode .home-page .post-content {
  -webkit-line-clamp: 4;
}

body.double-column-mode .home-page .post-images {
  gap: 3px;
  margin-top: 7px;
}

body.double-column-mode .home-page .post-images img {
  height: auto;
  min-height: 78px;
  max-height: 116px;
  border-radius: 7px;
}

body.double-column-mode .home-page .post-images.count-1 img {
  aspect-ratio: 16 / 11;
}

body.double-column-mode .home-page .post-images.count-2 img,
body.double-column-mode .home-page .post-images.count-3 img {
  height: 76px;
  min-height: 0;
  aspect-ratio: 1;
}

body.double-column-mode .home-page .post-actions {
  min-height: 27px;
  margin-top: 6px;
  padding-top: 5px;
}

body.double-column-mode .home-page .post-social-actions {
  gap: 8px;
}

body.double-column-mode .home-page .like-button,
body.double-column-mode .home-page .comment-button {
  font-size: 10px;
}

body.double-column-mode .home-page .like-button span {
  font-size: 13px;
}

body.double-column-mode .post-list .post-actions .text-button {
  display: none;
}

.post-images {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 14px;
}

.post-images.count-1 {
  grid-template-columns: 1fr;
}

.post-images.count-2 {
  grid-template-columns: repeat(2, 1fr);
}

.post-images.count-3 {
  grid-template-columns: repeat(2, 1fr);
}

.post-images img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
}

.post-images.count-1 img {
  max-height: 360px;
  height: auto;
  aspect-ratio: 16 / 10;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.post-social-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.like-button,
.comment-button,
.text-button,
.icon-button {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.like-button span {
  color: #db6672;
  font-size: 17px;
}

.comment-button span {
  color: #6685a3;
  font-size: 14px;
}

.text-button {
  color: var(--brand);
}

.loading-card,
.empty-card,
.empty-comment {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 20px;
  border: 1px dashed rgba(23, 32, 51, 0.12);
  border-radius: 20px;
  background: var(--surface, rgba(255, 255, 255, 0.55));
  color: var(--muted);
  text-align: center;
}

.empty-card {
  gap: 4px;
}

.empty-card strong {
  color: var(--text);
}

/* 表单、发布与详情 */
.form-card,
.login-card,
.info-card {
  padding: 18px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
}

textarea,
select,
input[type="text"],
input[type="password"],
input:not([type]) {
  width: 100%;
  border: 1px solid rgba(23, 32, 51, 0.10);
  border-radius: 14px;
  outline: none;
  background: rgba(248, 249, 252, 0.92);
  font-size: 16px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

select,
input[type="text"],
input[type="password"],
input:not([type]) {
  height: 44px;
  padding: 0 13px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 19px,
    calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

textarea:focus,
select:focus,
input:focus {
  border-color: rgba(var(--brand-rgb), 0.42);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.08);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 15px;
  font-size: 14px;
}

.check-row.mini {
  margin: 0;
  font-size: 13px;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.form-tip {
  margin: -3px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.danger-button,
.upload-button,
.logout-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-weight: 600;
}

.primary-button {
  width: 100%;
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.18);
}

.primary-button.small {
  width: auto;
  min-height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

.secondary-button {
  width: 100%;
  margin-top: 4px;
  border: 1px solid rgba(var(--brand-rgb), 0.17);
  background: var(--brand-light);
  color: var(--brand);
}

.secondary-button.small {
  width: auto;
  min-height: 36px;
  padding: 0 18px;
  margin: 0;
  font-size: 13px;
}

.danger-button {
  min-height: 36px;
  padding: 0 18px;
  background: rgba(194, 65, 75, 0.10);
  color: var(--danger);
  font-size: 13px;
}

.upload-button {
  width: 100%;
  border: 1px dashed rgba(var(--brand-rgb), 0.32);
  background: rgba(223, 242, 237, 0.46);
  color: var(--brand);
  font-size: 14px;
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.image-preview:empty {
  display: none;
}

.preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #e7eaf0;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(19, 25, 35, 0.72);
  color: white;
  line-height: 1;
}

.detail-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 12px;
  text-align: center;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface, rgba(255, 255, 255, 0.66));
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.comment-section {
  margin-top: 12px;
  padding: 16px;
}

.comment-list {
  display: grid;
  gap: 4px;
}

.comment-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-item > p {
  margin: 9px 0 4px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-item .reply-context {
  margin: 8px 0 0;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(23, 32, 51, 0.045);
  color: var(--muted);
  font-size: 12px;
}

.comment-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.comment-form textarea {
  min-height: 64px;
}

.comment-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}

#reply-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

#reply-hint button {
  padding: 0;
  background: transparent;
  color: var(--brand);
}

/* 登录、我的与管理员审核 */
.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero {
  margin: 0 8px 24px;
}

.brand-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 21px;
  background: linear-gradient(145deg, #177665, #0e5549);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 30px rgba(var(--brand-rgb), 0.22);
  color: white;
  font-size: 26px;
  font-weight: 700;
}

.login-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-card h2,
.form-card h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.notice {
  margin: 15px 0;
  padding: 11px 12px;
  border: 1px solid rgba(var(--brand-rgb), 0.10);
  border-radius: 12px;
  background: rgba(223, 242, 237, 0.58);
  color: #31675e;
  font-size: 12px;
}

.admin-login {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-login summary {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.admin-login form {
  margin-top: 13px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.profile-avatar {
  /* 头像比卡片内区大，用负外边距抵消，卡片尺寸不变 */
  width: 72px;
  height: 72px;
  margin: -10px 0;
  border-radius: 24px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.16);
  font-size: 14px;
}

.profile-card h2 {
  margin: 0 0 1px;
  font-size: 17px;
  line-height: 1.25;
}

.profile-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.social-stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
  overflow: hidden;
}

.social-stats-card button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 14px 6px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.social-stats-card button:last-child {
  border-right: 0;
}

.social-stats-card span {
  color: var(--muted);
  font-size: 12px;
}

.social-stats-card strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.social-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: env(safe-area-inset-top);
  background: rgba(23, 32, 51, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.social-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.social-sheet {
  width: 100%;
  max-width: 680px;
  height: min(76vh, 620px);
  height: min(76dvh, 620px);
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.78);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(246, 248, 251, 0.96);
  box-shadow: 0 -18px 48px rgba(31, 42, 62, 0.18);
  transform: translateY(100%);
  transition: transform 240ms cubic-bezier(0.2, 0.78, 0.2, 1);
}

.social-overlay.is-open .social-sheet {
  transform: translateY(0);
}

.social-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 11px;
  border-bottom: 1px solid var(--line);
}

.social-sheet-header h2 {
  margin: 1px 0 0;
  font-size: 19px;
}

.social-sheet-header button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(23, 32, 51, 0.055);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.social-sheet-list {
  display: grid;
  max-height: calc(min(76vh, 620px) - 70px);
  max-height: calc(min(76dvh, 620px) - 70px);
  gap: 8px;
  overflow-y: auto;
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.social-post-item,
.social-user-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  background: var(--surface, rgba(255, 255, 255, 0.86));
  box-shadow: 0 5px 16px rgba(37, 49, 72, 0.055);
  text-align: left;
}

/* 点头像或名字进对方主页 */
.social-user-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.social-user-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.social-user-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-user-copy span {
  color: var(--muted);
  font-size: 10px;
}

.social-post-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.social-post-copy strong,
.social-user-item strong {
  font-size: 13px;
}

.social-post-copy > span {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.social-post-copy small,
.social-user-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.social-post-item img {
  width: 66px;
  height: 66px;
  flex: none;
  border-radius: 11px;
  object-fit: cover;
}

.social-user-item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.contact-creator-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(var(--brand-rgb), 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(223, 242, 237, 0.48));
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 5px 16px rgba(var(--brand-rgb), 0.07);
}

.social-sheet.contact-sheet {
  height: auto;
  min-height: 250px;
  max-height: 82vh;
  max-height: 82dvh;
}

.contact-sheet-content {
  display: grid;
  gap: 11px;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}

.contact-sheet-content > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.contact-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
}

.contact-row > span {
  color: var(--muted);
  font-size: 12px;
}

.contact-row > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row > button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

@media (max-height: 620px) {
  .social-overlay {
    align-items: stretch;
    padding-top: 0;
  }

  .social-sheet {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .social-sheet-list {
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
  }
}

.menu-card {
  margin-top: 12px;
  overflow: hidden;
}

.settings-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

/**
 * 设置页由多层玻璃卡片堆叠：层与层之间留缝，
 * 每层底边和下一层顶边的左右两端各收一道大弧，两端就是两条相对的弧线。
 */
.settings-layer {
  position: relative;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    var(--shadow);
}

.settings-layer + .settings-layer {
  margin-top: 12px;
}

.settings-layer:first-of-type {
  border-radius: 18px 18px 34px 34px;
}

.settings-layer:last-of-type {
  border-radius: 34px 34px 18px 18px;
}

.settings-layer-head {
  padding: 2px 2px 10px;
}

.settings-layer-head h2 {
  margin: 0 0 3px;
  font-size: 17px;
}

.settings-layer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.settings-layer button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  background: transparent;
  text-align: left;
}

.settings-layer-head + button,
.settings-layer button + button {
  border-top: 1px solid var(--line);
}

.settings-layer button .settings-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

/* 账号信息那一行：小头像 + 文案 */
.settings-account {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

/* 账号信息页 */
.account-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.account-card {
  overflow: hidden;
  padding: 2px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.account-row {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.account-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.account-copy strong {
  font-size: 13px;
  white-space: nowrap;
}

.account-copy small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

/* 昵称那一行改为上下排：标题、输入框、说明，全部左对齐 */
.account-row-stack {
  display: block;
}

.account-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  white-space: nowrap;
}

.account-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.account-code {
  flex: none;
  padding: 9px 16px;
  border: 1px solid rgba(var(--brand-rgb), 0.24);
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  -webkit-tap-highlight-color: transparent;
}

.account-code:active {
  transform: scale(0.96);
}

.avatar-picker {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.avatar-preview {
  display: flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background: var(--brand-light);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 4px 12px rgba(37, 49, 72, 0.12);
  color: var(--muted);
  font-size: 12px;
  transition: opacity 180ms ease;
}

.avatar-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview.is-loading {
  opacity: 0.5;
}

.avatar-edit {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(var(--brand-rgb), 0.35);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.account-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 32, 51, 0.04);
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

.account-input:focus {
  border-color: rgba(var(--brand-rgb), 0.45);
  outline: none;
}

body.theme-dark .account-input {
  background: var(--surface, rgba(255, 255, 255, 0.06));
  color: var(--text);
}

body.theme-dark .avatar-preview {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

/* 关于页 */
.about-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.about-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 24px 18px 44px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 10% -10%, rgba(74, 163, 255, 0.20), rgba(255, 255, 255, 0) 58%),
    radial-gradient(120% 140% at 92% 112%, rgba(var(--brand-rgb), 0.16), rgba(255, 255, 255, 0) 62%),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.about-mark {
  display: block;
  font-size: 62px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(135deg, #172033 0%, #0b62e6 58%, #146b5c 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.about-sign {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.about-page .settings-layer {
  border-radius: 18px;
}

.about-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
}

.about-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.about-copy strong {
  font-size: 13px;
  white-space: nowrap;
}

.about-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.about-value {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.about-row + button {
  border-top: 1px solid var(--line);
}

.about-footnote {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.update-card {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.update-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.update-card strong {
  font-size: 15px;
}

.update-card header span {
  color: var(--muted);
  font-size: 11px;
}

.update-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.75;
}

.update-card li + li {
  margin-top: 4px;
}

body.theme-dark .about-hero {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 140% at 10% -10%, rgba(74, 163, 255, 0.24), rgba(255, 255, 255, 0) 58%),
    radial-gradient(120% 140% at 92% 112%, rgba(var(--brand-rgb), 0.24), rgba(255, 255, 255, 0) 62%),
    var(--card);
}

body.theme-dark .about-mark {
  background: linear-gradient(135deg, #eef2f7 0%, #5cafff 58%, #2aa38c 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

body.theme-dark .update-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--card);
}

/* 找人页 */
.search-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 5px 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.search-bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.search-bar button {
  flex: none;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.search-tip {
  margin: 8px 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.user-row-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.user-row-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.user-row-copy strong {
  font-size: 14px;
  white-space: nowrap;
}

.user-row-copy small {
  color: var(--muted);
  font-size: 10px;
}

.friend-button {
  min-height: 32px;
  flex: none;
  padding: 0 14px;
  border: 1px solid rgba(var(--brand-rgb), 0.28);
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.friend-button.active {
  border-color: transparent;
  background: rgba(23, 32, 51, 0.06);
  color: var(--muted);
}

/* 个人主页 */
.user-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.user-profile-card {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.user-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-head .avatar,
.user-profile-head .avatar-fallback {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 13px;
}

.user-profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.user-profile-copy strong {
  font-size: 16px;
}

.user-profile-copy small {
  color: var(--muted);
  font-size: 11px;
}

body.theme-dark .search-bar,
body.theme-dark .user-row,
body.theme-dark .user-profile-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--card);
}

body.theme-dark .friend-button {
  border-color: rgba(var(--brand-rgb), 0.5);
}

.settings-layer button strong {
  font-size: 13px;
}

.settings-layer button small {
  color: var(--muted);
  font-size: 10px;
}

.settings-chevron {
  color: #9aa2af;
  font-size: 19px;
}

.preferences-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.appearance-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.personalize-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

/* 主题颜色选择 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 14px;
  background: rgba(23, 32, 51, 0.04);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease, transform 160ms ease;
}

.theme-swatch:active {
  transform: scale(0.95);
}

.theme-dot {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(16, 24, 40, 0.18);
}

/* 色卡里的小卡片，示意背景与卡片底色的搭配 */
.theme-dot i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: var(--swatch-card, rgba(255, 255, 255, 0.85));
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
}

.theme-name {
  color: var(--muted);
  font-size: 10px;
}

.theme-swatch.active {
  background: var(--brand-light);
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

.theme-swatch.active .theme-name {
  color: var(--brand);
  font-weight: 600;
}

body.theme-dark .theme-swatch {
  background: var(--surface, rgba(255, 255, 255, 0.06));
}

body.theme-dark .theme-swatch.active {
  background: var(--brand-light);
}

.preferences-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.preference-row {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.preference-row:last-child {
  border-bottom: 0;
}

.preference-row .preference-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.preference-row strong {
  font-size: 13px;
}

.preference-row small {
  color: var(--muted);
  font-size: 10px;
}

/* 上下排的偏好行：标题在上，控件在下 */
.preference-row-stack {
  display: block;
}

.preference-row-stack .segmented {
  width: 100%;
  margin-top: 10px;
}

/**
 * iOS 液态玻璃开关
 * 轨道是半透明毛玻璃，圆钮自带高光与菲涅尔边缘，
 * 拨动时圆钮拉伸、玻璃有一道扫光，松开后回弹。
 */
.glass-switch {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 30px;
  flex: none;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.glass-switch input[type="checkbox"] {
  position: absolute;
  z-index: 2;
  /* 圆钮比轨道大一圈，点按区域跟着外扩，戳到露出部分也能切换 */
  inset: -5px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: none;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05) 46%, rgba(20, 28, 45, 0.08)),
    rgba(122, 132, 150, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 3px rgba(14, 22, 38, 0.22),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(16, 24, 40, 0.10);
  transition: box-shadow 240ms ease, background-color 240ms ease;
}

/* 扫光单独一层裁切，避免把圆钮的投影一起切掉 */
.switch-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

/* 玻璃上的扫光，只在用户拨动的那一下出现 */
.switch-glow::after {
  content: '';
  position: absolute;
  inset: -60% -70%;
  background: linear-gradient(102deg, transparent 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%);
  opacity: 0;
  transform: translate3d(-42%, 0, 0);
  pointer-events: none;
}

.glass-switch.is-toggling .switch-glow::after {
  animation: switch-sheen 620ms ease-out;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  /* 扁胶囊：38 × 24，宽高比 1.6，上下两条平行直边，左右各一个半圆 */
  width: 38px;
  height: 24px;
  border-radius: 999px;
  /* 真正透明：几乎不填白，颜色全部来自身后的轨道 */
  background: var(--surface, rgba(255, 255, 255, 0.05));
  box-shadow:
    0 3px 8px rgba(16, 24, 40, 0.16),
    0 1px 2px rgba(16, 24, 40, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(120, 145, 180, 0.34),
    inset 0 0 8px rgba(255, 255, 255, 0.16);
  transform: translate3d(0, 0, 0);
  transition:
    transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
    width 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* 折射层：关闭时只有底部一点聚光，打开时底部整片透出蓝光 */
.switch-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 150% at 50% 125%, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}

.glass-switch input[type="checkbox"]:checked + .switch-track .switch-thumb::before {
  background:
    radial-gradient(140% 160% at 50% 126%, rgba(126, 194, 255, 0.9), rgba(126, 194, 255, 0) 66%),
    radial-gradient(100% 130% at 50% -14%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 56%);
  mix-blend-mode: screen;
}

/* 只留一小块高光，不能盖住整块玻璃，否则就不透了 */
.switch-thumb::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 8px;
  width: 15px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  filter: blur(0.6px);
  pointer-events: none;
}

.glass-switch input[type="checkbox"]:checked + .switch-track {
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.02) 48%, rgba(6, 32, 72, 0.18)),
    linear-gradient(135deg, #4aa3ff, #0b62e6);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.44),
    inset 0 1px 3px rgba(6, 32, 72, 0.32),
    inset 0 -1px 1px rgba(255, 255, 255, 0.34),
    0 2px 10px rgba(11, 98, 230, 0.34);
}

.glass-switch input[type="checkbox"]:checked + .switch-track .switch-thumb {
  transform: translate3d(14px, 0, 0);
  /* 蓝色穿过玻璃后从底部和两侧折出来 */
  box-shadow:
    0 4px 12px rgba(11, 98, 230, 0.3),
    0 1px 2px rgba(6, 32, 72, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -4px 9px rgba(11, 98, 230, 0.55),
    inset 2px 0 8px rgba(74, 163, 255, 0.34),
    inset -2px 0 8px rgba(11, 98, 230, 0.40);
}

.glass-switch input[type="checkbox"]:active + .switch-track {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 2px 4px rgba(14, 22, 38, 0.26),
    inset 0 -1px 1px rgba(255, 255, 255, 0.45);
}

.glass-switch input[type="checkbox"]:active + .switch-track .switch-thumb {
  width: 42px;
}

.glass-switch input[type="checkbox"]:checked:active + .switch-track .switch-thumb {
  width: 42px;
  transform: translate3d(10px, 0, 0);
}

.glass-switch input[type="checkbox"]:focus-visible + .switch-track {
  box-shadow:
    0 0 0 3px rgba(11, 98, 230, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 1px 3px rgba(14, 22, 38, 0.2);
}

@keyframes switch-sheen {
  0% { opacity: 0; transform: translate3d(-42%, 0, 0); }
  35% { opacity: 0.55; }
  100% { opacity: 0; transform: translate3d(42%, 0, 0); }
}

body.theme-dark .switch-track {
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 46%, rgba(0, 0, 0, 0.24)),
    rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    inset 0 -1px 1px rgba(255, 255, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

body.theme-dark .glass-switch input[type="checkbox"]:checked + .switch-track {
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%, rgba(0, 0, 0, 0.2)),
    linear-gradient(135deg, #5cafff, #1273f0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 -1px 1px rgba(255, 255, 255, 0.2),
    0 2px 10px rgba(18, 115, 240, 0.4);
}

body.theme-dark .switch-thumb {
  background: var(--surface, rgba(255, 255, 255, 0.05));
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.36),
    0 1px 2px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(90, 110, 140, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.08);
}

/* 液体玻璃分段控件：白色药丸随选择滑动，按钮数量由 --segment-count 决定 */
.segmented {
  position: relative;
  display: grid;
  width: 132px;
  flex: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(23, 32, 51, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 2px rgba(14, 22, 38, 0.10);
}

.segmented .segment-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px - (var(--segment-count, 3) - 1) * 4px) / var(--segment-count, 3));
  border-radius: 9px;
  background: var(--surface, rgba(255, 255, 255, 0.96));
  box-shadow:
    0 2px 6px rgba(37, 49, 72, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 0 0.5px rgba(16, 24, 40, 0.05);
  transform: translate3d(calc(var(--segment-index, 1) * (100% + 4px)), 0, 0);
  transition: transform 380ms cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}

.segmented button {
  position: relative;
  z-index: 1;
  min-height: 30px;
  padding: 0 4px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  transition: color 200ms ease;
}

.segmented button.active {
  color: var(--brand);
  font-weight: 600;
}

body.theme-dark .segmented {
  background: var(--surface, rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.theme-dark .segmented .segment-pill {
  background: rgba(238, 242, 247, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.theme-dark .segmented button.active {
  color: #0d5c4f;
}

/**
 * 高信息模式：全站密度优先。
 * 隐藏装饰标题和非必要广播，压缩卡片、列表、聊天与底部导航间距。
 */
body.high-info-mode {
  --shadow: 0 4px 15px rgba(37, 49, 72, 0.065);
}

body.high-info-mode .page {
  padding: calc(6px + env(safe-area-inset-top)) 10px calc(74px + env(safe-area-inset-bottom));
}

body.high-info-mode .page-header {
  min-height: 30px;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 5px;
}

/* 各页标题只承担说明作用，高信息模式下隐藏，返回与功能按钮继续保留。 */
body.high-info-mode .page-header > div:not(.home-header-right) {
  display: none;
}

body.high-info-mode .page-header.has-back {
  justify-content: flex-start;
}

body.high-info-mode .nav-back,
body.high-info-mode .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

body.high-info-mode .nav-icon svg {
  width: 16px;
  height: 16px;
}

body.high-info-mode .broadcast-bar {
  display: none;
}

body.high-info-mode .feed-head,
body.high-info-mode .section-title {
  margin-bottom: 5px;
}

body.high-info-mode .feed-head strong,
body.high-info-mode .section-title strong {
  font-size: 13px;
}

body.high-info-mode .feed-head span,
body.high-info-mode .section-title span {
  font-size: 10px;
}

/* 首页头部只留下搜索与分类，扩大信息流可视区域。 */
body.high-info-mode .home-header {
  align-items: center;
  margin-bottom: 5px;
}

body.high-info-mode .home-header-right {
  gap: 6px;
}

body.high-info-mode .category-button {
  width: 38px;
  height: 38px;
  font-size: 10px;
}

body.high-info-mode .category-dock {
  top: 44px;
}

/* 信息流卡片与图片压缩 */
body.high-info-mode .post-list,
body.high-info-mode .review-list {
  gap: 6px;
}

body.high-info-mode .post-list .post-card,
body.high-info-mode .review-card > .post-card {
  padding: 9px 10px 7px;
  border-radius: 14px;
}

body.high-info-mode .post-meta,
body.high-info-mode .comment-meta {
  gap: 6px;
}

body.high-info-mode .post-meta .avatar,
body.high-info-mode .comment-meta .avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

body.high-info-mode .post-meta strong,
body.high-info-mode .comment-meta strong {
  font-size: 12px;
}

body.high-info-mode .post-meta span,
body.high-info-mode .comment-meta span {
  font-size: 9px;
}

body.high-info-mode .post-meta .title-chips {
  max-height: 22px;
  flex-wrap: nowrap;
  overflow: hidden;
}

body.high-info-mode .post-meta .title-chip:nth-child(n + 3) {
  display: none;
}

body.high-info-mode .post-content {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 4;
}

body.high-info-mode .post-images {
  gap: 3px;
  margin-top: 7px;
  border-radius: 9px;
}

body.high-info-mode .post-images img {
  height: 104px;
  border-radius: 7px;
}

body.high-info-mode .post-images.count-1 img {
  max-height: 160px;
  aspect-ratio: 16 / 9;
}

body.high-info-mode .post-images.count-2 img,
body.high-info-mode .post-images.count-3 img {
  height: 78px;
}

body.high-info-mode .post-actions {
  min-height: 27px;
  margin-top: 6px;
  padding-top: 5px;
}

body.high-info-mode .post-social-actions {
  gap: 8px;
}

body.high-info-mode .like-button,
body.high-info-mode .comment-button,
body.high-info-mode .text-button {
  font-size: 10px;
}

body.high-info-mode .like-button span {
  font-size: 13px;
}

body.high-info-mode .comment-button span {
  font-size: 12px;
}

/* 表单、搜索与通用卡片 */
body.high-info-mode .form-card,
body.high-info-mode .login-card,
body.high-info-mode .comment-section,
body.high-info-mode .preferences-card,
body.high-info-mode .account-card,
body.high-info-mode .user-profile-card,
body.high-info-mode .user-admin-card,
body.high-info-mode .spark-hero {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

body.high-info-mode .form-card {
  padding: 11px;
}

body.high-info-mode .login-card {
  padding: 12px;
}

body.high-info-mode .login-hero {
  margin: 0 5px 12px;
}

body.high-info-mode .brand-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 15px;
  font-size: 20px;
}

body.high-info-mode .login-hero h1 {
  font-size: 24px;
}

body.high-info-mode .login-hero p,
body.high-info-mode .login-card > .muted {
  margin-top: 4px;
  font-size: 10px;
}

body.high-info-mode .login-card h2,
body.high-info-mode .form-card h2 {
  margin-bottom: 3px;
  font-size: 17px;
}

body.high-info-mode .field {
  margin-bottom: 9px;
}

body.high-info-mode textarea {
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
}

body.high-info-mode select,
body.high-info-mode input[type="text"],
body.high-info-mode input[type="password"],
body.high-info-mode input:not([type]) {
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14px;
}

body.high-info-mode .field > span {
  margin-bottom: 4px;
  font-size: 11px;
}

body.high-info-mode .notice {
  margin: 8px 0;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 10px;
}

body.high-info-mode .admin-login {
  margin-top: 9px;
  padding-top: 8px;
}

body.high-info-mode .admin-login form {
  margin-top: 7px;
}

body.high-info-mode .check-row {
  gap: 6px;
  margin-bottom: 9px;
  font-size: 12px;
}

body.high-info-mode .check-row input {
  width: 15px;
  height: 15px;
}

body.high-info-mode .form-tip {
  margin-bottom: 9px;
  font-size: 10px;
}

body.high-info-mode .loading-card,
body.high-info-mode .empty-card,
body.high-info-mode .empty-comment {
  min-height: 78px;
  padding: 10px;
  border-radius: 12px;
}

body.high-info-mode .search-bar {
  gap: 5px;
  margin-bottom: 7px;
  padding: 3px 3px 3px 10px;
  border-radius: 12px;
}

body.high-info-mode .search-bar input {
  font-size: 13px;
}

body.high-info-mode .search-bar button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 11px;
}

body.high-info-mode .search-tip {
  margin: 4px 2px;
  font-size: 10px;
  line-height: 1.5;
}

body.high-info-mode .user-row {
  gap: 7px;
  margin-bottom: 5px;
  padding: 8px 10px;
  border-radius: 12px;
}

body.high-info-mode .user-row .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

body.high-info-mode .friend-button,
body.high-info-mode .follow-button {
  min-height: 27px;
  padding: 0 10px;
  font-size: 10px;
}

/* 我的页面 */
body.high-info-mode .profile-card {
  gap: 8px;
  padding: 9px;
  border-radius: 14px;
}

body.high-info-mode .profile-card .profile-avatar {
  width: 54px;
  height: 54px;
  margin: -4px 0;
  border-radius: 18px;
  font-size: 12px;
}

body.high-info-mode .profile-card h2 {
  font-size: 15px;
}

body.high-info-mode .profile-card p {
  font-size: 10px;
}

body.high-info-mode .profile-titles {
  margin-top: 0;
}

body.high-info-mode .profile-titles .title-chip {
  padding: 2px 7px;
  font-size: 9px;
}

body.high-info-mode .social-stats-card {
  margin-top: 6px;
  border-radius: 13px;
}

body.high-info-mode .social-stats-card button {
  gap: 1px;
  padding: 7px 4px;
}

body.high-info-mode .social-stats-card span {
  font-size: 10px;
}

body.high-info-mode .social-stats-card strong {
  font-size: 18px;
}

body.high-info-mode .menu-card {
  margin-top: 7px;
  border-radius: 14px;
}

body.high-info-mode .menu-card button {
  min-height: 42px;
  padding: 0 11px;
  font-size: 12px;
}

body.high-info-mode .mine-page .info-card {
  display: none;
}

/* 详情与评论 */
body.high-info-mode .detail-header {
  grid-template-columns: 30px 1fr 30px;
  min-height: 32px;
  margin-bottom: 5px;
}

body.high-info-mode .detail-header strong {
  display: none;
}

body.high-info-mode .detail-header .icon-button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 23px;
}

body.high-info-mode .post-detail {
  padding: 9px 8px 7px;
}

body.high-info-mode .comment-section {
  margin-top: 7px;
  padding: 9px 10px;
}

body.high-info-mode .comment-item {
  padding: 7px 0;
}

body.high-info-mode .comment-item > p {
  margin: 5px 0 2px;
  font-size: 12px;
  line-height: 1.45;
}

body.high-info-mode .comment-item .reply-context {
  margin-top: 5px;
  padding: 4px 7px;
  font-size: 10px;
}

body.high-info-mode .comment-form {
  margin-top: 8px;
  padding-top: 8px;
}

body.high-info-mode .comment-form textarea {
  min-height: 46px;
}

body.high-info-mode .comment-form-bottom {
  margin-top: 5px;
}

/* 聊天页 */
body.high-info-mode .chat-list {
  gap: 5px;
}

body.high-info-mode .chat-list-item {
  gap: 8px;
  padding: 8px 10px;
  border-radius: 13px;
}

body.high-info-mode .chat-room-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 11px;
}

body.high-info-mode .chat-room-copy strong {
  font-size: 12px;
}

body.high-info-mode .chat-room-copy small {
  font-size: 10px;
}

body.high-info-mode .chat-room-arrow {
  font-size: 18px;
}

body.high-info-mode .chat-section-title {
  margin: 8px 3px 5px;
  font-size: 10px;
}

body.high-info-mode .chat-note {
  margin-top: 7px;
  font-size: 9px;
}

body.high-info-mode .chat-room-card {
  height: calc(100vh - 118px);
  height: calc(100dvh - 118px);
  min-height: 300px;
  border-radius: 15px;
}

body.high-info-mode .chat-room-header {
  min-height: 38px;
  padding: 0 7px;
}

body.high-info-mode .chat-room-header button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 21px;
}

body.high-info-mode .chat-messages {
  gap: 6px;
  padding: 8px;
}

body.high-info-mode .chat-message {
  max-width: 88%;
  gap: 2px;
}

body.high-info-mode .chat-bubble {
  padding: 6px 9px;
  border-radius: 5px 12px 12px;
  font-size: 12px;
  line-height: 1.45;
}

body.high-info-mode .chat-message.self .chat-bubble {
  border-radius: 12px 5px 12px 12px;
}

body.high-info-mode .chat-message > span {
  font-size: 8px;
}

body.high-info-mode .chat-compose {
  gap: 5px;
  padding: 6px;
}

body.high-info-mode .chat-compose input {
  height: 34px !important;
  border-radius: 10px !important;
}

body.high-info-mode .chat-compose button {
  min-width: 46px;
  height: 34px;
  border-radius: 10px;
  font-size: 11px;
}

body.high-info-mode .chat-plus {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

body.high-info-mode .chat-panel.is-open {
  padding: 7px 8px 0;
}

body.high-info-mode .chat-panel > button {
  gap: 2px;
  padding: 7px 3px;
  border-radius: 10px;
}

body.high-info-mode .chat-panel > button span {
  font-size: 17px;
}

/* 设置、界面和主题 */
body.high-info-mode .settings-layer {
  padding: 8px 10px;
  border-radius: 21px;
}

body.high-info-mode .settings-layer + .settings-layer {
  margin-top: 6px;
}

body.high-info-mode .settings-layer:first-of-type {
  border-radius: 14px 14px 21px 21px;
}

body.high-info-mode .settings-layer:last-of-type {
  border-radius: 21px 21px 14px 14px;
}

body.high-info-mode .settings-layer-head {
  padding: 0 1px 5px;
}

body.high-info-mode .settings-layer-head h2 {
  font-size: 14px;
}

body.high-info-mode .settings-layer-head p {
  font-size: 9px;
}

body.high-info-mode .settings-layer button {
  gap: 8px;
  padding: 7px 1px;
}

body.high-info-mode .settings-layer button strong {
  font-size: 12px;
}

body.high-info-mode .settings-layer button small {
  font-size: 9px;
}

body.high-info-mode .settings-account {
  gap: 7px;
}

body.high-info-mode .settings-account .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

body.high-info-mode .preference-row {
  min-height: 48px;
  gap: 9px;
  padding: 7px 9px;
}

body.high-info-mode .preference-row strong {
  font-size: 11px;
}

body.high-info-mode .preference-row small {
  font-size: 9px;
}

body.high-info-mode .preference-row-stack .segmented {
  margin-top: 6px;
}

body.high-info-mode .segmented {
  min-height: 32px;
}

body.high-info-mode .glass-switch {
  width: 51px;
  height: 27px;
}

body.high-info-mode .theme-grid {
  gap: 5px;
  margin-top: 7px;
}

body.high-info-mode .theme-swatch {
  gap: 3px;
  padding: 6px 3px;
  border-radius: 10px;
}

body.high-info-mode .theme-dot {
  width: 25px;
  height: 25px;
}

body.high-info-mode .theme-dot i {
  width: 13px;
  height: 13px;
  border-radius: 5px;
}

body.high-info-mode .theme-name {
  font-size: 9px;
}

body.high-info-mode .account-row {
  min-height: 54px;
  gap: 8px;
  padding: 8px 0;
}

body.high-info-mode .account-card {
  padding: 0 10px 10px;
}

body.high-info-mode .account-row input,
body.high-info-mode .account-input {
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 12px;
}

/* 个人主页与关于页 */
body.high-info-mode .user-profile-card {
  margin-bottom: 7px;
  padding: 9px;
}

body.high-info-mode .user-profile-head {
  gap: 8px;
}

body.high-info-mode .user-profile-head .avatar,
body.high-info-mode .user-profile-head .avatar-fallback {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

body.high-info-mode .user-profile-copy strong {
  font-size: 14px;
}

body.high-info-mode .user-profile-copy small {
  font-size: 9px;
}

body.high-info-mode .about-hero {
  margin-bottom: 7px;
  padding: 12px 12px 24px;
  border-radius: 14px;
}

body.high-info-mode .about-mark {
  font-size: 42px;
}

body.high-info-mode .about-sign {
  right: 12px;
  bottom: 7px;
  font-size: 9px;
}

body.high-info-mode .about-row {
  gap: 8px;
  padding: 7px 1px;
}

body.high-info-mode .about-copy strong {
  font-size: 12px;
}

body.high-info-mode .about-copy small,
body.high-info-mode .about-value {
  font-size: 9px;
}

body.high-info-mode .about-footnote {
  margin-top: 7px;
  font-size: 9px;
}

body.high-info-mode .update-card {
  margin-bottom: 7px;
  padding: 10px;
  border-radius: 13px;
}

body.high-info-mode .update-card header {
  margin-bottom: 5px;
}

body.high-info-mode .update-card strong {
  font-size: 13px;
}

body.high-info-mode .update-card ul {
  padding-left: 15px;
  font-size: 10px;
  line-height: 1.5;
}

/* 管理端与审核列表 */
body.high-info-mode .admin-page .page-header {
  margin-bottom: 4px;
}

body.high-info-mode .admin-tabs {
  gap: 3px;
  margin-bottom: 7px;
  padding: 3px;
  border-radius: 11px;
}

body.high-info-mode .admin-tabs button {
  height: 31px;
  border-radius: 8px;
  font-size: 11px;
}

body.high-info-mode .review-card {
  padding: 0 9px 8px;
  border-radius: 13px;
}

body.high-info-mode .review-card > .post-card {
  padding: 8px 0;
}

body.high-info-mode .review-actions {
  gap: 6px;
  padding-top: 7px;
}

body.high-info-mode .user-admin-list {
  gap: 5px;
}

body.high-info-mode .user-admin-main {
  gap: 7px;
  padding: 8px 9px;
}

body.high-info-mode .user-status {
  padding: 3px 6px;
  font-size: 9px;
}

body.high-info-mode .ban-duration-picker {
  padding: 7px 9px 9px;
}

body.high-info-mode .ban-duration-picker button {
  min-height: 30px;
  font-size: 10px;
}

/* 底部弹层、称号与火花页 */
body.high-info-mode .social-sheet {
  height: min(84vh, 700px);
  height: min(84dvh, 700px);
  border-radius: 18px 18px 0 0;
}

body.high-info-mode .social-sheet-header {
  padding: 9px 11px 7px;
}

body.high-info-mode .social-sheet-header h2 {
  font-size: 15px;
}

body.high-info-mode .social-sheet-header button {
  width: 29px;
  height: 29px;
  font-size: 18px;
}

body.high-info-mode .social-sheet-list {
  max-height: calc(min(84vh, 700px) - 54px);
  max-height: calc(min(84dvh, 700px) - 54px);
  gap: 5px;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
}

body.high-info-mode .social-post-item,
body.high-info-mode .social-user-item {
  gap: 7px;
  padding: 8px;
  border-radius: 11px;
}

body.high-info-mode .social-post-item img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

body.high-info-mode .titles-sheet-tip {
  margin: 0 11px 5px;
  font-size: 9px;
}

body.high-info-mode .titles-sheet-list {
  padding: 0 11px 12px;
}

body.high-info-mode .title-sheet-row {
  gap: 4px;
  margin-bottom: 5px;
  padding: 7px 8px;
  border-radius: 10px;
}

body.high-info-mode .title-sheet-row .title-chip {
  padding: 2px 7px;
  font-size: 9px;
}

body.high-info-mode .spark-page {
  padding-top: calc(6px + env(safe-area-inset-top));
}

body.high-info-mode .spark-hero {
  margin-bottom: 7px;
  padding: 12px 12px 11px;
}

body.high-info-mode .spark-flame {
  font-size: 34px;
}

body.high-info-mode .spark-count {
  margin-top: 4px;
}

body.high-info-mode .spark-count strong {
  font-size: 30px;
}

body.high-info-mode .spark-streak {
  margin-bottom: 8px;
}

body.high-info-mode .spark-cycle {
  gap: 5px;
  margin-bottom: 9px;
}

body.high-info-mode .spark-dot {
  width: 22px;
  height: 22px;
}

/* 双列与高信息同时开启时进一步压缩，形成真正的信息墙。 */
body.high-info-mode.double-column-mode .post-list .post-card {
  padding: 8px 8px 6px;
}

body.high-info-mode.double-column-mode .post-list .post-content {
  font-size: 12px;
  line-height: 1.4;
  -webkit-line-clamp: 3;
}

body.high-info-mode.double-column-mode .home-page .post-images img {
  min-height: 58px;
  max-height: 84px;
}

/* 底部导航缩小高度，让内容区多出一行左右的空间。 */
body.high-info-mode .tab-bar {
  right: 6px;
  bottom: calc(5px + env(safe-area-inset-bottom));
  left: 6px;
  height: 52px;
  border-radius: 18px;
}

body.high-info-mode .tab-indicator::before {
  top: 5px;
  width: 56px;
  height: 41px;
  border-radius: 13px;
}

body.high-info-mode .tab-indicator::after {
  top: 5px;
  width: 48px;
  height: 41px;
}

body.high-info-mode .tab-item {
  gap: 0;
  font-size: 9px;
}

body.high-info-mode .tab-icon {
  font-size: 17px;
}

body.high-info-mode .chat-icon {
  width: 16px;
  height: 12px;
}

.settings-expand-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  overflow: hidden;
  background: transparent;
  pointer-events: auto;
  contain: strict;
}

body.settings-transition-lock {
  overflow: hidden;
  touch-action: none;
}

.settings-expand-surface {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--brand-rgb), 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 245, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(var(--brand-rgb), 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform-origin: center;
  will-change: transform;
  backface-visibility: hidden;
}

.settings-menu-button.is-launching {
  opacity: 0.08;
}

body.theme-dark .settings-expand-surface {
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--brand-rgb), 0.26), transparent 34%),
    linear-gradient(145deg, rgba(35, 42, 54, 0.99), rgba(17, 22, 30, 0.99));
}

.menu-card button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.menu-card button:last-child {
  border-bottom: 0;
}

.menu-card button span:last-child,
.info-card p + p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.info-card {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.logout-button {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(194, 65, 75, 0.12);
  background: var(--surface, rgba(255, 255, 255, 0.58));
  color: var(--danger);
}

.review-card {
  padding: 0 14px 14px;
}

.review-card > .post-card {
  padding: 14px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  background: var(--surface, rgba(255, 255, 255, 0.56));
}

.admin-tabs button {
  height: 38px;
  flex: 1;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.admin-tabs button.active {
  background: var(--surface, rgba(255, 255, 255, 0.92));
  box-shadow: 0 4px 14px rgba(37, 49, 72, 0.08);
  color: var(--text);
}

.user-admin-list {
  display: grid;
  gap: 9px;
}

.user-admin-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.82));
  box-shadow: 0 6px 20px rgba(37, 49, 72, 0.065);
}

.user-admin-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.user-admin-main .post-meta {
  min-width: 0;
  flex: 1;
}

.user-admin-main > button {
  flex: none;
}

.user-status {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), 0.1);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}

.user-status.banned {
  background: rgba(194, 65, 75, 0.1);
  color: var(--danger);
}

.ban-duration-picker {
  padding: 11px 12px 13px;
  border-top: 1px solid var(--line);
  background: rgba(255, 245, 224, 0.54);
}

.ban-duration-picker > span {
  display: block;
  margin-bottom: 8px;
  color: #8b6817;
  font-size: 12px;
  font-weight: 600;
}

.ban-duration-picker > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.ban-duration-picker button {
  min-height: 34px;
  border-radius: 10px;
  background: var(--surface, rgba(255, 255, 255, 0.82));
  color: #8b6817;
  font-size: 12px;
  font-weight: 600;
}

.ban-duration-picker button[data-cancel-ban] {
  grid-column: 1 / -1;
  color: var(--muted);
}

/* 聊天基础页 */
.chat-list {
  display: grid;
  gap: 9px;
}

.chat-list-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: var(--surface, rgba(255, 255, 255, 0.82));
  box-shadow: 0 6px 20px rgba(37, 49, 72, 0.065);
  text-align: left;
}

.chat-section-title {
  margin: 15px 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

.chat-list-item.is-followed {
  background: rgba(231, 234, 239, 0.78);
  box-shadow: none;
  filter: grayscale(0.35);
}

.chat-list-item.is-followed .chat-room-avatar {
  background: linear-gradient(145deg, #e2e4e8, #d1d5dc);
  color: #737b89;
}

.chat-list-item.is-followed .chat-room-copy small {
  color: #989fab;
}

.chat-list-item.is-followed .chat-room-arrow {
  color: #aeb4bd;
  font-size: 17px;
  font-weight: 700;
}

.chat-room-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #d9eee8, #b9ddd3);
  color: #22665a;
  font-weight: 700;
  object-fit: cover;
}

.chat-follow-empty {
  min-height: 72px;
}

.chat-room-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.chat-room-copy strong {
  font-size: 14px;
}

.chat-room-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-arrow {
  color: #a0a8b5;
  font-size: 24px;
}

.chat-note {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.chat-room-card {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, rgba(255, 255, 255, 0.94));
}

body.chat-room-open {
  overflow: hidden;
}

body.chat-room-open .chat-page {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}

body.chat-room-open .chat-page > .page-header,
body.chat-room-open .chat-page > .broadcast-bar {
  display: none;
}

body.chat-room-open .tab-bar {
  display: none;
}

.chat-room-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  border-bottom: 1px solid var(--line);
}

.chat-room-header .nav-back {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(23, 32, 51, 0.045);
  color: var(--text);
  font-size: 25px;
}

.chat-peer-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
}

.chat-peer-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #d9eee8, #b9ddd3);
  color: #22665a;
  font-size: 12px;
  font-weight: 700;
}

.chat-peer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-peer-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-peer-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-peer-copy #chat-relation-slot:empty {
  display: none;
}

.chat-spark-button {
  display: inline-flex;
  width: auto !important;
  height: 32px !important;
  flex: none;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9a3c, #ff5f6d) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
}

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chat-message {
  display: flex;
  max-width: 82%;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.chat-message.self {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble {
  padding: 8px 11px;
  border-radius: 6px 15px 15px;
  background: white;
  box-shadow: 0 3px 12px rgba(37, 49, 72, 0.07);
  overflow-wrap: anywhere;
  font-size: 14px;
}

.chat-message.self .chat-bubble {
  border-radius: 15px 6px 15px 15px;
  background: #95ec69;
  color: #142018;
}

.chat-message > span {
  color: var(--muted);
  font-size: 10px;
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.chat-compose input {
  height: 40px !important;
  flex: 1;
  border-radius: 13px !important;
}

.chat-compose button {
  min-width: 58px;
  height: 40px;
  border-radius: 13px;
  background: var(--brand);
  color: white;
  font-size: 13px;
  font-weight: 600;
}

/* 底部 iOS 液态玻璃：弱模糊 + 像素偏移 + 菲涅尔边缘高光 */
.tab-bar {
  position: fixed;
  z-index: 50;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  width: auto;
  max-width: 620px;
  height: 66px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.54);
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.20), rgba(225, 233, 243, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(38, 48, 64, 0.05),
    0 12px 32px rgba(31, 42, 62, 0.15);
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 160ms ease, opacity 160ms ease;
}

.tab-indicator {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 25%;
  height: 100%;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  transition: transform 90ms cubic-bezier(0.2, 0.9, 0.25, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.tab-indicator::before {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 70px;
  height: 50px;
  border: 0.5px solid rgba(255, 255, 255, 0.38);
  border-radius: 17px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.025) 45%,
    rgba(22, 119, 255, 0.09) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1.5px 0 rgba(22, 119, 255, 0.30),
    inset 0 10px 12px -9px rgba(255, 255, 255, 0.42),
    inset 0 -12px 15px -10px rgba(22, 119, 255, 0.34);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

.tab-indicator::after {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 58px;
  height: 50px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78) 10%, rgba(255, 255, 255, 0.36) 88%, transparent) top / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.38) 10%, rgba(22, 119, 255, 0.22) 88%, transparent) bottom / 100% 2px no-repeat;
  content: "";
  filter: blur(0.35px);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translateX(-50%);
}

.tab-bar::before {
  position: absolute;
  z-index: 0;
  inset: -5px;
  border-radius: 28px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.20), transparent 34%, rgba(198, 218, 234, 0.10) 70%, rgba(255, 255, 255, 0.18));
  content: "";
  opacity: 0.72;
  pointer-events: none;
  transform: translate3d(1.5px, -1px, 0) scale(1.012);
}

.tab-bar::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.04) 21%, transparent 62%, rgba(255, 255, 255, 0.24) 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.26), transparent 23%, transparent 72%, rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.54),
    inset -1px -1px 0 rgba(255, 255, 255, 0.18);
  content: "";
  pointer-events: none;
}

.tab-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(80px);
}

.tab-item {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  background: transparent;
  color: #717b8d;
  font-size: 11px;
}

.tab-item.active {
  color: #1677ff;
  font-weight: 600;
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
}

.chat-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
  border: 1.6px solid currentColor;
  border-radius: 6px;
}

.chat-icon::after {
  position: absolute;
  bottom: -4px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-bottom: 1.6px solid currentColor;
  border-left: 1.6px solid currentColor;
  content: "";
  transform: rotate(-28deg) skew(8deg);
}

.app-toast {
  position: fixed;
  z-index: 100;
  top: calc(20px + env(safe-area-inset-top));
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(23, 32, 51, 0.82);
  color: white;
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

/* 深色模式 */
body.theme-dark {
  --bg: #0e1116;
  --text: #eef2f7;
  --muted: #929cab;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(24, 28, 36, 0.90);
  --brand-light: rgba(var(--brand-rgb), 0.23);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  color: var(--text);
  background: var(--bg);
}

body.theme-dark .liquid-background {
  background: var(--bg-image-dark,
    radial-gradient(circle at 12% 12%, rgba(35, 101, 151, 0.22), transparent 31%),
    radial-gradient(circle at 86% 18%, rgba(130, 55, 83, 0.18), transparent 30%),
    radial-gradient(circle at 14% 92%, rgba(27, 102, 82, 0.20), transparent 34%),
    linear-gradient(155deg, #0e1116 0%, #11151c 52%, #0d1116 100%));
}

body.theme-dark .post-card,
body.theme-dark .form-card,
body.theme-dark .profile-card,
body.theme-dark .social-stats-card,
body.theme-dark .menu-card,
body.theme-dark .info-card,
body.theme-dark .login-card,
body.theme-dark .comment-section,
body.theme-dark .review-card,
body.theme-dark .settings-layer,
body.theme-dark .account-card,
body.theme-dark .preferences-card,
body.theme-dark .user-admin-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--card);
}

body.theme-dark textarea,
body.theme-dark select,
body.theme-dark input[type="text"],
body.theme-dark input[type="password"],
body.theme-dark input:not([type]) {
  border-color: rgba(255, 255, 255, 0.10);
  background: #181d25;
  color: var(--text);
}

body.theme-dark .chat-list-item,
body.theme-dark .social-post-item,
body.theme-dark .social-user-item,
body.theme-dark .contact-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(28, 33, 42, 0.90);
}

body.theme-dark .social-sheet {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(18, 22, 29, 0.98);
}

body.theme-dark .admin-tabs {
  background: var(--surface, rgba(255, 255, 255, 0.06));
}

body.theme-dark .admin-tabs button.active {
  background: #252b35;
  color: #66a9ff;
}

body.theme-dark .chat-bubble {
  background: #20252e;
  color: var(--text);
}

body.theme-dark .tab-bar {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(125deg, rgba(36, 43, 55, 0.46), rgba(17, 22, 30, 0.30));
}

body.theme-dark .tab-bar::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.22), transparent 24%, transparent 68%, rgba(94, 151, 255, 0.10)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12), transparent 26%, transparent 72%, rgba(255, 255, 255, 0.06));
}

body.theme-dark .tab-item {
  color: #8e98a9;
}

body.theme-dark .tab-item.active {
  color: #69aaff;
}

body.theme-dark .tab-indicator::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.015) 45%,
    rgba(71, 145, 255, 0.12) 100%
  );
}

body.font-small #page-container {
  width: 106.38%;
  margin-left: -3.19%;
  zoom: 0.94;
}

body.font-large #page-container {
  width: 94.34%;
  margin-left: 2.83%;
  zoom: 1.06;
}

@media (min-width: 720px) {
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .tab-bar {
    right: 24px;
    left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 称号系统 ===== */
.title-unlock-toast {
  position: fixed;
  z-index: 12000;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  display: flex;
  width: min(340px, calc(100vw - 32px));
  align-items: center;
  gap: 11px;
  overflow: hidden;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.86));
  box-shadow:
    0 16px 44px rgba(34, 47, 76, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translate3d(-50%, -22px, 0) scale(0.92);
  transition:
    opacity 240ms ease,
    transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: none;
}

.title-unlock-toast.is-show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.title-unlock-ray {
  position: absolute;
  inset: -80% -30%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.92) 48%, transparent 58%);
  transform: translateX(-65%) rotate(8deg);
  animation: title-unlock-sweep 1.15s ease-out 180ms both;
  pointer-events: none;
}

.title-unlock-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffd76d, #ff8a5b);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(255, 138, 91, 0.38);
}

.title-unlock-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.35;
}

.title-unlock-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.title-unlock-copy strong {
  color: #22304b;
  font-size: 17px;
}

.title-unlock-copy em {
  color: #9b6a18;
  font-size: 10px;
  font-style: normal;
}

.title-unlock-toast.tier-rare .title-unlock-icon {
  background: linear-gradient(145deg, #77c6ff, #4a8cff);
  box-shadow: 0 8px 20px rgba(74, 140, 255, 0.38);
}

.title-unlock-toast.tier-epic .title-unlock-icon {
  background: linear-gradient(145deg, #b78cff, #7656e8);
  box-shadow: 0 8px 20px rgba(118, 86, 232, 0.42);
}

.title-unlock-toast.tier-legendary .title-unlock-icon {
  background: linear-gradient(145deg, #ffe18e, #ffad35);
  box-shadow: 0 8px 20px rgba(255, 173, 53, 0.44);
}

.title-unlock-toast.tier-mythic .title-unlock-icon {
  background: linear-gradient(145deg, #ffd166, #ff5e72);
  box-shadow: 0 8px 22px rgba(255, 94, 114, 0.48);
}

.title-unlock-toast.tier-hidden .title-unlock-icon {
  background: linear-gradient(145deg, #8e73dc, #392b65);
  box-shadow: 0 8px 22px rgba(75, 55, 128, 0.55);
}

@keyframes title-unlock-sweep {
  from { transform: translateX(-75%) rotate(8deg); }
  to { transform: translateX(80%) rotate(8deg); }
}

.title-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.title-chips.is-lg {
  gap: 8px;
  margin-top: 0;
}

.title-chip {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: middle;
}

.title-chip.is-small {
  padding: 3px 9px;
  font-size: 11px;
}

.title-chip.is-more,
.title-chip.is-empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-weight: 500;
}

.title-chip.is-button {
  padding-right: 6px;
  -webkit-tap-highlight-color: transparent;
}

.title-chip.is-button:active {
  transform: scale(0.96);
}

.title-chip.is-button i {
  margin-left: 3px;
  font-style: normal;
  opacity: 0.7;
}

/* 稀有：一圈细边光 */
.title-chip.tier-rare {
  background: linear-gradient(135deg, rgba(74, 163, 255, 0.22), rgba(74, 163, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(74, 163, 255, 0.45);
  color: #2f80d8;
}

/* 史诗：紫色流光 */
.title-chip.tier-epic {
  background-image: linear-gradient(115deg, #7b5cf0, #b06bf0, #7b5cf0);
  background-size: 240% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 7px rgba(123, 92, 240, 0.35);
  color: #fff;
  animation: title-flow 3.2s linear infinite;
}

/* 传说：金色流光 + 呼吸外发光 */
.title-chip.tier-legendary {
  background-image: linear-gradient(115deg, #ffe08a, #ffb347, #ffd98a, #ffb347);
  background-size: 260% 100%;
  color: #6a4205;
  animation: title-flow 2.6s linear infinite, title-breath 2.6s ease-in-out infinite;
}

/* 神话：炽金流火 + 星点闪烁 */
.title-chip.tier-mythic {
  background-image: linear-gradient(112deg, #ffd166, #ff7b54, #ff4d6d, #ffd166);
  background-size: 280% 100%;
  color: #4a1b07;
  animation: title-flow 2.2s linear infinite, title-breath-warm 2.2s ease-in-out infinite;
}

/* 隐藏：深紫神秘脉动 */
.title-chip.tier-hidden {
  background-image: linear-gradient(112deg, #3b2a63, #6d4bb0, #2b1f4a, #6d4bb0);
  background-size: 260% 100%;
  color: #efe6ff;
  animation: title-flow 3.6s linear infinite, title-mystery 3s ease-in-out infinite;
}

.title-chip.tier-mythic::after,
.title-chip.tier-hidden::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 22% 32%, rgba(255, 255, 255, 0.95) 0 1.4px, transparent 2px),
    radial-gradient(circle at 68% 74%, rgba(255, 255, 255, 0.85) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 46% 16%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.6px);
  animation: title-sparkle 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes title-flow {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

@keyframes title-breath {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 1px 6px rgba(255, 179, 71, 0.35);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 2px 14px rgba(255, 179, 71, 0.7);
  }
}

@keyframes title-breath-warm {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 1px 7px rgba(255, 90, 90, 0.4);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 2px 16px rgba(255, 90, 90, 0.8);
  }
}

@keyframes title-mystery {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(200, 180, 255, 0.25), 0 0 0 rgba(140, 110, 230, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(220, 200, 255, 0.6), 0 0 14px rgba(150, 120, 255, 0.8); }
}

@keyframes title-sparkle {
  0% {
    opacity: 0.25;
    transform: translate3d(-4%, 3%, 0) scale(0.98);
  }
  50% {
    opacity: 1;
    transform: translate3d(3%, -2%, 0) scale(1.03);
  }
  100% {
    opacity: 0.25;
    transform: translate3d(-4%, 3%, 0) scale(0.98);
  }
}

/* 「我的」页头像右边的称号，像 QQ 那样挂在昵称下面 */
.profile-titles {
  margin-top: 2px;
  -webkit-tap-highlight-color: transparent;
}

.profile-titles .title-chips {
  margin-top: 0;
}

.post-meta .title-chips {
  margin-top: 3px;
}

/* 信息流只展示称号样式，不运行动画，避免滚动时产生大量合成层。 */
.post-meta .title-chip,
.post-meta .title-chip::before,
.post-meta .title-chip::after,
.title-row:not(.is-active) .title-chip,
.title-row:not(.is-active) .title-chip::before,
.title-row:not(.is-active) .title-chip::after {
  animation: none;
}

/* 称号页 */
.titles-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.titles-block {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow);
}

.titles-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.titles-block-head strong {
  font-size: 14px;
}

.titles-block-head span {
  color: var(--muted);
  font-size: 11px;
}

.titles-tip {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.title-empty {
  color: var(--muted);
  font-size: 11px;
}

.title-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.title-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(23, 32, 51, 0.04);
  text-align: left;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.title-row.is-active {
  background: var(--brand-light);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.32);
}

.title-row.is-locked {
  opacity: 0.66;
}

.title-row-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.title-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-row-meta {
  color: var(--muted);
  font-size: 10px;
}

.title-row-condition {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.title-row-progress {
  color: var(--brand, #3478f6);
  font-size: 10px;
  line-height: 1.5;
}

.title-row-state {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}

body.theme-dark .titles-block {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--surface, var(--card));
}

body.theme-dark .title-unlock-toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(38, 43, 58, 0.97), rgba(23, 27, 38, 0.92));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark .title-unlock-copy strong {
  color: #fff;
}

body.theme-dark .title-row {
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .title-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #c9d2df;
}

body.theme-dark .title-chip.tier-rare {
  background: linear-gradient(135deg, rgba(74, 163, 255, 0.3), rgba(74, 163, 255, 0.12));
  color: #8fc4ff;
}

body.theme-dark .title-chip.tier-epic {
  background-image: linear-gradient(115deg, #6a4be0, #a05fe0, #6a4be0);
  color: #fff;
}

body.theme-dark .title-chip.is-more,
body.theme-dark .title-chip.is-empty {
  background: transparent;
}

/* 主页称号行：称号互相叠着，右边是 +41 小箭头 */
.profile-titles {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.profile-titles .title-chips {
  min-width: 0;
  margin-top: 0;
}

.title-chips.is-stacked {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: nowrap;
}

.title-chips.is-stacked .title-chip {
  margin-left: -13px;
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: -1px;
}

.title-chips.is-stacked .title-chip:first-child {
  margin-left: 0;
}

/* 越靠前越在上层，后面的被前一个压住，只露出右半边 */
.title-chips.is-stacked .title-chip:nth-child(1) { z-index: 6; }
.title-chips.is-stacked .title-chip:nth-child(2) { z-index: 5; }
.title-chips.is-stacked .title-chip:nth-child(3) { z-index: 4; }
.title-chips.is-stacked .title-chip:nth-child(4) { z-index: 3; }
.title-chips.is-stacked .title-chip:nth-child(5) { z-index: 2; }
.title-chips.is-stacked .title-chip:nth-child(6) { z-index: 1; }

body.theme-dark .title-chips.is-stacked .title-chip {
  outline-color: rgba(18, 22, 30, 0.95);
}

.title-expand {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-left: 2px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(23, 32, 51, 0.06);
  color: var(--muted);
}

.title-expand-count {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.title-expand-arrow {
  font-size: 13px;
  line-height: 1;
}

body.theme-dark .title-expand {
  background: rgba(255, 255, 255, 0.08);
}

/* 全部称号弹层 */
.titles-sheet {
  display: flex;
  max-height: 78vh;
  flex-direction: column;
}

.titles-sheet-tip {
  margin: 0 16px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.titles-sheet-list {
  max-height: 62vh;
  overflow-y: auto;
  padding: 0 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.title-sheet-row {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(23, 32, 51, 0.04);
  text-align: left;
}

.title-sheet-row.is-locked {
  opacity: 0.62;
}

/* 全部称号列表只让正在展示的称号跑动效，锁定项保持静态，降低滚动开销。 */
.title-sheet-row:not(.is-shown) .title-chip,
.title-sheet-row:not(.is-shown) .title-chip::after,
.title-sheet-row:not(.is-shown) .title-chip::before {
  animation: none;
}

.title-sheet-top {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
}

.title-sheet-meta {
  color: var(--muted);
  font-size: 10px;
}

.title-sheet-state {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}

.title-sheet-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  background: transparent;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.title-sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* 称号列表里的紧凑开关 */
.glass-switch.is-compact {
  width: 46px;
  height: 24px;
}

/* 列表里开关很多，使用纯色轨道，滚动更稳定 */
.glass-switch.is-compact .switch-track {
  background: rgba(122, 132, 150, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 2px rgba(14, 22, 38, 0.2);
}

.glass-switch.is-compact input[type="checkbox"]:checked + .switch-track {
  background: linear-gradient(135deg, #4aa3ff, #0b62e6);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 1px 2px rgba(6, 32, 72, 0.28);
}

.glass-switch.is-compact .switch-thumb {
  background: radial-gradient(125% 125% at 32% 20%, #ffffff, #e9eef6);
}

.glass-switch.is-compact .switch-glow {
  display: none;
}

body.theme-dark .glass-switch.is-compact .switch-track {
  background: rgba(255, 255, 255, 0.16);
}

.glass-switch.is-compact .switch-thumb {
  top: 2.5px;
  left: 2.5px;
  width: 30px;
  height: 19px;
}

.glass-switch.is-compact input[type="checkbox"]:checked + .switch-track .switch-thumb {
  transform: translate3d(11px, 0, 0);
}

.glass-switch.is-compact input[type="checkbox"]:active + .switch-track .switch-thumb {
  width: 34px;
}

.glass-switch.is-compact input[type="checkbox"]:checked:active + .switch-track .switch-thumb {
  width: 34px;
  transform: translate3d(7px, 0, 0);
}

.glass-switch input[type="checkbox"]:disabled + .switch-track {
  opacity: 0.5;
}

.title-sheet-detail {
  display: none;
  flex-direction: column;
  gap: 3px;
}

.title-sheet-row.is-detail .title-sheet-detail {
  display: flex;
}

.title-sheet-detail small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

body.theme-dark .title-sheet-row {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== 关系绑定 & 聊天发送面板 ===== */
.relation-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rc-soft, rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 0 0 1px var(--rc-color, #e8465f);
  color: var(--rc-color, #e8465f);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.relation-chip i {
  font-style: normal;
  font-size: 11px;
}

.profile-relation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

body.theme-dark .relation-chip {
  background: rgba(255, 255, 255, 0.08);
}

/* 发送按钮左边的加号 */
.chat-plus {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.06);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: transform 200ms ease, background-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.chat-plus.is-open {
  background: var(--brand-light);
  color: var(--brand);
  transform: rotate(45deg);
}

body.theme-dark .chat-plus {
  background: rgba(255, 255, 255, 0.08);
}

/* 加号面板：图片 / 视频 / 定位 / 关系 */
.chat-panel {
  display: grid;
  max-height: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  overflow: hidden;
  padding: 0 12px;
  opacity: 0;
  transition: max-height 220ms ease, opacity 180ms ease, padding 220ms ease;
}

.chat-panel.is-open {
  max-height: 260px;
  padding: 10px 12px 0;
  opacity: 1;
}

.chat-panel > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 13px;
  background: rgba(23, 32, 51, 0.05);
  color: var(--muted);
  font-size: 10px;
}

.chat-panel > button span {
  font-size: 20px;
  line-height: 1.1;
}

.chat-panel-title {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
}

.chat-relation-unbind {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(194, 65, 75, 0.08);
  color: var(--danger);
  font-size: 11px;
}

body.theme-dark .chat-panel > button {
  background: rgba(255, 255, 255, 0.06);
}

/* 图片 / 视频 / 定位 / 关系消息 */
.chat-image {
  display: block;
  max-width: 190px;
  border-radius: 12px;
}

.chat-video {
  display: block;
  width: 210px;
  max-width: 100%;
  border-radius: 12px;
}

.chat-media-card,
.chat-location {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.chat-media-card small,
.chat-location small {
  color: var(--muted);
  font-size: 10px;
}

.chat-location strong {
  font-size: 12px;
}

.chat-location a {
  color: var(--brand);
  font-size: 11px;
  text-decoration: underline;
}

.chat-relation-note {
  font-size: 11px;
}

.chat-message.is-image .chat-bubble,
.chat-message.is-video .chat-bubble,
.chat-message.is-invite .chat-bubble {
  padding: 4px;
  background: transparent;
  box-shadow: none;
}

.chat-message.is-invite .chat-bubble {
  padding: 0;
  min-width: 210px;
}

/* ===== 关系选择：插画卡片 ===== */
.relation-choice {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.relation-choice-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 8px 10px;
  border-radius: 17px;
  background: var(--rc-soft, #ffe1da);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(16, 24, 40, 0.07);
  color: var(--rc-deep, #7c2121);
  text-align: center;
  transition: transform 160ms ease, box-shadow 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.relation-choice-art {
  display: block;
  width: 100%;
  height: 64px;
  overflow: hidden;
  border-radius: 12px;
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.relation-choice-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.relation-choice-item strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.relation-choice-item small {
  color: var(--rc-deep, #7c2121);
  font-size: 9px;
  line-height: 1.35;
  opacity: 0.68;
}

.relation-choice-item.is-active {
  box-shadow:
    inset 0 0 0 2px var(--rc-color, #e8465f),
    0 6px 16px rgba(16, 24, 40, 0.14);
}

.relation-choice-item:active {
  transform: scale(0.97);
}

.chat-invite-status {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.chat-invite-demo {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 10px;
}

/* ===== 聊天里的邀请卡 ===== */
.invite-card-mini {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: #fffdf7;
  box-shadow:
    inset 0 0 0 1.5px var(--rc-color, #e8465f),
    0 6px 16px rgba(16, 24, 40, 0.12);
  color: var(--rc-deep, #7c2121);
  text-align: left;
}

.invite-mini-art {
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
  overflow: hidden;
  border-radius: 13px;
  background: var(--rc-soft, #ffe1da);
}

.invite-mini-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-mini-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.invite-mini-copy strong {
  font-size: 12px;
}

.invite-mini-copy small {
  color: var(--rc-color, #e8465f);
  font-size: 10px;
  opacity: 0.85;
}

.invite-mini-arrow {
  flex: none;
  color: var(--rc-color, #e8465f);
  font-size: 17px;
  line-height: 1;
}

/* ===== 全屏邀请卡 ===== */
.invite-overlay {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 16, 22, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.invite-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.invite-sheet {
  position: relative;
  width: 100%;
  max-width: 330px;
  overflow: hidden;
  border-radius: 26px;
  background: #fffdf7;
  box-shadow: 0 26px 62px rgba(8, 12, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--rc-deep, #7c2121);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.95);
  transition: transform 300ms cubic-bezier(0.22, 0.9, 0.24, 1), opacity 220ms ease;
}

.invite-overlay.is-open .invite-sheet {
  opacity: 1;
  transform: none;
}

.invite-close {
  position: absolute;
  z-index: 3;
  top: 11px;
  right: 11px;
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 3px 10px rgba(8, 12, 20, 0.16);
  color: var(--rc-deep, #7c2121);
  font-size: 16px;
  line-height: 1;
}

.invite-art {
  position: relative;
  height: 194px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--rc-from, #ff9a8b), var(--rc-to, #f4576b));
}

.invite-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.invite-badge {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 50%;
  padding: 4px 13px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 3px 10px rgba(8, 12, 20, 0.14);
  color: var(--rc-color, #e8465f);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.invite-body {
  padding: 17px 20px 22px;
}

.invite-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.invite-tagline {
  margin: 7px 0 13px;
  color: rgba(70, 56, 56, 0.72);
  font-size: 12px;
  line-height: 1.65;
}

.invite-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.invite-tags span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rc-soft, #ffe1da);
  color: var(--rc-color, #e8465f);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.invite-tags span.is-solid {
  background: var(--rc-color, #e8465f);
  color: #fff;
}

.invite-pair {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px dashed rgba(120, 100, 100, 0.22);
}

.invite-person {
  display: flex;
  width: 78px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.invite-face {
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.9),
    0 4px 12px rgba(8, 12, 20, 0.14);
  color: var(--rc-color, #e8465f);
  font-size: 18px;
  font-weight: 700;
}

.invite-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-person small {
  max-width: 100%;
  overflow: hidden;
  color: var(--rc-deep, #7c2121);
  font-size: 10px;
  opacity: 0.72;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-link {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1;
  animation: invite-heart-beat 1.9s ease-in-out infinite;
}

@keyframes invite-heart-beat {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.24); }
  58% { transform: scale(0.96); }
}

.invite-status {
  margin: 13px 0 0;
  color: var(--rc-color, #e8465f);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.invite-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.invite-actions button {
  min-height: 45px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 150ms ease;
}

.invite-actions button:active {
  transform: scale(0.97);
}

.invite-reject {
  flex: 1;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--rc-color, #e8465f);
  color: var(--rc-color, #e8465f);
}

.invite-accept {
  flex: 1.35;
  background: var(--rc-color, #e8465f);
  box-shadow: 0 8px 20px rgba(8, 12, 20, 0.2);
  color: #fff;
}

.invite-done {
  width: 100%;
  min-height: 45px;
  margin-top: 15px;
  border-radius: 15px;
  background: var(--rc-color, #e8465f);
  box-shadow: 0 8px 20px rgba(8, 12, 20, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.invite-tip {
  margin: 9px 0 0;
  color: rgba(70, 56, 56, 0.5);
  font-size: 10px;
}

.invite-confetti {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.invite-confetti i {
  position: absolute;
  bottom: 34%;
  left: 50%;
  font-size: 16px;
  font-style: normal;
  opacity: 0;
  animation: invite-float 2.8s ease-out infinite;
}

.invite-confetti i:nth-child(2) { left: 30%; animation-delay: 0.3s; }
.invite-confetti i:nth-child(3) { left: 64%; font-size: 21px; animation-delay: 0.1s; }
.invite-confetti i:nth-child(4) { left: 42%; animation-delay: 0.55s; }
.invite-confetti i:nth-child(5) { left: 72%; animation-delay: 0.8s; }

@keyframes invite-float {
  0% { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.8); }
  22% { opacity: 0.95; }
  100% { opacity: 0; transform: translate3d(0, -150px, 0) scale(1.18); }
}

body.theme-dark .invite-card-mini {
  background: #1b1e26;
}

body.theme-dark .invite-sheet {
  background: #fbf6ee;
}

﻿/* ===== 续火花 ===== */
.spark-page {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.spark-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 22px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(255, 168, 78, 0.30), rgba(255, 255, 255, 0) 62%),
    var(--surface, rgba(255, 255, 255, 0.86));
  box-shadow: var(--shadow);
  text-align: center;
}

.spark-flame {
  font-size: 46px;
  line-height: 1;
}

.spark-flame span {
  display: inline-block;
  animation: spark-flicker 2.6s ease-in-out infinite;
}

.spark-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.spark-count strong {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.spark-count small {
  color: var(--muted);
  font-size: 11px;
}

.spark-streak {
  margin: 4px 0 15px;
  color: var(--muted);
  font-size: 11px;
}

.spark-cycle {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 16px;
}

.spark-dot {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.06);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.spark-dot.is-done {
  background: linear-gradient(140deg, #ffb457, #ff6a5f);
  box-shadow: 0 3px 9px rgba(255, 120, 80, 0.35);
  color: #fff;
}

.spark-dot.is-next {
  color: #ff7a4d;
  box-shadow: inset 0 0 0 1.5px #ff8a5c;
  animation: spark-pulse 1.8s ease-in-out infinite;
}

.spark-light {
  width: 100%;
  min-height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff9a3c, #ff5f6d);
  box-shadow: 0 10px 24px rgba(255, 95, 109, 0.32);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease;
}

.spark-light:active {
  transform: scale(0.98);
}

.spark-light:disabled {
  background: rgba(23, 32, 51, 0.06);
  box-shadow: none;
  color: var(--muted);
}

.spark-boost {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.spark-boost.is-active {
  color: #e2622b;
  font-weight: 600;
}

.spark-card {
  margin-bottom: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: var(--surface, rgba(255, 255, 255, 0.86));
  box-shadow: var(--shadow);
}

.spark-card h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.spark-rules {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.95;
}

.spark-history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.spark-history-row:last-child {
  border-bottom: 0;
}

.spark-history-row span {
  color: var(--muted);
  font-size: 11px;
}

.spark-history-row strong {
  color: #ff7a4d;
}

.spark-history-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.spark-bit {
  position: absolute;
  top: 46px;
  left: 50%;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  color: #ff9a3c;
  pointer-events: none;
  animation: spark-bit-fly 1.2s ease-out forwards;
}

@keyframes spark-flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  40% { transform: scale(1.08) rotate(2deg); }
  70% { transform: scale(0.97) rotate(-1deg); }
}

@keyframes spark-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(255, 138, 92, 0.55); }
  50% { box-shadow: inset 0 0 0 1.5px rgba(255, 138, 92, 1), 0 0 12px rgba(255, 138, 92, 0.5); }
}

@keyframes spark-bit-fly {
  0% { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.7); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -78px, 0) scale(1.2); }
}

body.theme-dark .spark-light:disabled {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .spark-dot {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .spark-boost.is-active {
  color: #ffb066;
}

body.theme-dark .spark-history-row strong {
  color: #ffb066;
}

/* 管理员广播设置（高级管理员专用） */
.broadcast-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.12);
  font-size: 13px;
}

.broadcast-preview-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 关注申请：等待对方同意时的按钮状态，以及申请卡片的操作区 */
.follow-button.is-pending,
.friend-button.is-pending {
  opacity: 0.65;
}

.friend-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.social-user-item.friend-request {
  background: rgba(127, 127, 127, 0.08);
}

/* 头像与昵称做成可点击进主页，但外观保持和纯文本一致 */
.post-author-avatar,
.post-author-name {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.post-author-avatar {
  display: inline-flex;
  align-items: center;
}

.post-author-name {
  display: inline;
}

.post-author-avatar:active,
.post-author-name:active {
  opacity: 0.6;
}
