:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-text: #f43f5e;
  --primary-bg: #be123c;
  --primary-bg-hover: #9f1239;
  --secondary: #8b5cf6;
  --bg: #0a0a0c;
  --card: #161619;
  --card-hover: #1e1e22;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --border: #2a2a30;
  --border-strong: #3a3a42;
  --danger: #fb7185;
  --input-bg: #1e1e24;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --online: #4ade80;
  --mobile-tabbar-height: 64px;

  /* 间距 / 圆角 / 阴影 / 焦点环 token —— 全站复用 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px rgba(244, 63, 94, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  background-color: var(--bg);
  /* 深空辉光：纯黑之上叠两团极淡的双色光，避免一片死黑 */
  background-image:
    radial-gradient(60% 50% at 50% -8%, rgba(225, 29, 72, 0.13), transparent 70%),
    radial-gradient(45% 40% at 90% 5%, rgba(139, 92, 246, 0.10), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(10, 10, 12, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text {
  font-size: 1.8rem;
  font-weight: bold;
  background: linear-gradient(90deg, #e11d48, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-icon {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .brand-icon {
    display: none;
  }
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a,
.nav-links .link-button {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active,
.brand-text.active {
  color: var(--primary);
}

.nav-links a.active {
  font-weight: 600;
}

/* 汉堡按钮：仅窄屏显示 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links .inline-form {
    width: 100%;
    padding: 10px 4px;
    border-top: 1px solid var(--border);
  }

  .nav-links a:first-child {
    border-top: none;
  }
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  min-height: calc(100vh - 120px);
}

.footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* 次要/中性动作（跳过、举报、分页、返回）—— 幽灵按钮，不与主操作抢视觉 */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--muted);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(255, 92, 108, 0.5);
}

.btn-danger:hover {
  background: rgba(255, 92, 108, 0.12);
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.85rem;
  min-width: 44px;
  min-height: 44px;
}

.btn-block {
  width: 100%;
}

.link-button {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.inline-form {
  display: inline;
}

.hero {
  position: relative;
  text-align: center;
  padding: 56px 24px 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80% 120% at 50% -20%, rgba(225, 29, 72, 0.30), transparent 60%),
    radial-gradient(70% 100% at 100% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
    linear-gradient(160deg, #16121c 0%, #0a0a0c 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.7rem;
  line-height: 1.25;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 35%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  margin: 0 auto 30px;
  max-width: 440px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.hero-stat strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-actions .btn {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-pill);
}

.hero-actions .btn-primary {
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.38);
}

.hero-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-card {
  max-width: 420px;
  margin: 32px auto;
  background: var(--card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.auth-card h1,
.auth-card h2 {
  margin-top: 0;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(255, 92, 108, 0.15);
  color: #fda4af;
  border: 1px solid rgba(255, 92, 108, 0.35);
}

.auth-link {
  text-align: center;
  margin-top: 16px;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.user-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.user-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}

.user-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--input-bg);
}

.user-card-info {
  padding: 12px;
}

.user-card-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.user-card-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.card-actions {
  padding: 0 12px 12px;
  display: flex;
  gap: 8px;
}

.filter-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filter-bar input[name="keyword"] {
  flex: 1 1 160px;
  min-width: 140px;
}

.filter-bar input[type="number"] {
  width: 72px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 480px) {
  .filter-bar {
    gap: var(--space-2);
  }

  .filter-bar input[name="keyword"] {
    flex-basis: 100%;
  }

  .filter-bar button {
    flex: 1;
  }
}

.profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.avatar-large {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.looking-for {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: rgba(225, 29, 72, 0.18);
  color: #fda4af;
  padding: 4px 10px;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-item {
  position: relative;
}

.photo-item form {
  position: absolute;
  top: 4px;
  right: 4px;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
}

.match-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.match-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-left: auto;
}

.chat-header {
  margin-bottom: 16px;
}

.chat-body {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  min-height: clamp(180px, 28vh, 280px);
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.chat-bubble.me {
  background: var(--primary);
  color: white;
  margin-left: auto;
}

.chat-bubble.other {
  background: var(--input-bg);
  color: var(--text);
}

.chat-bubble .time {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.stat-card h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.stat-card p {
  margin: 0;
  font-size: 1.6rem;
  font-weight: bold;
}

.admin-menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-item {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-item p {
  margin: 4px 0;
}

.admin-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.admin-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.filter-links a {
  margin-right: 12px;
  color: var(--muted);
}

.filter-links a.active {
  color: var(--primary);
  font-weight: bold;
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .user-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}

.heart-share-page {
  margin: 0 auto;
}

.heart-share-page .page-head .subtitle {
  margin-top: 6px;
}

.share-form {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.share-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  font-size: 1rem;
}

.share-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-item {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
}

.share-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.share-header span {
  color: var(--muted);
}

.share-item p {
  margin: 0;
  line-height: 1.5;
}

.pinned-section {
  margin-bottom: 24px;
}

.pinned-section h3,
.share-list h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.share-item.pinned {
  border-left: 4px solid var(--primary);
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-tiny {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.pin-badge {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.time {
  color: var(--muted);
  font-size: 0.85rem;
}

.recommended-section {
  margin-top: 40px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.section-link {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--primary);
}

/* 照片优先聚光卡 —— 首页热门 */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.spotlight-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.spotlight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.spotlight-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(150deg, #2a1430, #161620);
}

.spotlight-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(225, 29, 72, 0.92);
}

.spotlight-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 55%);
}

.spotlight-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 11px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.spotlight-name {
  font-size: 1.02rem;
  font-weight: 500;
}

.spotlight-age {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.section-more {
  text-align: center;
  margin-top: 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

input, select, textarea {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

/* 统一焦点态：键盘可达性 */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.chat-input input:focus-visible,
.share-form textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.card-placeholder,
.avatar-placeholder {
  background: var(--input-bg);
  color: var(--muted);
}

.share-form textarea {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.share-form textarea::placeholder {
  color: var(--muted);
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tag-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s;
}

.tag-option input {
  display: none;
}

.tag-option:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.tag-option:has(input:checked) span {
  color: white;
}

.tag-option:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
}

.tag-option input:checked + span {
  color: white;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 16px;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--card-glow), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.card-online {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.card-online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 4px;
}

/* 品类卡统一进绯红主色系，仅靠深浅区分；闪聊用唯一的紫色作功能区分 */
.card-hetero {
  --card-glow: #e11d48;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.16), var(--card));
}

.card-mlm {
  --card-glow: #e11d48;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), var(--card));
}

.card-wlw {
  --card-glow: #f43f5e;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.13), var(--card));
}

.card-swing {
  --card-glow: #be123c;
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.16), var(--card));
}

.card-cdts {
  --card-glow: #f43f5e;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.11), var(--card));
}

.card-chat {
  --card-glow: #8b5cf6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), var(--card));
}

.card-hot {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #ff4d4f, #f43f5e);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.45);
  animation: hot-pulse 1.6s ease-in-out infinite;
}

@keyframes hot-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .nav-links a,
  .nav-links .link-button {
    font-size: 0.95rem;
  }
}

/* 全站底部防骗提示 —— 可折叠 */
.safety-notice {
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.08), rgba(245, 158, 11, 0.05));
  border-top: 1px solid rgba(251, 113, 133, 0.25);
  border-bottom: 1px solid rgba(251, 113, 133, 0.12);
  padding: 0;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.safety-notice summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.safety-notice summary .safety-icon {
  position: absolute;
  left: var(--space-4);
}

.safety-notice summary .safety-chevron {
  position: absolute;
  right: var(--space-4);
}

.safety-notice summary::-webkit-details-marker {
  display: none;
}

.safety-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.safety-title {
  color: #fda4af;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.safety-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.safety-notice:not([open]) .safety-chevron {
  transform: rotate(-45deg);
}

.safety-notice[open] .safety-chevron {
  transform: rotate(45deg);
}

.safety-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-6);
}

.safety-notice ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.safety-notice li {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 12px 14px 12px 44px;
  position: relative;
  background: rgba(10, 10, 12, 0.45);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-md);
}

.safety-notice li::before {
  content: "⚠️";
  position: absolute;
  left: 14px;
  top: 12px;
}

.safety-notice li strong {
  color: #fda4af;
}

.safety-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.safety-actions .btn {
  min-width: 112px;
}

@media (max-width: 480px) {
  .safety-title {
    font-size: 0.95rem;
    text-align: left;
  }

  .safety-notice summary {
    justify-content: flex-start;
  }
}

.upload-hint {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
  margin-bottom: 8px;
}

/* ========== 全站 UI 增强 ========== */

.page-head {
  margin-bottom: 20px;
}

.page-head h1,
.page-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.page-head .subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-card);
}

.panel-subtitle {
  margin: 0 0 var(--space-4);
  font-size: 1rem;
  font-weight: 600;
}

/* 发现页筛选 */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.filter-age {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-age span {
  color: var(--muted);
  font-size: 0.88rem;
}

.filter-bar input,
.filter-bar select {
  background: var(--input-bg);
  color: var(--text);
}

/* 发现页聚光卡 */
.browse-grid {
  margin-bottom: var(--space-4);
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 640px) {
  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 资料页 Hero */
.profile-detail {
  padding-bottom: 88px;
}

.profile-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-cover {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.profile-cover.placeholder {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(150deg, #2a1430, #161620);
}

.profile-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
  pointer-events: none;
}

.profile-hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  z-index: 1;
}

.profile-hero-info h1,
.profile-hero-info h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.profile-hero-info p {
  margin: 0 0 4px;
}

.profile-hero-info .looking-for {
  color: rgba(255, 255, 255, 0.75);
}

.profile-body p {
  margin: 0;
  line-height: 1.7;
}

.profile-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(10, 10, 12, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 960px;
  margin: 0 auto;
}

.profile-action-primary {
  display: block;
  width: 100%;
}

.profile-action-primary form,
.profile-action-primary .btn {
  width: 100%;
}

.profile-action-secondary {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 641px) {
  .profile-detail {
    padding-bottom: 0;
  }

  .profile-action-bar {
    position: static;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: var(--space-4);
    backdrop-filter: none;
  }

  .profile-action-bar > .btn-block {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* 首字母头像 */
.avatar-initial,
.avatar-small.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #2a1430, #161620);
  flex-shrink: 0;
}

.avatar-large.avatar-initial {
  border-radius: 50%;
  font-size: 2.4rem;
}

.avatar-small.avatar-initial {
  font-size: 1rem;
}

.avatar-tiny.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #2a1430, #161620);
}

/* 消息页 */
.messages-page {
  padding-bottom: 16px;
}

.back-link {
  color: var(--muted);
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--primary);
}

.match-item {
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.match-item:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.chat-body {
  display: flex;
  flex-direction: column;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  border: 1px solid var(--border);
}

.chat-input-sticky {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-top: 8px;
}

/* 登录 / 注册 */
.page-auth .container {
  min-height: auto;
}

.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 0 40px;
  min-height: 50vh;
}

.auth-wrap-wide .auth-card {
  max-width: 480px;
}

.auth-card {
  width: 100%;
  box-shadow: var(--shadow-lift);
}

/* 文件上传 */
.upload-form {
  margin-top: var(--space-3);
}

.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
}

.file-input-label input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.file-input-label {
  display: inline-block;
  cursor: pointer;
}

.file-input-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--input-bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.file-input-btn:hover {
  border-color: var(--primary);
  background: var(--card-hover);
}

/* 心的分享 */
.heart-share-page .subtitle {
  margin-top: 6px;
}

.share-form.profile-panel {
  margin-bottom: var(--space-4);
}

.pinned-section .share-item,
.share-list .share-item {
  border: 1px solid var(--border);
}

/* 移动端底部 Tab */
.mobile-tabbar {
  display: none;
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom));
  }

  .container {
    padding-bottom: calc(var(--mobile-tabbar-height) + 32px + env(safe-area-inset-bottom));
  }

  .profile-detail {
    padding-bottom: calc(180px + env(safe-area-inset-bottom));
  }

  .profile-action-bar {
    bottom: calc(56px + env(safe-area-inset-bottom));
    max-width: none;
  }

  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    background: rgba(10, 10, 12, 0.98);
    border-top: 1px solid var(--border);
    min-height: var(--mobile-tabbar-height);
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(12px);
  }

  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    color: var(--muted);
    font-size: 0.68rem;
    min-width: 0;
    transition: color 0.2s;
  }

  .tab-item span:last-child {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-align: center;
  }

  .tab-item .tab-icon {
    font-size: 1.1rem;
    line-height: 1;
  }

  .tab-item.active {
    color: var(--primary);
  }

  .footer {
    padding-bottom: calc(var(--mobile-tabbar-height) + 24px + env(safe-area-inset-bottom));
  }

  .chat-body {
    min-height: 180px;
    max-height: 48vh;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stat {
    flex: 1;
    min-width: 0;
  }

  .spotlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .safety-notice {
    max-width: 1024px;
  }

  .spotlight-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .category-grid {
    gap: 18px;
  }
}


/* 工单系统 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.2s;
}

.ticket-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ticket-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-main h3 {
  font-size: 1rem;
  margin: 0;
}

.ticket-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.ticket-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.ticket-status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.status-processing {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.status-resolved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-closed {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
}

.ticket-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.ticket-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ticket-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.ticket-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.ticket-body {
  line-height: 1.7;
  color: #e5e5e5;
}

.ticket-reply {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-reply h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.admin-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-tabs a {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-tabs a.active,
.admin-tabs a:hover {
  background: var(--primary);
  color: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.admin-table td {
  font-size: 0.9rem;
}

.status-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
}

/* 跳到主内容链接 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 12px;
}

/* 成功提示 */
.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

/* 管理后台表格移动端横向滚动 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrapper .admin-table {
  min-width: 640px;
}

/* 兴趣标签键盘可达：隐藏原复选框但保留焦点 */
.tag-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tag-option input:focus-visible + span {
  box-shadow: var(--ring);
}

/* 文件上传按钮焦点 */
.file-input-label:focus-within .file-input-btn {
  box-shadow: var(--ring);
}

/* 页脚链接 */
.footer-links {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-links a {
  color: var(--muted);
  margin: 0 6px;
}
.footer-links a:hover {
  color: var(--primary);
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}
.empty .btn {
  margin: 8px 4px;
}

/* 焦点环兜底 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* 导航按钮焦点 */
.nav-links .link-button:focus-visible {
  color: var(--primary);
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* 静态页面（隐私政策/协议/规范） */
.page-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.8;
  min-height: 320px;
}
.page-card h1 {
  margin-top: 0;
  font-size: 1.6rem;
}
.page-card h2 {
  font-size: 1.15rem;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text);
}
.page-card ul {
  padding-left: 20px;
  color: var(--muted);
}
.page-card p {
  color: var(--muted);
}

/* ========== 可访问性与设计系统优化覆盖 ========== */

/* 1. 文本链接使用更高对比度的强调色 */
a {
  color: var(--primary-text);
}
.nav-links a.active,
.nav-links a:hover,
.brand-text.active,
.filter-links a.active,
.section-link {
  color: var(--primary-text);
}

/* 2. 主按钮使用更深的背景，保证白字对比度 */
.btn-primary {
  background: var(--primary-bg);
}
.btn-primary:hover {
  background: var(--primary-bg-hover);
}

/* 3. 高对比焦点环 */
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #ffffff;
}
.btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary-text);
}
.btn-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--danger);
}

/* 4. 汉堡菜单按钮识别度 */
.nav-toggle {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* 5. 图片固定宽高比，减少 CLS */
.photo-grid img {
  height: auto;
  aspect-ratio: 1 / 1;
}

/* 6. Lightbox 关闭按钮触控区域 */
.lightbox-close {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  line-height: 1;
}

/* 7. 后台表格斑马纹 */
.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* 8. 在线状态颜色 token 化 */
.card-online::before {
  background: var(--online);
}

/* 9. 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 10. 减少透明度偏好：关闭毛玻璃 */
@media (prefers-reduced-transparency: reduce) {
  .navbar,
  .profile-action-bar,
  .chat-input-sticky,
  .mobile-tabbar {
    backdrop-filter: none !important;
    background: var(--card) !important;
  }
}

/* 11. 超小屏类别网格单列 */
@media (max-width: 380px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* 12. 法律/帮助页正文使用主文本色，提高长文可读性 */
.page-card p,
.page-card li {
  color: var(--text);
}
.page-card .text-muted {
  color: var(--muted);
}

/* 屏幕阅读器专用文本 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== 心的分享：置顶折叠、点赞评论 ========== */

.pinned-details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
}

.pinned-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.pinned-summary::-webkit-details-marker {
  display: none;
}

.pinned-summary::after {
  content: "▾";
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.pinned-details:not([open]) .pinned-summary::after {
  transform: rotate(-90deg);
}

.pinned-body {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.pinned-body a {
  color: var(--primary-text);
  text-decoration: underline;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.post-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  min-width: 64px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.post-action:hover {
  background: var(--card-hover);
  border-color: var(--muted);
  color: var(--text);
}

.post-action.liked {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.1);
}

.post-action-count {
  font-variant-numeric: tabular-nums;
}

.comments-panel {
  margin-top: 24px;
}

.comments-panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.comment-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.comment-form {
  margin-bottom: 16px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text);
  resize: vertical;
  font-size: 1rem;
}

.comment-form textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-body {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
  margin-bottom: 0;
}

/* 首页关于板块：默认折叠，保留 SEO 内容 */
.about-details {
  min-height: auto;
  padding: 14px 18px;
}

.about-details summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
}

.about-details summary::-webkit-details-marker {
  display: none;
}

.about-details summary::after {
  content: " ▾";
  color: var(--muted);
  font-size: 0.75rem;
}

.about-details:not([open]) summary::after {
  content: " ▸";
}

.about-body {
  margin-top: 14px;
}

.about-body p {
  font-size: 0.9rem;
}

/* ========== 资料页优化 ========== */
.profile-page {
  padding-bottom: 24px;
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-card);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), var(--card));
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.profile-avatar.avatar-initial {
  background: linear-gradient(135deg, #2a1430, #161620);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.profile-meta {
  flex: 1;
  min-width: 0;
}

.profile-meta h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 700;
}

.profile-brief {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 1rem;
}

.profile-looking-for {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-looking-for > span:first-child {
  color: var(--text);
}

.profile-bio {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}

.profile-bio p {
  margin: 0 0 10px;
}

.profile-bio p:last-child {
  margin-bottom: 0;
}

.profile-action-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-action-panel .btn {
  min-height: 44px;
}

.profile-action-panel .btn-like {
  padding-left: 22px;
  padding-right: 22px;
}

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .profile-meta h1 {
    font-size: 1.5rem;
  }

  .profile-looking-for {
    justify-content: center;
  }

  .profile-action-panel {
    justify-content: center;
  }

  .profile-page {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* 默认头像选择器 */
.avatar-picker-details {
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.avatar-picker-details summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.avatar-picker-details summary::-webkit-details-marker {
  display: none;
}

.avatar-picker-details summary::after {
  content: "▾";
  color: var(--muted);
  transition: transform 0.2s;
}

.avatar-picker-details:not([open]) summary::after {
  transform: rotate(-90deg);
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
}

.avatar-picker-details .avatar-picker {
  padding: 12px;
}

.avatar-option {
  position: relative;
  cursor: pointer;
  display: block;
}

.avatar-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.avatar-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  pointer-events: none;
}

.avatar-option:hover img {
  border-color: var(--border-strong);
}

.avatar-option input:checked + img {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.25);
  transform: scale(1.05);
}

.avatar-option input:focus-visible + img {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

@media (max-width: 640px) {
  .avatar-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .avatar-picker-details {
    max-width: none;
  }
}
