/* 星眠 H5 — 共享样式类 (从 app.wxss 翻译) */

/* ===== 页面容器 ===== */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.safe-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: var(--space-md);
  background:
    radial-gradient(circle at 14% 8%, rgba(44, 46, 61, 0.48), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(24, 26, 38, 0.42), transparent 24%),
    linear-gradient(180deg, #111113 0%, #141418 46%, #17171c 100%);
}

.shell {
  padding: var(--space-md);
}

/* ===== 卡片 ===== */
.hero-card,
.glass-card,
.panel-card,
.chat-card,
.story-card {
  border-radius: var(--radius-card);
}

.hero-card {
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 34%),
    linear-gradient(150deg, rgba(28, 29, 36, 0.96), rgba(20, 20, 26, 0.98)),
    linear-gradient(135deg, #1b1c22, #131317);
  box-shadow: var(--shadow-hero);
}

.glass-card {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.panel-card,
.chat-card,
.story-card {
  background: rgba(23, 23, 28, 0.96);
  box-shadow: var(--shadow-card);
}

/* ===== Section Title ===== */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 2px 9px;
}

.section-title__main {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.section-title__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ===== Pill 标签 ===== */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: #d9d9de;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.pill--active {
  background: rgba(255, 93, 108, 0.18);
  color: var(--color-primary-light);
  box-shadow: inset 0 0 0 1px rgba(255, 93, 108, 0.25);
}

/* ===== CTA Button ===== */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-mid) 58%, var(--color-primary-end));
  box-shadow: var(--shadow-cta);
  transition: opacity var(--transition-fast);
}

.cta-button:active {
  opacity: 0.85;
}

.cta-button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.cta-button--block {
  display: flex;
  width: 100%;
}

.cta-button--sm {
  padding: 8px 18px;
  font-size: var(--text-sm);
}

.cta-button--lg {
  padding: 14px 32px;
  font-size: var(--text-lg);
}

/* ===== Avatar ===== */
.avatar {
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 28%),
    linear-gradient(145deg, #4a4d58, #2e313b 60%, #1f222a);
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--sm { width: 32px; height: 32px; font-size: var(--text-sm); }
.avatar--md { width: 44px; height: 44px; font-size: var(--text-lg); }
.avatar--lg { width: 64px; height: 64px; font-size: var(--text-xl); }
.avatar--xl { width: 88px; height: 88px; font-size: var(--text-2xl); }

/* ===== Typography ===== */
.muted {
  color: var(--text-secondary);
}

.headline {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text-primary);
}

.desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-desc);
}

/* ===== Chat bubbles ===== */
.bubble-user {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-mid));
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  max-width: 80%;
  align-self: flex-end;
  word-break: break-word;
}

.bubble-ai {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  max-width: 80%;
  align-self: flex-start;
  word-break: break-word;
}

/* Dialogue (对话) text in AI messages */
.dialogue {
  color: var(--color-story);
  font-weight: 700;
}

/* Narration (旁白) text in AI messages */
.narration {
  color: var(--text-primary);
}

/* ===== Input field ===== */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-md);
  border: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.input-field:focus {
  border-color: var(--color-primary);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* ===== Divider ===== */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: var(--space-md) 0;
}

/* ===== Flex utilities ===== */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ===== Status colors ===== */
.text-success { color: var(--color-success); }
.text-gold { color: var(--color-gold); }
.text-primary-color { color: var(--color-primary); }

/* ===== Loading skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Fade in animation ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ===== Slide up animation ===== */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease forwards;
}

/* ===== Profile Page (from mini program WXSS, rpx→px ÷2) ===== */
.profile-page {
  min-height: 100vh;
  padding: 12px 12px 75px;
  box-sizing: border-box;
  position: relative;
  background: #0a0a0f;
}

.profile-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 30%, rgba(100, 220, 200, 0.08), transparent 30%),
    radial-gradient(circle at 90% 40%, rgba(100, 180, 220, 0.05), transparent 25%);
  pointer-events: none;
  z-index: 0;
}

/* Hero */
.profile-hero {
  position: relative;
  z-index: 1;
  padding: 10px 0;
}

.profile-hero__main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.profile-hero__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.profile-hero__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero__identity {
  flex: 1;
  cursor: pointer;
}

.profile-hero__name {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.profile-hero__id {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.profile-hero__slogan {
  margin-top: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.profile-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-hero__action {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.profile-hero__action:active {
  background: rgba(255,255,255,0.1);
}

/* Meter */
.profile-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.profile-meter__item {
  padding: 8px 4px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  text-align: center;
}

.profile-meter__value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.profile-meter__label {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
}

/* Login Panel */
.profile-login-panel {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.profile-login-panel__title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.profile-login-panel__desc {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* Stacks */
.profile-stacks {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.profile-stack {
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.profile-stack--wallet {
  background: rgba(255,213,79,0.08);
  border: 1px solid rgba(255,213,79,0.12);
}

.profile-stack--archive {
  background: rgba(100,220,200,0.06);
  border: 1px solid rgba(100,220,200,0.1);
}

.profile-stack__label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.profile-stack__headline {
  margin-top: 5px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.profile-stack__desc {
  margin-top: 5px;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

.profile-stack__actions {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.profile-stack__button {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,213,79,0.2);
  color: #FFD54F;
  cursor: pointer;
}

.profile-stack__button--dim {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
}

.profile-stack__footer {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(100,220,200,0.7);
}

/* Switch */
.profile-switch {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  margin-top: 18px;
}

.profile-switch__item {
  position: relative;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding-bottom: 7px;
}

.profile-switch__item--active {
  color: #fff;
  font-weight: 600;
}

.profile-switch__item--active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #64DCC8;
}

/* Capsules */
.profile-capsules {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.profile-capsule {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
}

.profile-capsule--active {
  background: rgba(100,220,200,0.12);
  color: #64DCC8;
}

/* Rail */
.profile-rail {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-rail__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
}

.profile-rail__item:active {
  background: rgba(255,255,255,0.06);
}

.profile-rail__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.profile-rail__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-rail__copy {
  flex: 1;
}

.profile-rail__name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.profile-rail__status {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.profile-rail__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff5d6c;
  flex-shrink: 0;
}

/* Empty */
.profile-empty {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

/* ===== Discover Page (from mini program WXSS, rpx→px ÷2) ===== */
.discover-page {
  min-height: 100vh;
  background: #0c0c0e;
  padding: 0 12px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Search Bar */
.discover-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
}

.discover-search__icon {
  font-size: 16px;
  color: rgba(255,255,255,0.35);
}

.discover-search__placeholder {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* Game Portal Banner */
.discover-game-portal {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.discover-game-portal:hover,
.discover-game-portal:active {
  border-color: rgba(255,255,255,0.14);
}
.discover-game-portal__inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.discover-game-portal__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}
.discover-game-portal__dot {
  color: rgba(255,255,255,0.2);
  font-weight: 400;
}
.discover-game-portal__desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-game-portal__arrow {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Section */
.discover-section {
  margin-top: 8px;
}

.discover-section__title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}

/* Category Cards */
.discover-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.discover-cat {
  position: relative;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  box-sizing: border-box;
  cursor: pointer;
  background: linear-gradient(135deg, #1a1520 0%, #0d0d10 100%);
  border: 1px solid rgba(255,255,255,0.06);
}

.discover-cat:active { opacity: 0.85; }

.discover-cat__text {
  position: relative;
  z-index: 2;
}

.discover-cat__name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.discover-cat__desc {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.discover-cat__cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Filter Tags */
.discover-tags {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.discover-tags::-webkit-scrollbar { display: none; }

.discover-tag {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  user-select: none;
}

.discover-tag--active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 8px rgba(255,255,255,0.04);
}

/* Character Grid */
.discover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.discover-card {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.discover-card:active { transform: scale(0.97); }

.discover-card__cover-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.discover-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-card__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
  background: linear-gradient(160deg, #1c1c22, #0e0e12);
}

.discover-card__heat {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  z-index: 2;
}

.discover-card__shade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  z-index: 1;
}

.discover-card__info {
  padding: 9px 9px 11px;
}

.discover-card__name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.discover-card__tag {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
}

.discover-card__quote {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255,255,255,0.45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discover-card__meta {
  margin-top: 5px;
  font-size: 10px;
  color: rgba(255,255,255,0.28);
}

/* Loading */
.discover-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  gap: 8px;
}

.discover-loading__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.discover-loading__text {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* Empty */
.discover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  gap: 8px;
}

.discover-empty__icon {
  font-size: 28px;
  color: rgba(255,255,255,0.15);
}

.discover-empty__text {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

/* ===== Search Page (from mini program WXSS, rpx→px ÷2) ===== */
.search-page {
  min-height: 100vh;
  background: #0a0a0f;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.search-icon { font-size: 14px; color: rgba(255,255,255,0.35); }

.search-input {
  flex: 1;
  font-size: 14px;
  color: #fff;
  background: transparent;
  border: none;
  outline: none;
}
.search-input::placeholder { color: rgba(255,255,255,0.3); }

.search-count { font-size: 11px; color: rgba(255,255,255,0.25); white-space: nowrap; }

.search-btn {
  padding: 0 16px;
  height: 40px;
  line-height: 40px;
  border-radius: 20px;
  background: #64DCc8;
  color: #0a0a0f;
  font-size: 14px;
  font-weight: 600;
  border: none;
}
.search-btn:active { opacity: 0.85; }

/* Search History */
.search-history { margin-top: 8px; }

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

.search-history__title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); }
.search-history__clear { font-size: 12px; color: rgba(255,255,255,0.35); cursor: pointer; }

.search-history__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-history__item {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.search-history__empty {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Search Results */
.search-results { margin-top: 12px; }

.search-results__title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.search-card {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
}
.search-card:active { opacity: 0.85; }

.search-card__cover-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.search-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-card__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: rgba(255,255,255,0.12);
  background: linear-gradient(160deg, #1c1c22, #0e0e12);
}

.search-card__info { padding: 8px; }

.search-card__name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.search-card__tag {
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}

/* Empty Search */
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  gap: 8px;
}

.search-empty__icon {
  font-size: 28px;
  color: rgba(255,255,255,0.15);
}

.search-empty__text {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

/* Coming Soon */
.search-coming {
  text-align: center;
  padding: 20px 0;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
}

/* ===== Create Page (from mini program WXSS, rpx→px ÷2) ===== */
.create-page {
  min-height: 100vh;
  padding: 0 12px 100px;
  box-sizing: border-box;
  position: relative;
  background: #0a0a0f;
}

body.has-tabbar .create-page {
  padding-bottom: 174px;
}

/* 顶部光晕 */
.create-top-glow {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(circle, rgba(100,220,200,0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* 标题区 */
.create-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 0 10px;
}

.create-hero__title {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #fff 30%, #64DCc8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.create-hero__desc {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* 头像区 */
.create-avatar-area {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0 16px;
  cursor: pointer;
}

.create-avatar-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #64DCc8, #59c9ff, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-avatar__img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.create-avatar__empty {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #1a1a24;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-avatar__icon {
  font-size: 24px;
  color: rgba(100,220,200,0.4);
}

.create-avatar__label {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(100,220,200,0.6);
}

/* 表单区 */
.create-form {
  position: relative;
  z-index: 1;
}

/* 卡片 */
.create-card {
  margin-bottom: 8px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.create-card--fade {
  animation: fadeIn 0.3s ease;
}

.create-card__head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.create-card__count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.2);
}

.create-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64DCc8;
}

.create-card__dot--pink { background: #ff6b8a; }
.create-card__dot--cyan { background: #59c9ff; }

/* 行 */
.create-row {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.create-row__label {
  width: 50px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.create-row__input {
  flex: 1;
  font-size: 14px;
  color: #fff;
  text-align: right;
  background: none;
  border: none;
  outline: none;
  padding: 4px 0;
}

.create-row__input::placeholder {
  color: rgba(255,255,255,0.2);
}

.create-row__count {
  margin-left: 6px;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

.create-row__chips {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.create-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  user-select: none;
}

.create-chip--on {
  color: #0a0a0f;
  background: #64DCc8;
  border-color: #64DCc8;
}

.create-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 2px 0;
}

/* 内容块 */
.create-block {
  margin-bottom: 12px;
}

.create-block:last-child { margin-bottom: 0; }

.create-block__label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}

.create-block__hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

.create-block__area {
  width: 100%;
  min-height: 70px;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  box-sizing: border-box;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.create-block__area--sm { min-height: 48px; }

.create-block__area::placeholder {
  color: rgba(255,255,255,0.2);
}

.create-block__count {
  display: block;
  text-align: right;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,0.15);
}

/* 进阶设定项 */
.create-advanced-list {
  margin-bottom: 8px;
}

.create-adv-item {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 6px;
}

.create-adv-item:last-child { margin-bottom: 0; }

.create-adv-item__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 7px;
}

.create-adv-item__area {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.04);
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.create-adv-item__area::placeholder {
  color: rgba(255,255,255,0.15);
}

.create-adv-item__count {
  display: block;
  text-align: right;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,0.15);
}

/* 进阶展开 */
.create-expand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
}

.create-expand__text {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.create-expand__line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.create-expand__arrow {
  font-size: 11px;
  color: rgba(100,220,200,0.5);
}

/* 标签 */
.create-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.create-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 4px;
}

.create-tag--add {
  color: #64DCc8;
  border: 1px dashed rgba(100,220,200,0.25);
  cursor: pointer;
}

.create-tag__x {
  cursor: pointer;
  color: rgba(255,255,255,0.2);
}

/* 可见性 */
.create-visibility {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.create-vis-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
  border-radius: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  user-select: none;
}

.create-vis-btn--on {
  color: #64DCc8;
  background: rgba(100,220,200,0.08);
  border-color: rgba(100,220,200,0.2);
}

/* 悬浮按钮 */
.create-fab {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 101;
}

/* Tab bar visible → FAB sits above tab bar */
body.has-tabbar .create-fab {
  bottom: calc(74px + var(--safe-bottom));
}

.create-fab__inner {
  height: 44px;
  border-radius: 22px;
  background: linear-gradient(135deg, #64DCc8, #59c9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 16px rgba(100,220,200,0.25);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.create-fab__inner:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.create-fab__text {
  font-size: 15px;
  font-weight: 700;
  color: #0a0a0f;
}

.create-fab__arrow {
  font-size: 14px;
  color: #0a0a0f;
}

.create-fab__loading {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10,10,15,0.2);
  border-top-color: #0a0a0f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===================================================================
 * 聊一聊 — 沉浸式聊天 (immersive-chat)
 * 完全匹配原小程序 pages/immersive-chat/index 的 WXSS
 * =================================================================== */

/* ── Page & Swiper ──────────────────────────────────── */
.immersive-page {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: #fff;
  background: #0c0c0e;
}

.immersive-swiper {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.immersive-swiper::-webkit-scrollbar { display: none; }

.immersive-slide {
  position: relative;
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  scroll-snap-align: center;
}

/* ── Background ────────────────────────────────────── */
.immersive-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.immersive-bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.immersive-bg__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 800;
  color: rgba(255,255,255,0.08);
  background: linear-gradient(160deg, #1a1a22, #0c0c0e);
}

/* wallpaper gradients */
.immersive-bg--wallpaper-night { background: linear-gradient(180deg, #0a0a14 0%, #141428 40%, #1a1a2e 100%); }
.immersive-bg--wallpaper-sakura { background: linear-gradient(180deg, #1a1018 0%, #2d1828 40%, #1a1420 100%); }
.immersive-bg--wallpaper-ocean { background: linear-gradient(180deg, #0a1018 0%, #14202e 40%, #1a2632 100%); }
.immersive-bg--wallpaper-sunset { background: linear-gradient(180deg, #1a1410 0%, #2e1a14 40%, #1a1820 100%); }
.immersive-bg--wallpaper-forest { background: linear-gradient(180deg, #0a140e 0%, #14201a 40%, #1a221e 100%); }
.immersive-bg--wallpaper-dark { background: linear-gradient(180deg, #050508 0%, #0a0a0f 40%, #0c0c12 100%); }

.immersive-bg__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(12,12,14,0.72) 0%,
      rgba(12,12,14,0.3) 20%,
      rgba(12,12,14,0.15) 40%,
      rgba(12,12,14,0.4) 65%,
      rgba(12,12,14,0.85) 100%
    );
}

/* ── Top bar ───────────────────────────────────────── */
.immersive-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 14px 10px;
  padding-top: calc(40px + env(safe-area-inset-top, 0px));
}

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

.immersive-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.immersive-topbar__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.immersive-topbar__avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #3a3a44, #1e1e26);
}

.immersive-topbar__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.immersive-topbar__name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.immersive-topbar__status {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
}

/* ── Hamburger menu button ─────────────────────────── */
.immersive-topbar__menu {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.immersive-topbar__menu-line {
  width: 13px;
  height: 2px;
  border-radius: 1px;
  background: rgba(255,255,255,0.9);
}

/* ── AI disclaimer ──────────────────────────────────── */
.immersive-disclaimer {
  position: absolute;
  top: 80px;
  left: 14px;
  z-index: 10;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
}

/* ── Scroll area ───────────────────────────────────── */
.immersive-scroll {
  position: relative;
  z-index: 5;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.immersive-scroll::-webkit-scrollbar { display: none; }

/* ── Loading / Login / Empty ───────────────────────── */
.immersive-loading {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0c0c0e;
}

.immersive-loading__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.immersive-loading__text {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.immersive-empty {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0c0c0e;
}

.immersive-empty__icon {
  font-size: 32px;
  color: rgba(255,255,255,0.12);
}

.immersive-empty__text {
  font-size: 14px;
  color: rgba(255,255,255,0.3);
}

.immersive-empty__btn {
  margin-top: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
}

/* ── Intro card ────────────────────────────────────── */
.immersive-intro {
  margin: 90px 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.immersive-intro__label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}

.immersive-intro__text {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
}

.immersive-intro__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.immersive-intro__tag {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
}

/* ── AI label ──────────────────────────────────────── */
.immersive-ai-label {
  text-align: center;
  padding: 16px 0 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ── Chat messages inside slide ────────────────────── */
.immersive-chat {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.immersive-msg {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.immersive-msg--user {
  justify-content: flex-end;
}

.immersive-msg__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.immersive-msg__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.immersive-msg__avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, #3a3a44, #1e1e26);
}

.immersive-msg__bubble {
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
}

.immersive-msg__bubble--ai {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom-left-radius: 4px;
  color: rgba(255,255,255,0.88);
}

.immersive-msg__bubble--user {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom-right-radius: 4px;
  color: #fff;
}

/* ── Segments ──────────────────────────────────────── */
.immersive-seg { display: inline; }

.immersive-seg--narration {
  color: rgba(255,255,255,0.6);
}

.immersive-seg--dialogue {
  color: #fff;
}

.immersive-msg__bubble--user .immersive-seg {
  color: #fff;
}

/* ── Bubble themes ──────────────────────────────────── */
/* glass */
.immersive-msg__bubble--theme-glass.immersive-msg__bubble--ai {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.immersive-msg__bubble--theme-glass.immersive-msg__bubble--user {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* neon */
.immersive-msg__bubble--theme-neon.immersive-msg__bubble--ai {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(100,200,255,0.35);
  box-shadow: 0 0 10px rgba(100,200,255,0.1);
}
.immersive-msg__bubble--theme-neon.immersive-msg__bubble--user {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,100,200,0.35);
  box-shadow: 0 0 10px rgba(255,100,200,0.1);
}
/* minimal */
.immersive-msg__bubble--theme-minimal.immersive-msg__bubble--ai {
  background: transparent;
  border: none;
  border-left: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 0;
  padding: 8px 10px;
}
.immersive-msg__bubble--theme-minimal.immersive-msg__bubble--user {
  background: transparent;
  border: none;
  border-right: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 0;
  padding: 8px 10px;
}

/* ── Spacer ────────────────────────────────────────── */
.immersive-spacer {
  height: 90px;
}

/* ── Input bar ──────────────────────────────────────── */
.immersive-inputbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 14px;
  background: rgba(20,20,24,0.65);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.immersive-inputbar__icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
}

.immersive-inputbar__icon--active {
  color: #ff4757;
  background: rgba(255,71,87,0.15);
  animation: micPulse 1s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.immersive-inputbar__field {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.immersive-inputbar__input {
  width: 100%;
  height: 32px;
  color: #fff;
  font-size: 13px;
  background: transparent;
  border: none;
  outline: none;
}

.immersive-inputbar__input::placeholder {
  color: rgba(255,255,255,0.3);
}

.immersive-inputbar__send {
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.immersive-inputbar__send--active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.immersive-inputbar__inspire {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Recording overlay ─────────────────────────────── */
.immersive-recording {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.immersive-recording__mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.immersive-recording__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.immersive-recording__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  animation: micPulse 1s ease-in-out infinite;
}

.immersive-recording__time {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.immersive-recording__tip {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ── Suggestions panel ─────────────────────────────── */
.immersive-suggestions {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 50px;
  bottom: calc(50px + env(safe-area-inset-bottom, 0px));
  z-index: 19;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.immersive-suggestions__item {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  background: rgba(20,20,24,0.75);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.immersive-suggestions__item:active {
  background: rgba(255,255,255,0.1);
}

/* ── Swipe hint ─────────────────────────────────────── */
.immersive-hint {
  position: fixed;
  bottom: 65px;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  justify-content: center;
  animation: fadeHint 3s forwards;
}

.immersive-hint__text {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.35);
}

@keyframes fadeHint {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===================================================================
 * 侧边栏 (Sidebar)
 * =================================================================== */
.sidebar-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.5);
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  width: 70vw;
  max-width: 280px;
  background: #141418;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.06);
  box-sizing: border-box;
}

.sidebar--open {
  transform: translateX(0);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 12px 10px;
  padding-top: calc(50px + env(safe-area-inset-top, 0px));
  flex-shrink: 0;
}

.sidebar__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.sidebar__close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  border: none;
}

.sidebar__body {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar__body::-webkit-scrollbar { display: none; }

.sidebar__section {
  margin-bottom: 18px;
}

.sidebar__section-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  padding: 10px 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
}

.sidebar__item:active {
  opacity: 0.7;
}

.sidebar__item--col {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding-right: 12px;
}

.sidebar__item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: scale(0.88);
  transform-origin: left center;
}

.sidebar__item-label {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.sidebar__item-value {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.sidebar__item-arrow {
  font-size: 16px;
  color: rgba(255,255,255,0.2);
}

.sidebar__item-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

.sidebar__badge {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}

.sidebar__badge--free {
  color: #2ecc71;
  background: rgba(46,204,113,0.15);
}

/* ===================================================================
 * 弹出层 (Popup sheet & mask)
 * =================================================================== */
.popup-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.55);
}

.popup-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: #1a1a1f;
  border-radius: 14px 14px 0 0;
  padding: 16px 0;
  max-height: 60vh;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}

.popup-sheet--open {
  transform: translateY(0);
}

.popup-sheet__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 0 16px 12px;
}

.popup-sheet__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
}

.popup-sheet__item:active {
  background: rgba(255,255,255,0.03);
}

.popup-sheet__item--active {
  background: rgba(200,169,78,0.08);
}

.popup-sheet__item-name {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.popup-sheet__item--active .popup-sheet__item-name {
  color: #c8a94e;
  font-weight: 600;
}

.popup-sheet__badge {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}

.popup-sheet__badge--free {
  color: #2ecc71;
  background: rgba(46,204,113,0.15);
}

.popup-sheet__check {
  font-size: 14px;
  color: #c8a94e;
  font-weight: 700;
}

/* ===================================================================
 * 文本输入弹出层 (Text input popup)
 * =================================================================== */
.popup-input {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: #1a1a1f;
  border-radius: 14px 14px 0 0;
  padding: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.popup-input--open {
  transform: translateY(0);
}

.popup-input__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}

.popup-input__field {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
}

.popup-input__field::placeholder {
  color: rgba(255,255,255,0.3);
}

.popup-input__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.popup-input__btn {
  flex: 1;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.popup-input__btn--cancel {
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
}

.popup-input__btn--confirm {
  color: #141418;
  background: #c8a94e;
}

/* ===================================================================
 * WeChat QR
 * =================================================================== */
.wechat-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0;
}

.wechat-qr-img {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  background: #fff;
}

.wechat-qr-tip {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.wechat-qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}

.wechat-qr-error {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border-radius: 8px;
  margin: 10px 12px;
}

/* ===================================================================
 * Toggle switch (for sidebar)
 * =================================================================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 11px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #c8a94e;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ===== 消息列表 (messages) ===== */
.messages-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 10px 5px;
}

.messages-header__title {
  font-size: 17px;
  font-weight: 700;
  color: #f5f5f7;
}

.messages-header__actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.messages-header__action {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1b1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f1f1f3;
  font-size: 11px;
}

.messages-loading,
.messages-login {
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.messages-loading__text {
  color: #8f8f98;
  font-size: 13px;
}

.messages-login__icon {
  color: var(--color-primary);
  font-size: 36px;
  line-height: 1;
}

.messages-login__title {
  margin-top: 12px;
  color: var(--text-primary);
  font-size: 15px;
}

.messages-login__button {
  margin-top: 16px;
  width: 110px;
  height: 38px;
  line-height: 38px;
  border: none;
  border-radius: 9px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.messages-scroll {
  height: calc(100vh - 62px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* System announcement box */
.sys-msg-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1e1a2e, #231f3a);
  border: 1px solid rgba(200, 169, 78, 0.2);
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.sys-msg-box__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(200, 169, 78, 0.4);
}

.sys-msg-box__icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sys-msg-box__body {
  flex: 1;
  min-width: 0;
}

.sys-msg-box__title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.sys-msg-box__badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-gold);
  background: rgba(200, 169, 78, 0.12);
  margin-right: 4px;
  vertical-align: middle;
}

.sys-msg-box__text {
  color: #9f9fa7;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sys-msg-box__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 300;
}

.messages-section {
  padding: 4px 0 0;
}

.messages-list {
  background: transparent;
}

.messages-empty {
  color: var(--text-muted);
  font-size: 12px;
}

.messages-empty--section {
  padding: 12px;
  text-align: center;
}

/* ===== Swipe cell ===== */
.swipe-cell {
  position: relative;
  overflow: hidden;
}

.swipe-cell__actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: row;
}

.swipe-cell__action {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.swipe-cell__action--pin {
  background: var(--color-gold);
}

.swipe-cell__action--delete {
  background: #e53935;
}

.swipe-cell__content {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  transition: transform 0.2s ease;
}

/* ===== Conversation row ===== */
.conversation-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
}

.conversation-avatar,
.conversation-group {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.conversation-avatar {
  position: relative;
  overflow: visible;
  border-radius: 50%;
  background: linear-gradient(145deg, #2a2b31, #494a55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.conversation-avatar--story {
  background: linear-gradient(145deg, #121629, #293e84);
}

.conversation-avatar--system {
  background: linear-gradient(145deg, #c8a94e, #e8c86a);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
}

.conversation-avatar__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.conversation-avatar__dot {
  position: absolute;
  right: -1px;
  top: -1px;
  min-width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--bg-primary);
  box-sizing: border-box;
}

.conversation-group {
  overflow: hidden;
  border-radius: 50%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  background: #23242a;
}

.conversation-group__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f7;
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(145deg, #393a43, #23242a);
}

.conversation-body {
  flex: 1;
  min-width: 0;
}

.conversation-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.conversation-name-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.conversation-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

.conversation-story-title {
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-story);
  font-size: 12px;
}

.conversation-time {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 11px;
}

.conversation-preview {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row--system {
  background: rgba(200, 169, 78, 0.04);
  border-left: 2px solid var(--color-gold);
  margin: 0 6px;
  border-radius: 6px;
}

.system-msg-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-gold);
  background: rgba(200, 169, 78, 0.12);
  margin-right: 4px;
  vertical-align: middle;
}

/* ── 系统消息页专属覆盖 ──────────────────────────── */
/* 原小程序 pages/system-msg/index.wxss 独立样式 */
.system-msg-page .immersive-slide {
  min-width: 0;
  width: 100%;
  scroll-snap-align: none;
}

.system-msg-page .immersive-ai-label {
  padding: 90px 0 8px;
}

.system-msg-page .immersive-empty {
  height: auto;
  background: transparent;
  padding: 30px 14px;
}

.system-msg-page .immersive-spacer {
  height: 40px;
}

/* ── 设置页 ─────────────────────────────────────── */
/* 完全匹配原小程序 pages/settings/index.wxss */
.settings-page {
  padding: 12px 16px;
  min-height: 100vh;
  box-sizing: border-box;
  background: #0a0a0f;
}

.settings-section {
  margin-bottom: 16px;
}

.settings-section__title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
  padding-left: 4px;
}

.settings-group {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.settings-item__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.settings-item__value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

.settings-item__arrow {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.2);
}

.settings-logout {
  margin-top: 24px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 100, 100, 0.8);
  background: rgba(255, 100, 100, 0.08);
  border: 0.5px solid rgba(255, 100, 100, 0.15);
  cursor: pointer;
}

.settings-logout:active {
  opacity: 0.8;
}

/* ── 编辑资料页 ──────────────────────────────────── */
/* 完全匹配原小程序 pages/edit-profile/index.wxss */
.edit-page {
  padding: 20px 16px;
  min-height: 100vh;
  box-sizing: border-box;
  background: #0a0a0f;
}

.edit-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.edit-avatar__image {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(100, 220, 200, 0.3);
  object-fit: cover;
}

.edit-avatar__placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.edit-avatar__tip {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

.edit-form {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.edit-field {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
}

.edit-field:last-child {
  border-bottom: none;
}

.edit-field__label {
  width: 70px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.edit-field__input {
  flex: 1;
  font-size: 14px;
  color: #fff;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}

.edit-field__input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.edit-save {
  margin-top: 24px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #0a0a0f;
  background: linear-gradient(135deg, #64DCc8, #4ECDC4);
  cursor: pointer;
  border: none;
  width: 100%;
}

.edit-save:active {
  opacity: 0.8;
}

.edit-logout {
  margin-top: 24px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 100, 100, 0.8);
  background: rgba(255, 100, 100, 0.08);
  border: 0.5px solid rgba(255, 100, 100, 0.15);
  cursor: pointer;
}

.edit-logout:active {
  opacity: 0.8;
}

/* 系统消息气泡内样式 */
.system-msg-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 8px;
  line-height: 1.4;
}

.system-msg-content {
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.system-msg-time {
  text-align: center;
  padding: 4px 0;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ===== mp-chat 专用: 顶部栏返回按钮 & Plus 菜单 ===== */
.immersive-topbar__left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.immersive-topbar__back {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  cursor: pointer;
}

.popup-sheet__badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

.popup-sheet__badge--free {
  color: var(--color-gold);
  background: rgba(200, 169, 78, 0.15);
}

/* Plus menu (WeChat-style bottom action sheet) */
.plus-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: #1c1c1e;
  border-radius: 12px 12px 0 0;
  padding: 0 0 var(--safe-bottom) 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plus-sheet--open {
  transform: translateY(0);
}

.plus-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 4px;
}

.plus-sheet__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.plus-sheet__close {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px;
  cursor: pointer;
}

.plus-sheet__grid {
  display: flex;
  flex-wrap: wrap;
  padding: 8px 12px 4px;
}

.plus-sheet__item {
  width: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 6px;
  cursor: pointer;
}

.plus-sheet__icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.plus-sheet__icon-img {
  width: 28px;
  height: 28px;
}

.plus-sheet__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.plus-sheet__cancel {
  margin: 10px 12px;
  padding: 12px 0;
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
}

/* =============================================================
   Character Detail — 匹配原小程序 pages/character-detail/index
   rpx÷2 = px
   ============================================================= */

.detail-page {
  min-height: 100vh;
  background: #0a0a0f;
}

.detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.detail-loading__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #64DCc8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Custom nav */
.detail-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: calc(var(--safe-top) + 4px) 12px 4px;
}

.detail-nav__back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.detail-nav__icon {
  font-size: 24px;
  color: #fff;
  font-weight: 300;
  line-height: 1;
}

/* Hero */
.detail-hero {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.detail-hero__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1c1c22, #0e0e12);
}

.detail-hero__initial {
  font-size: 60px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
}

.detail-hero__shade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, #0a0a0f 0%, rgba(10, 10, 15, 0.8) 40%, transparent 100%);
  pointer-events: none;
}

/* Hero info overlay */
.detail-hero__info {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  z-index: 2;
}

.detail-hero__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-hero__name {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.detail-hero__heat {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 93, 108, 0.2);
  font-size: 11px;
  color: #ff5d6c;
}

.detail-hero__heat-icon {
  font-size: 10px;
}

/* Author */
.detail-hero__author {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.detail-hero__author-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.detail-hero__author-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.detail-hero__author-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* Hero tags */
.detail-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-hero__tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(100, 220, 200, 0.9);
  background: rgba(100, 220, 200, 0.12);
  border: 1px solid rgba(100, 220, 200, 0.2);
}

/* Content */
.detail-content {
  padding: 16px;
  padding-bottom: 90px;
}

/* Section title */
.detail-section {
  margin-bottom: 12px;
}

.detail-section__title {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.detail-section__highlight {
  color: #64DCc8;
  text-decoration: underline;
  text-decoration-color: #64DCc8;
  text-underline-offset: 4px;
}

/* Cards */
.detail-card {
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.detail-card__header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.detail-card__icon {
  font-size: 14px;
  color: #64DCc8;
}

.detail-card__title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.detail-card__body {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
}

.detail-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-card__tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(100, 220, 200, 0.8);
  background: rgba(100, 220, 200, 0.08);
}

/* Bottom CTA */
.detail-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, #0a0a0f 60%, transparent);
  z-index: 50;
}

.detail-bottom__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, #64DCc8, #59c9ff);
  box-shadow: 0 4px 16px rgba(100, 220, 200, 0.3);
  cursor: pointer;
}

.detail-bottom__btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.detail-bottom__icon {
  font-size: 16px;
}

.detail-bottom__text {
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0f;
}

/* =============================================================
   Ranking — 匹配原小程序 pages/ranking/index
   rpx÷2 = px
   ============================================================= */

.rank-page {
  min-height: 100vh;
  background: #0d0d12;
  color: #e8e8ec;
  padding-bottom: 30px;
}

/* Nav */
.rank-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: calc(var(--safe-top) + 6px) 12px 6px;
}

.rank-nav__back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.rank-nav__icon {
  font-size: 20px;
  color: #fff;
  line-height: 1;
}

/* Hero banner */
.rank-hero {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.rank-hero__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-hero__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2d1b4e 0%, #1a1030 100%);
}

.rank-hero__initial {
  font-size: 90px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.08);
}

.rank-hero__shade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, #0d0d12 0%, rgba(13, 13, 18, 0.8) 40%, transparent 100%);
}

.rank-hero__info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
}

.rank-hero__title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.rank-hero__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* Loading */
.rank-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
}

.rank-loading__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #5ce0d8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.rank-loading__text {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* List */
.rank-list {
  padding: 0 12px;
}

.rank-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
}

.rank-list__label {
  font-size: 15px;
  font-weight: 700;
  color: #5ce0d8;
  border-left: 3px solid #5ce0d8;
  padding-left: 8px;
}

.rank-list__count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* Rank item */
.rank-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.rank-item:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Rank number */
.rank-item__rank {
  width: 26px;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  flex-shrink: 0;
}

.rank-item__rank--top {
  color: #5ce0d8;
}

.rank-item__rank--normal {
  color: rgba(255, 255, 255, 0.3);
}

/* Avatar */
.rank-item__avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-item__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-item__avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #2d1b4e, #1a1030);
}

/* Info */
.rank-item__info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rank-item__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rank-item__name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item__heat {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #ff6b6b;
  flex-shrink: 0;
}

.rank-item__heat-icon {
  font-size: 10px;
}

.rank-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.rank-item__tag {
  font-size: 10px;
  color: #5ce0d8;
  background: rgba(92, 224, 216, 0.1);
  border: 1px solid rgba(92, 224, 216, 0.2);
  padding: 2px 7px;
  border-radius: 10px;
}

.rank-item__quote {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

/* Chat button */
.rank-item__action {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #5ce0d8, #3bbfb5);
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  color: #0d0d12;
  cursor: pointer;
}

.rank-item__action:active {
  opacity: 0.8;
}

/* Empty */
.rank-empty {
  text-align: center;
  padding: 60px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
}
