/**
 * poetry-theme.css — 诗词模块古风深色主题
 *
 * 所有 CSS 变量使用 --poetry-* 前缀，避免与全局变量冲突。
 * 作用域：.poetry-v2-container 内的所有子元素。
 *
 * 配色来源：原型 HTML 提取，统一为 --poetry-* 命名
 */

/* ====== 主题变量 ====== */

.poetry-v2-container {
  /* 背景 */
  --poetry-bg: #F8F5EE;
  --poetry-bg-content: #FFFDF8;
  --poetry-card: #FFFFFF;
  --poetry-card-hover: #FCF7EE;
  --poetry-bg-input: #FFFFFF;

  /* 文字 */
  --poetry-text: #1F2937;
  --poetry-text-secondary: #4B5563;
  --poetry-text-tertiary: #6B7280;

  /* 强调色（秋金） */
  --poetry-accent: #B7791F;
  --poetry-accent-light: #C79242;
  --poetry-accent-bright: #9A6519;
  --poetry-accent-bg: rgba(183, 121, 31, 0.08);
  --poetry-accent-bg-hover: rgba(183, 121, 31, 0.14);

  /* 边框与分割线 */
  --poetry-border: #E7E0D3;
  --poetry-border-strong: #D8C8AE;
  --poetry-divider: #F0E8D8;

  /* 圆角 */
  --poetry-radius: 10px;
  --poetry-radius-sm: 6px;

  /* 字体栈 */
  --poetry-serif: "Noto Serif SC", "STSong", "Songti SC", "SimSun", serif;
  --poetry-sans: "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;

  /* 布局 */
  --poetry-max-width: 800px;
  --poetry-max-width-wide: 1180px;
  --poetry-max-width-detail: 1180px;
  --poetry-sidebar-width: 280px;
  --poetry-sidebar-width-tag: 260px;

  /* 基础样式 */
  color: var(--poetry-text);
  font-family: var(--poetry-sans);
  font-size: 14px;
  line-height: 1.6;
}

/* ====== 链接 ====== */

.poetry-v2-container a {
  color: var(--poetry-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.poetry-v2-container a:hover {
  color: var(--poetry-accent-bright);
}

/* ====== 页面容器 ====== */

.poetry-v2-container .page-container {
  max-width: var(--poetry-max-width);
  margin: 0 auto;
  padding: 32px 24px;
}

.poetry-v2-container .page-container--detail {
  max-width: var(--poetry-max-width-detail);
}

.poetry-v2-container .page-container--wide {
  max-width: var(--poetry-max-width-wide);
}

/* ====== 面包屑 ====== */

.poetry-v2-container .breadcrumb {
  font-size: 12px;
  color: var(--poetry-text-tertiary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.poetry-v2-container .breadcrumb a {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
}

.poetry-v2-container .breadcrumb a:hover {
  color: var(--poetry-accent);
}

.poetry-v2-container .breadcrumb .sep {
  opacity: 0.4;
}

/* ====== 两栏布局 ====== */

.poetry-v2-container .detail-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width);
  gap: 32px;
  align-items: start;
}

.poetry-v2-container .tag-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width-tag);
  gap: 28px;
  align-items: start;
}

.poetry-v2-container .poet-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width);
  gap: 32px;
  align-items: start;
}

/* ====== 侧栏 ====== */

.poetry-v2-container .sidebar {
  position: sticky;
  top: 80px;
}

.poetry-v2-container .sidebar-card {
  background: var(--poetry-card);
  border: 1px solid var(--poetry-border);
  border-radius: var(--poetry-radius);
  padding: 20px;
  margin-bottom: 14px;
}

.poetry-v2-container .sidebar-title {
  font-family: var(--poetry-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--poetry-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--poetry-divider);
}

/* ====== 卡片通用 ====== */

.poetry-v2-container .card-top-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--poetry-accent), transparent);
  opacity: 0.25;
}

/* ====== 标签药丸 ====== */

.poetry-v2-container .tag-pill {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--poetry-text-secondary);
  background: var(--poetry-accent-bg);
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.poetry-v2-container .tag-pill:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-border-strong);
}

/* ====== 操作按钮 ====== */

.poetry-v2-container .action-btn {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--poetry-text-tertiary);
  background: transparent;
  border: 1px solid var(--poetry-border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}

.poetry-v2-container .action-btn:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-accent);
  background: var(--poetry-accent-bg);
}

/* ====== 小操作按钮（侧栏推荐） ====== */

.poetry-v2-container .action-mini {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  color: var(--poetry-text-tertiary);
  background: transparent;
  border: 1px solid var(--poetry-border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}

.poetry-v2-container .action-mini:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-accent);
}

/* ====== 加载更多 ====== */

.poetry-v2-container .load-more {
  text-align: center;
  padding: 24px 0;
}

.poetry-v2-container .load-more-btn {
  padding: 10px 36px;
  background: transparent;
  border: 1px solid var(--poetry-border);
  border-radius: 24px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}

.poetry-v2-container .load-more-btn:hover {
  border-color: var(--poetry-accent);
  color: var(--poetry-accent);
}

/* ====== 空态 ====== */

.poetry-v2-container .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--poetry-text-tertiary);
}

.poetry-v2-container .empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.poetry-v2-container .empty-state-text {
  font-size: 14px;
  line-height: 1.8;
}

/* ====== 响应式 768px ====== */

@media (max-width: 768px) {
  .poetry-v2-container .page-container,
  .poetry-v2-container .page-container--detail {
    padding: 16px 12px;
  }
  .poetry-v2-container .detail-layout,
  .poetry-v2-container .tag-layout,
  .poetry-v2-container .poet-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .poetry-v2-container .sidebar {
    position: static;
  }
}

:root {
  --brand-500: #b7791f;
  --brand-600: #9a6519;
  --brand-100: #f8e8cf;

  --bg-page: #f8f5ee;
  --bg-card: #ffffff;
  --bg-muted: #f4efe5;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  --border-default: #e7e0d3;
  --border-strong: #d8c8ae;

  --success: #2f855a;
  --warning: #b7791f;
  --danger: #c2410c;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 10px rgba(31, 41, 55, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);

  /* legacy aliases for existing page styles */
  --primary: var(--brand-500);
  --primary-dark: var(--brand-600);
  --gold: var(--brand-500);
  --gold-light: #c79242;
  --gold-dark: var(--brand-600);
  --bg-primary: var(--bg-page);
  --bg-dark: var(--bg-page);
  --bg-hover: rgba(183, 121, 31, 0.08);
  --border: var(--border-default);
  --radius: var(--radius-md);
  --radius-legacy: var(--radius-md);
  --shadow: var(--shadow-md);
}

* {
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#root {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-inline: none;
  min-height: 100vh;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-500);
  color: #fff;
}

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

.btn-outline {
  background: #fff;
  color: var(--brand-500);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand-500);
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  button,
  a,
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }

  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px;
  }
}
* {
  margin:0;
  padding:0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 加载页面 */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-page);
}

.loading-text {
  font-size: 18px;
  color: var(--brand-500);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity:0.6; }
  50% { opacity:1; }
}

/* 应用容器 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部导航 */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:0 24px;
  background: rgba(255, 253, 248, 0.95);
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top:0;
  z-index: 100;
  height: 64px;
}

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

.brand-icon {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: currentColor;
  background-clip: initial;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-500);
  background: var(--bg-hover);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(183, 121, 31, 0.08);
  border:1px solid var(--border);
  border-radius: 20px;
  color: var(--brand-500);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.wallet-link:hover {
  background: rgba(183, 121, 31, 0.14);
}

/* 通知图标 */
.notification-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:1px;
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.notification-link:hover {
  transform: scale(1.1);
}

.notification-icon {
  font-size: 18px;
  line-height:1;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding:0;
  background: var(--danger);
  border-radius: 7px;
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
  box-shadow:0 1px 3px rgba(255, 77, 79, 0.5);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 4px 12px 4px 4px;
  background: rgba(183, 121, 31, 0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.user-info:hover {
  border-color: var(--brand-500);
  background: rgba(183, 121, 31, 0.14);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
  font-size: 12px;
  font-weight: 600;
  border:1px solid var(--border);
  flex-shrink: 0;
}

.user-avatar-img {
  object-fit: cover;
  padding:0;
}

.user-nickname {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.user-level {
  font-size: 10px;
  color: var(--brand-500);
  font-weight: 500;
  white-space: nowrap;
}

/* 登录按钮 */
.login-btn {
  padding: 8px 20px;
  background: var(--brand-500);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow:0 4px 12px rgba(183, 121, 31, 0.35);
}

/* 退出登录按钮 */
.logout-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border:1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(183, 121, 31, 0.08);
  color: var(--text-primary);
}

/* 主内容区 */
.main-content {
  flex:1;
  padding: 24px;
  overflow-y: auto;
  background: var(--bg-page);
}

/* 底部导航栏 - 移动端 */
.mobile-nav {
  display: none;
  position: fixed;
  bottom:0;
  left:0;
  right:0;
  background: rgba(255, 253, 248, 0.98);
  border-top:1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 100;
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  transition: all 0.3s ease;
  flex: 1;
  min-width:0;
}

.mobile-nav-item .nav-icon {
  font-size: 22px;
}

.mobile-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width:100%;
}

.mobile-nav-item.active {
  color: var(--brand-500);
}

/* 响应式 - 平板 */
@media (max-width: 1024px) {
  .app-container {
    padding-bottom: 70px;
  }

  .mobile-nav {
    display: flex;
  }

  .top-nav {
    padding:0 16px;
    height: 60px;
  }
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .top-nav {
    padding:0 12px;
    height: 56px;
    position: relative;
    z-index: 101;
  }

  .brand-text {
    font-size: 17px;
  }

  .main-content {
    padding: 12px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    min-height: calc(100vh - 56px);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .nav-user {
    gap: 8px;
  }

  .wallet-link {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 16px;
    min-height: 32px;
    display: flex;
    align-items: center;
  }

  .wallet-link .wallet-amount {
    display: inline;
  }

  .user-info {
    padding: 4px 10px 4px 4px;
    border-radius: 16px;
    min-height: 36px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .user-level {
    font-size: 10px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logout-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .login-btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 16px;
    min-height: 36px;
  }
}

/* 响应式 - 小屏手机 */
@media (max-width: 480px) {
  .top-nav {
    padding:0 8px;
    height: 52px;
  }

  .brand-icon {
    font-size: 20px;
  }

  .brand-text {
    font-size: 16px;
  }

  .main-content {
    padding: 8px;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .mobile-nav {
    padding: 4px 0;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }

  .mobile-nav-items {
    justify-content: space-evenly;
  }

  .mobile-nav-item {
    padding: 4px 2px;
    font-size: 10px;
    flex: 1;
  }

  .mobile-nav-item .nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .mobile-nav-item span {
    font-size: 10px;
  }

  .mobile-nav-item.active {
    font-weight: 600;
  }

  .wallet-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  .user-level {
    display: block;
    font-size: 10px;
  }

  .user-nickname {
    font-size: 10px;
    color: var(--text-primary);
  }

  .login-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* 响应式 - 刘海屏适配 */
@media (max-width: 768px) {
  .top-nav {
    padding-top: env(safe-area-inset-top);
  }

  .app-container {
    padding-top: env(safe-area-inset-top);
  }
}

/* 触摸反馈优化 */
@media (max-width: 768px) {
  .mobile-nav-item,
  .nav-links a,
  .btn,
  button {
    -webkit-tap-highlight-color: rgba(212, 168, 83, 0.2);
    touch-action: manipulation;
  }

  .mobile-nav-item:active,
  button:active,
  .btn:active {
    opacity: 0.8;
    transform: scale(0.98);
  }
}
/* ============================================================
   全局消息组件样式（用户端适配版）
   - Toast: 顶部居中，自动消失
   - Confirm: 居中弹窗，需要用户操作
   ============================================================ */

/* ============================================================
   Toast 样式
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  min-width: 200px;
  max-width: 400px;
}

.toast-item:hover {
  transform: scale(1.02);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-icon {
  font-size: 16px;
  font-weight: bold;
}

.toast-message {
  color: var(--text-primary);
  line-height: 1.4;
}

/* Toast 类型颜色 */
.toast-success {
  border-left: 4px solid #52c41a;
}

.toast-success .toast-icon {
  color: #52c41a;
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 4px solid #faad14;
}

.toast-warning .toast-icon {
  color: #faad14;
}

.toast-info {
  border-left: 4px solid var(--brand-500);
}

.toast-info .toast-icon {
  color: var(--brand-500);
}

/* ============================================================
   Confirm 弹窗样式
   ============================================================ */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-modal {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.confirm-icon {
  font-size: 28px;
}

.confirm-icon-warning {
  color: #faad14;
}

.confirm-icon-danger {
  color: var(--danger);
}

.confirm-icon-question {
  color: var(--brand-500);
}

.confirm-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.confirm-body {
  margin-bottom: 24px;
}

.confirm-message {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirm-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.confirm-btn-cancel {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.confirm-btn-cancel:hover {
  background: var(--brand-100);
  color: var(--text-primary);
}

.confirm-btn-confirm {
  color: #fff;
}

.confirm-btn-confirm.btn-primary {
  background: var(--brand-500);
}

.confirm-btn-confirm.btn-primary:hover {
  background: var(--brand-600);
}

.confirm-btn-confirm.btn-danger {
  background: var(--danger);
}

.confirm-btn-confirm.btn-danger:hover {
  filter: brightness(1.08);
}

/* ============================================================
   暗色模式适配
   ============================================================ */
@media (prefers-color-scheme: dark) {
  .toast-item {
    background: #2a2a2a;
  }

  .toast-message {
    color: #e0e0e0;
  }

  .confirm-modal {
    background: #2a2a2a;
  }

  .confirm-title {
    color: #fff;
  }

  .confirm-message {
    color: #aaa;
  }

  .confirm-btn-cancel {
    background: #3a3a3a;
    color: #ccc;
  }

  .confirm-btn-cancel:hover {
    background: #4a4a4a;
    color: #fff;
  }
}
.home-v2 {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 10px 0 56px;
  color: var(--text-primary);
}

.home-v2 a {
  text-decoration: none;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 30px;
}

.hero-copy,
.featured-poem,
.lane-card,
.recommend-section,
.tools-section,
.side-card {
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 16px;
}

.hero-copy {
  padding: 34px;
  background:
    radial-gradient(circle at 16% 18%, rgba(183, 121, 31, 0.12), transparent 28%),
    linear-gradient(135deg, #fff 0%, #f7f2e9 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(154, 101, 25, 0.1);
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 36px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
  line-height: 1.75;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  min-height: 54px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-strong);
}

.home-search svg {
  color: var(--brand-600);
  flex: 0 0 auto;
}

.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
}

.home-search input::placeholder {
  color: #6b7280;
}

.home-search button,
.featured-actions button,
.featured-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.home-search button:hover,
.featured-actions button:hover,
.featured-actions a:hover {
  background: #7a4d13;
  border-color: #7a4d13;
  transform: translateY(-1px);
}

.hot-keywords {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hot-keywords span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.hot-keywords button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(154, 101, 25, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-600);
  cursor: pointer;
}

.hot-keywords button:hover {
  border-color: var(--brand-600);
  background: #fff;
}

.featured-poem {
  padding: 28px;
  background:
    linear-gradient(180deg, #2f2418 0%, #4a3218 100%);
  color: #fffaf0;
}

.featured-label {
  color: #f3d6a5;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}

.featured-poem h2 {
  margin: 0;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: 34px;
  line-height: 1.2;
}

.featured-meta {
  margin-top: 8px;
  color: #ead9c0;
  font-size: 14px;
}

.featured-poem blockquote {
  margin: 28px 0 16px;
  padding: 0;
  border: 0;
  color: #fff8ea;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: 28px;
  line-height: 1.65;
}

.featured-poem p {
  margin: 0 0 24px;
  color: #f0e3d0;
  line-height: 1.7;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.featured-actions a {
  background: transparent;
  border-color: rgba(255, 250, 240, 0.55);
  color: #fffaf0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading.compact {
  display: block;
}

.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: 22px;
  line-height: 1.25;
}

.section-heading p {
  max-width: 560px;
  margin: 6px 0 0;
  color: #4b5563;
  line-height: 1.6;
}

.main-lanes {
  margin-bottom: 30px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lane-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  color: var(--text-primary);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.lane-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-500);
  background: #fffdf8;
}

.lane-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(183, 121, 31, 0.12);
  color: var(--brand-600);
}

.lane-write .lane-icon {
  background: rgba(47, 133, 90, 0.12);
  color: #2f855a;
}

.lane-discuss .lane-icon {
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
}

.lane-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.lane-card p {
  min-height: 66px;
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.lane-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.lane-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: #374151;
  font-size: 12px;
}

.lane-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  color: var(--brand-600);
  font-weight: 700;
}

.home-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.content-column {
  display: grid;
  gap: 20px;
}

.recommend-section,
.tools-section,
.side-card {
  padding: 22px;
}

.recommend-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.poem-row {
  display: grid;
  grid-template-columns: 120px 80px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #fff;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.poem-row:hover {
  border-color: var(--brand-500);
  background: #fffdf8;
}

.poem-row-title {
  font-weight: 800;
  color: #1f2937;
}

.poem-row span:not(.poem-row-title) {
  color: #4b5563;
}

.poem-row em {
  color: #6b4c1f;
  font-style: normal;
}

.poet-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.poet-strip a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-muted);
  color: var(--text-primary);
}

.poet-strip a:hover {
  background: rgba(183, 121, 31, 0.12);
}

.poet-strip strong {
  font-size: 16px;
}

.poet-strip span {
  color: #4b5563;
  font-size: 13px;
}

.writing-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.writing-tool {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.writing-tool:hover {
  border-color: var(--brand-500);
  background: #fffdf8;
}

.writing-tool > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(154, 101, 25, 0.1);
  color: var(--brand-600);
}

.writing-tool strong {
  display: block;
  margin-bottom: 4px;
}

.writing-tool p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

.home-side-panel {
  display: grid;
  gap: 14px;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-600);
  font-weight: 800;
  margin-bottom: 14px;
}

.side-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.side-card p {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.65;
}

.side-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand-600);
  font-weight: 800;
}

.home-checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-checklist li {
  color: #374151;
  line-height: 1.55;
}

.home-checklist li::before {
  content: "•";
  color: var(--brand-600);
  margin-right: 8px;
}

.continue-card {
  background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}

.community-card {
  background: #fffdf8;
}

.commission-section {
  margin-top: 24px;
}

.commission-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 16px;
  border: 1px solid var(--border-default);
  background: #fff;
  color: var(--text-primary);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.commission-card:hover {
  transform: translateY(-1px);
  border-color: var(--brand-500);
  background: #fffdf8;
}

.commission-copy {
  min-width: 0;
}

.commission-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 800;
}

.commission-card h2 {
  margin: 14px 0 8px;
  color: #1f2937;
  font-size: 24px;
  line-height: 1.25;
}

.commission-card p {
  max-width: 680px;
  margin: 0;
  color: #4b5563;
  line-height: 1.65;
}

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

.commission-tags span {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: #6b5a49;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
}

.commission-action {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.commission-action svg {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .home-hero,
  .home-content-grid {
    grid-template-columns: 1fr;
  }

  .lane-grid {
    grid-template-columns: 1fr;
  }

  .commission-card {
    flex-direction: column;
  }

  .commission-action {
    align-self: flex-start;
  }

  .lane-card p {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .home-v2 {
    width: min(100% - 24px, 1180px);
    padding-bottom: 32px;
  }

  .hero-copy,
  .featured-poem,
  .recommend-section,
  .tools-section,
  .side-card,
  .commission-card {
    padding: 18px;
    border-radius: 14px;
  }

  .commission-section {
    margin-top: 18px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .home-search {
    align-items: stretch;
    flex-wrap: wrap;
    border-radius: 16px;
    padding: 12px;
  }

  .home-search input {
    flex-basis: calc(100% - 32px);
  }

  .home-search button {
    width: 100%;
  }

  .featured-poem blockquote {
    font-size: 24px;
  }

  .section-heading {
    display: block;
  }

  .poem-row,
  .writing-tools,
  .poet-strip {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 *,
  .home-v2 *::before,
  .home-v2 *::after {
    transition: none !important;
  }
}

/* Four-lane home IA: 学诗 / 背诗 / 写诗 / 论诗 */
.lane-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lane-memorize .lane-icon {
  background: rgba(166, 66, 43, 0.1);
  color: #a6422b;
}

.lane-discuss .lane-icon {
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
}

@media (max-width: 1080px) {
  .lane-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lane-grid {
    grid-template-columns: 1fr;
  }
}
.tasks-page {
  max-width: 1000px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tab:hover {
  border-color: var(--gold);
  color: var(--text-primary);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.tasks-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: block;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.3s ease;
}

.task-item:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.task-badge {
  padding: 4px 10px;
  background: rgba(212, 168, 83, 0.2);
  color: var(--gold);
  font-size: 12px;
  border-radius: 4px;
}

.task-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.task-status.status-active {
  background: rgba(82, 196, 26, 0.15);
  color: #52c41a;
}

.task-status.status-inactive {
  background: rgba(153, 153, 153, 0.15);
  color: #999;
}

.task-status.status-closed {
  background: rgba(255, 77, 79, 0.15);
  color: #ff4d4f;
}

.task-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.task-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.task-reference {
  background: rgba(212, 168, 83, 0.05);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.ref-label {
  color: var(--gold);
  font-size: 12px;
}

.ref-content {
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'STKaiti', 'KaiTi', serif;
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.task-poet-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.poet-avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.task-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.task-divider {
  opacity: 0.5;
}

.task-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

/* 响应式 */
@media (max-width: 768px) {
  .tasks-page {
    padding: 0;
  }

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

  .page-header h1 {
    font-size: 20px;
  }

  .page-header p {
    font-size: 13px;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 12px;
  }

  .tasks-grid {
    gap: 10px;
  }

  .task-item {
    padding: 16px;
  }

  .task-header {
    margin-bottom: 10px;
  }

  .task-badge {
    padding: 3px 8px;
    font-size: 11px;
  }

  .task-name {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .task-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .task-reference {
    padding: 10px;
    margin-bottom: 12px;
  }

  .ref-label {
    font-size: 11px;
  }

  .ref-content {
    font-size: 12px;
  }

  .task-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 12px;
  }

  .task-poet-info {
    font-size: 12px;
  }

  .task-stats {
    font-size: 11px;
  }

  .task-price {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 18px;
  }

  .task-item {
    padding: 14px;
  }

  .task-name {
    font-size: 14px;
  }

  .task-description {
    font-size: 12px;
  }
}
/* 任务详情页 - 中国风浅色主题 */

/* ========== 基础布局 ========== */
.task-detail-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-page) 100%);
  padding: 0 16px 60px;
}

/* 返回链接 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  padding: 24px 0 16px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--brand-500); }

/* 主内容区 */
.detail-main {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 20px;
}

/* ========== 任务标题区 ========== */
.task-header {
  text-align: center;
  margin-bottom: 24px;
}

.task-title {
  font-size: 24px; /* 稍大标题 */
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  font-family: 'STKaiti', 'KaiTi', serif;
  text-align: center; /* 标题居中 */
}

/* ========== 价格区 ========== */
.price-section {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 32px;
}

.price-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-500);
}

.price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-500);
}

.price-unit {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-500);
}

/* ========== 任务描述 ========== */
.desc-section {
  margin-bottom: 32px;
  padding: 20px;
  border-left: 3px solid var(--brand-500);
  background: var(--bg-card);
  border-radius: 0 12px 12px 0;
}

.desc-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0;
  white-space: pre-wrap; /* 支持折行 */
  word-break: break-word;
}

/* ========== 统计数据 ========== */
.stats-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 12px;
}

.stat-item {
  text-align: center;
  min-width: 80px;
}

.stat-value {
  display: block;
  font-size: 20px; /* 缩小一号 */
  font-weight: 600;
  color: var(--brand-500);
  margin-bottom: 4px;
}

.stat-value.deadline {
  font-size: 20px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-default);
}

.detail-bullets {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

/* ========== 提交区域 ========== */
.submit-section {
  margin-bottom: 40px;
}

.answer-form,
.submit-success,
.login-prompt,
.full-prompt {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-default);
  text-align: center;
}

.answer-form {
  text-align: left;
}

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

.answer-icon { font-size: 20px; }
.answer-label {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

.answer-input {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-muted);
  resize: vertical;
  box-sizing: border-box;
}
.answer-input::placeholder { color: var(--text-muted); }
.answer-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(183, 121, 31, 0.25);
}

.answer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.submit-eta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.char-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.prompt-icon { font-size: 48px; margin-bottom: 16px; }
.submit-success h3,
.login-prompt h3,
.full-prompt h3 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.submit-success p,
.login-prompt p,
.full-prompt p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

/* ========== 按钮样式 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 32px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #ffffff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 121, 31, 0.35);
}
.btn-primary:disabled {
  background: var(--border-default);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--brand-500);
  border: 1px solid var(--brand-500);
}
.btn-outline:hover { background: var(--bg-hover); }

/* ========== 规则说明 ========== */
.rules-section {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 16px;
  margin-top: 40px;
}

.rules-title {
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 16px;
  font-weight: 600;
}

.rules-list {
  margin: 0;
  padding-left: 20px;
}

.rules-list li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin: 0;
}

/* ========== 加载/空状态 ========== */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.loading-poem {
  font-size: 64px;
  margin-bottom: 16px;
  animation: float 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.loading-text { font-size: 16px; color: var(--brand-500); }

.empty-container {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-container h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.empty-container p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* ========== 精选答案模块 - 与诗友圈风格一致 ========== */
.approved-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}

.approved-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.approved-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s ease;
}

.submission-card.is-approved {
  border-color: var(--brand-500);
  box-shadow: 0 0 12px rgba(183, 121, 31, 0.16);
}

/* 已采纳标识 */
.approved-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.badge-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.badge-reward {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-500);
}

/* 待审核标识 */
.pending-badge {
  margin-left: auto;
}

.pending-badge .badge-text {
  color: var(--text-secondary);
  font-size: 12px;
}

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

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

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.author-level {
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 500;
}

.submission-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.submission-content {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 12px;
  font-family: 'STKaiti', 'KaiTi', serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.submission-actions {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
}

.action-btn:hover {
  color: var(--brand-500);
  background: var(--brand-100);
}

.like-btn.liked {
  color: var(--danger);
}

.submission-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(183, 121, 31, 0.25);
}

/* 精选答案内的评论列表 */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.comments-list .comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comments-list .comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
}

.comments-list .comment-body {
  flex: 1;
  min-width: 0;
}

.comments-list .comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comments-list .comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-500);
}

.comments-list .comment-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.comments-list .comment-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  word-wrap: break-word;
}

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

.comment-input-row .comment-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}

.comment-input-row .comment-input:focus {
  outline: none;
  border-color: var(--brand-500);
}

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

.btn-sm {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.btn-sm:hover {
  opacity: 0.9;
}

.btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}

.section-icon { font-size: 24px; }

.section-title {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

.section-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* 评论输入框 - 知乎风格 */
.comment-input-box {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-default);
}

.comment-input-wrapper {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-input-area {
  flex: 1;
  position: relative;
}

.comment-textarea {
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-muted);
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.comment-textarea::placeholder { color: var(--text-muted); }
.comment-textarea:focus {
  outline: none;
  border-color: var(--brand-500);
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.comment-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 评论列表 - 知乎风格 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-500);
}

.comment-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.comment-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.comment-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.comment-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.comment-action-btn.liked {
  color: var(--danger);
}
.comment-action-btn.liked .action-icon {
  animation: heartBeat 0.3s ease;
}
@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.action-icon { font-size: 16px; }

/* 回复列表 - 嵌套样式 */
.reply-list {
  margin-top: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--border-default);
}

.reply-item {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(183, 121, 31, 0.25);
}
.reply-item:last-child { border-bottom: none; }

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.reply-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-500);
}

.reply-to {
  font-size: 12px;
  color: var(--text-secondary);
}

.reply-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* 空评论状态 */
.empty-comments {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border-radius: 8px;
}

.empty-comments-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-comments-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .task-detail-page { padding: 0 12px 40px; }
  .task-title { font-size: 24px; }
  .price-value { font-size: 40px; }
  .stats-section { gap: 16px; padding: 16px; }
  .stat-value { font-size: 20px; }
  .comment-avatar-lg { width: 32px; height: 32px; font-size: 14px; }
}
.community-page {
  max-width: 700px;
  margin: 0 auto;
}

/* 头部 */
.community-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
}

.header-title {
  text-align: center;
  margin-bottom: 12px;
}

.publish-btn {
  align-self: flex-start;
  margin-left: 16px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.header-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.header-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.publish-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.publish-btn span {
  font-size: 18px;
  line-height: 1;
}

.publish-btn:hover {
  opacity: 0.9;
}

/* 分类 Tab */
.community-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 16px 16px;
}

.community-tabs .tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.community-tabs .tab.active {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.community-tabs .tab:hover:not(.active) {
  background: rgba(212, 168, 83, 0.1);
}

.community-op-card {
  margin: 0 16px 12px;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: linear-gradient(135deg, #fffdf8 0%, #f9f0e1 100%);
}

.community-op-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.community-op-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.community-op-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.community-topics {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
}

.topic-chip {
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.topic-chip.active {
  border-color: var(--brand-500);
  color: var(--brand-500);
  background: var(--brand-100);
}

/* 关注标签 */
.following-tag {
  font-size: 10px;
  color: var(--gold);
  background: rgba(212, 168, 83, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

/* ============================================= */
/* 朋友圈风格帖子卡片 - Phase 1 改造 */
/* 配色保持原有金色主题，移除卡片边框/背景 */
/* ============================================= */

.posts-list {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.post-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

/* 头像固定左侧，内容区右侧 */
.post-header {
  position: relative;
  padding-left: 50px;
  min-height: 44px;
  margin-bottom: 10px;
  cursor: pointer;
}

.post-avatar {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.post-meta {
  display: flex;
  flex-direction: column;
  min-height: 44px;
}

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

.post-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}

.author-level {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 2px;
}

.post-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 关注标签 */
.following-tag {
  font-size: 10px;
  color: var(--gold);
  background: rgba(212, 168, 83, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.post-content {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 10px;
  font-family: 'STKaiti', 'KaiTi', serif;
  word-break: break-word;
}

/* 朋友圈风格紧凑 9 宫格 */
.post-images {
  display: grid;
  gap: 3px;
  margin: 10px 0;
  border-radius: 4px;
  overflow: hidden;
}

.post-images.grid-1 {
  grid-template-columns: 1fr;
  max-width: 60%;
}

.post-images.grid-1 .post-image-wrapper {
  aspect-ratio: 16/9;
}

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

.post-images.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.post-images.grid-5,
.post-images.grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

.post-images.grid-7,
.post-images.grid-8,
.post-images.grid-9 {
  grid-template-columns: repeat(3, 1fr);
}

.post-image-wrapper {
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(183, 121, 31, 0.08);
  border-radius: 2px;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-image:hover {
  transform: scale(1.02);
}

.post-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.08), rgba(48, 95, 76, 0.08));
}

/* 朋友圈风格底部互动栏 */
.post-actions {
  display: flex;
  gap: 24px;
  padding-top: 8px;
}

.post-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.post-actions button:hover {
  color: var(--gold);
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ============================================= */
/* 朋友圈风格评论区 - Phase 2 改造 */
/* 评论无卡片包裹，内联展示 */
/* ============================================= */

/* 评论区容器 - 朋友圈风格 */
.comments-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(183, 121, 31, 0.08);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 一级评论 - 朋友圈纯文字单行格式 */
.moment-comment {
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}

.moment-comment.author-reply {
  background: rgba(183, 121, 31, 0.08);
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
}

.moment-comment.hot-comment {
  border-left: 2px solid var(--brand-500);
  padding-left: 10px;
}

.moment-author {
  font-weight: 600;
  color: var(--brand-500);
}

.moment-like-count-inline {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.moment-author-tag-inline {
  font-size: 10px;
  color: #fff;
  background: var(--brand-500);
  padding: 0px 4px;
  border-radius: 3px;
}

.moment-poet-badge {
  font-size: 10px;
  color: var(--gold);
  background: rgba(212, 168, 83, 0.15);
  padding: 0px 4px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 500;
}

.moment-level {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

.moment-like-count {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

.moment-sep {
  color: var(--text-secondary);
  margin: 0 2px;
}

.moment-time {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.moment-author-tag {
  font-size: 10px;
  color: #fff;
  background: var(--brand-500);
  padding: 0px 4px;
  border-radius: 3px;
  margin-left: 6px;
}

.moment-content {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}

.moment-reply-ref {
  color: var(--text-secondary);
}

.moment-mention {
  color: var(--brand-500);
  cursor: pointer;
}

.moment-mention:hover {
  text-decoration: underline;
}

.moment-reply-action {
  color: var(--brand-500);
  cursor: pointer;
  transition: opacity 0.2s;
  font-size: 13px;
}

.moment-reply-action:hover {
  opacity: 0.7;
}

/* 回复输入框 - 朋友圈风格（统一间距） */
.moment-reply-input {
  width: 100%;
  margin-top: 8px;
  background: rgba(183, 121, 31, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
}

.moment-reply-hint {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.moment-reply-target {
  color: var(--gold);
}

.moment-cancel-reply {
  color: var(--gold);
  cursor: pointer;
  margin-left: 10px;
}

.moment-cancel-reply:hover {
  text-decoration: underline;
}

.moment-reply-form {
  display: flex;
  gap: 8px;
}

.moment-reply-field {
  flex: 1;
  padding: 8px 10px;
  background: rgba(183, 121, 31, 0.12);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
}

.moment-reply-field:focus {
  outline: none;
  border-color: var(--gold);
}

.moment-reply-submit {
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.moment-reply-submit:hover {
  opacity: 0.9;
}

.moment-reply-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 回复列表 - 朋友圈纯文字单行格式（统一间距） */
.moment-replies {
  width: 100%;
  margin-top: 6px;
  padding-left: 0;
}

.moment-reply-item {
  font-size: 14px;
  line-height: 1.7;
  padding: 3px 0;
  word-wrap: break-word;
}

.moment-reply-connector {
  color: var(--text-secondary);
}

.moment-reply-text {
  color: var(--text-primary);
}

.moment-reply-meta {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 8px;
}

.moment-reply-time {
  margin-right: 8px;
}

/* 子回复缩进 */
.moment-child-replies {
  padding-left: 0;
  border-left: none;
  margin-top: 2px;
}

/* 子回复展开按钮 - 与主展开按钮保持一致 */
.moment-child-expand {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

/* 展开/收起按钮 - 醒目样式 */
.moment-expand-btn {
  font-size: 13px;
  color: var(--brand-500);
  cursor: pointer;
  padding: 5px 0;
  transition: opacity 0.2s;
  display: block;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.moment-expand-btn:hover {
  opacity: 0.75;
  color: var(--brand-500);
}

/* 底部评论输入区 - 朋友圈风格 */
.comment-input-area {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(183, 121, 31, 0.12);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
}

.comment-input:focus {
  outline: none;
  border-color: var(--gold);
}

.comment-submit-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.comment-submit-btn:hover {
  opacity: 0.9;
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 作者标签（保留兼容性） */
.author-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: rgba(212, 168, 83, 0.3);
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 6px;
  line-height: 1.4;
}

/* ============================================= */
/* 响应式适配 - 朋友圈风格 */
/* ============================================= */

@media (max-width: 768px) {
  .community-page {
    max-width: 100%;
  }

  .community-header {
    padding: 12px 0;
    margin-bottom: 12px;
  }

  .header-title h1 {
    font-size: 18px;
  }

  .header-title p {
    font-size: 12px;
  }

  .publish-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .publish-btn span {
    font-size: 16px;
  }

  .post-card {
    padding: 12px 14px;
  }

  .post-header {
    padding-left: 50px;
    min-height: 40px;
    margin-bottom: 8px;
  }

  .post-avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

  .post-author {
    font-size: 14px;
  }

  .post-time {
    font-size: 11px;
  }

  .post-content {
    font-size: 14px;
    line-height: 1.7;
    padding-left: 0;
  }

  .post-images {
    gap: 2px;
  }

  .post-images.grid-1 {
    max-width: 70%;
  }

  .post-images.grid-3,
  .post-images.grid-4,
  .post-images.grid-5,
  .post-images.grid-6,
  .post-images.grid-7,
  .post-images.grid-8,
  .post-images.grid-9 {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-actions {
    gap: 16px;
  }

  .post-actions button {
    font-size: 12px;
  }

  .comments-section {
    margin-top: 10px;
    padding-top: 10px;
  }

  .comment-post-card .post-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
    position: static;
    padding-left: 0;
  }

  .comment-post-card .post-author {
    font-size: 13px;
  }

  .comment-post-card .post-content {
    font-size: 13px;
    padding-left: 0;
  }

  .comment-post-card .post-actions {
    padding-left: 0;
  }

  .comment-replies {
    padding-left: 36px;
  }

  .comment-input-area {
    flex-direction: column;
  }

  .comment-submit-btn {
    width: 100%;
    padding: 12px;
  }

  .image-preview-modal {
    padding: 20px;
  }

  .preview-close-btn {
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .empty-state {
    padding: 40px 20px;
  }

  .empty-icon {
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  .community-header {
    padding: 10px 0;
    margin-bottom: 10px;
  }

  .header-title h1 {
    font-size: 16px;
  }

  .post-card {
    padding: 10px 12px;
  }

  .post-header {
    padding-left: 46px;
    min-height: 36px;
  }

  .post-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .post-author {
    font-size: 13px;
  }

  .post-time {
    font-size: 10px;
  }

  .post-content {
    font-size: 13px;
    line-height: 1.6;
  }

  .post-actions {
    gap: 12px;
    padding-top: 6px;
  }

  /* 极小屏幕：所有图片网格统一2列 */
  .post-images.grid-2,
  .post-images.grid-3,
  .post-images.grid-4,
  .post-images.grid-5,
  .post-images.grid-6,
  .post-images.grid-7,
  .post-images.grid-8,
  .post-images.grid-9 {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-images.grid-1 {
    max-width: 100%;
  }

  .comment-input {
    font-size: 14px;
    padding: 10px;
  }

  .reply-quote-text {
    max-width: 120px;
  }
}

/* ============================================= */
/* 移动端底部固定评论输入区（宽度 < 768px）*/
/* ============================================= */
@media (max-width: 768px) {
  .comment-input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  }

  /* 帖子列表底部留出固定输入框的空间 */
  .posts-list {
    padding-bottom: 60px;
  }

  /* 评论输入框样式 */
  .comment-input-area .comment-input {
    flex: 1;
    padding: 8px 14px;
    background: rgba(183, 121, 31, 0.12);
    border: 1px solid var(--border-default);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 36px;
  }

  .comment-input-area .comment-submit-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    min-height: 36px;
    white-space: nowrap;
  }

  /* 触摸区域加大：点赞/评论/分享按钮 */
  .post-actions button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 13px;
  }

  /* 展开/收起按钮：加大触摸区域 */
  .moment-expand-btn {
    min-height: 44px;
    min-width: 88px;
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
  }

  /* 朋友圈风格评论区在移动端的展示 */
  .moment-comment {
    padding: 10px 0;
    min-height: 44px;
  }

  /* 回复输入框（楼中楼） */
  .moment-reply-input {
    padding: 8px;
  }

  .moment-reply-form {
    flex-direction: column;
    gap: 6px;
  }

  .moment-reply-field {
    font-size: 14px;
    padding: 8px 10px;
    min-height: 36px;
  }

  .moment-reply-submit {
    width: 100%;
    min-height: 36px;
  }

  /* 帖子间分隔线 */
  .post-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Tab 栏在极小屏幕 */
  .community-tabs .tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .publish-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* 图片预览弹窗 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.image-preview-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-content img {
  max-width: 100%;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
}

.preview-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.preview-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .image-preview-modal {
    padding: 20px;
  }

  .preview-close-btn {
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

/* 懒加载 */
.load-more-trigger {
  padding: 20px 0;
  text-align: center;
}

.loading-more {
  color: var(--gold);
  font-size: 14px;
  padding: 12px;
  animation: pulse 1.5s ease-in-out infinite;
}

.no-more-posts {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 音频播放 */
.post-audio {
  margin-bottom: 12px;
}

.audio-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.audio-play-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* 诗词转发卡片 */
.shared-poem-card {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(212, 168, 83, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shared-poem-card:hover {
  background: rgba(212, 168, 83, 0.35);
  border-color: var(--gold);
}

.shared-poem-card:active {
  transform: scale(0.99);
}

.shared-poem-content {
  flex: 1;
  min-width: 0;
}

.shared-poem-content .shared-poem-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.shared-poem-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'STKaiti', 'KaiTi', serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-arrow {
  font-size: 18px;
  color: var(--gold);
  margin-left: 12px;
  flex-shrink: 0;
}

/* ============================================= */
/* 其他页面元素样式 */
/* ============================================= */

/* 页面头部 */
.community-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
}

.header-title {
  text-align: center;
  margin-bottom: 12px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.header-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.publish-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.publish-btn span {
  font-size: 18px;
  line-height: 1;
}

.publish-btn:hover {
  opacity: 0.9;
}

/* 分类 Tab */
.community-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 16px 16px;
}

.community-tabs .tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(183, 121, 31, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.community-tabs .tab.active {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.community-tabs .tab:hover:not(.active) {
  background: rgba(212, 168, 83, 0.1);
}

/* 加载状态 */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.empty-state .go-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
}

/* 懒加载 */
.load-more-trigger {
  padding: 20px 0;
  text-align: center;
}

.loading-more {
  color: var(--gold);
  font-size: 14px;
  padding: 12px;
  animation: pulse 1.5s ease-in-out infinite;
}

.no-more-posts {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 音频播放 */
.post-audio {
  margin-bottom: 10px;
}

.audio-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.audio-play-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* 诗词转发卡片 */
.shared-poem-card {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shared-poem-card:hover {
  background: rgba(212, 168, 83, 0.25);
  border-color: var(--gold);
}

.shared-poem-card:active {
  transform: scale(0.99);
}

.shared-poem-content {
  flex: 1;
  min-width: 0;
}

.shared-poem-content .shared-poem-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.shared-poem-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'STKaiti', 'KaiTi', serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-arrow {
  font-size: 18px;
  color: var(--gold);
  margin-left: 12px;
  flex-shrink: 0;
}

/* 图片预览弹窗 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.image-preview-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-content img {
  max-width: 100%;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
}

.preview-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.preview-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================= */
/* Phase 3：交互细节优化 */
/* ============================================= */

/* 正文展开提示 */
.expand-hint {
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  margin-left: 4px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.expand-hint:hover {
  opacity: 0.7;
}

/* 点赞按钮红色动效 */
@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.like-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.like-btn:hover {
  color: var(--danger);
}

.like-btn.liked {
  color: var(--danger);
  animation: likePop 0.3s ease;
}

/* 点赞红色填充效果（触摸反馈） */
@keyframes touchRipple {
  0% { box-shadow: 0 0 0 0 rgba(247, 87, 96, 0.4); }
  100% { box-shadow: 0 0 0 8px rgba(247, 87, 96, 0); }
}

/* ===== Community Rebuild 2026 ===== */
.community-rebuild-page {
  --rebuild-ink: #2b2118;
  --rebuild-muted: #7b6b5b;
  --rebuild-paper: #fffaf1;
  --rebuild-soft: #f7efe2;
  --rebuild-line: #eadbc4;
  --rebuild-gold: #c28a36;
  --rebuild-green: #315f4c;
  max-width: 1280px;
  padding: 28px 24px 72px;
  color: var(--rebuild-ink);
}

.community-hero-rebuild {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-bottom: 22px;
}

.community-hero-copy,
.prompt-card-rebuild,
.community-rebuild-page .side-card {
  border: 1px solid var(--rebuild-line);
  box-shadow: 0 18px 50px rgba(80, 55, 28, 0.12);
}

.community-hero-copy {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 34px;
  background: linear-gradient(135deg, #f0ddbd 0%, #fff6e7 100%);
}

.community-hero-copy::after {
  content: "诗友圈";
  position: absolute;
  right: -18px;
  bottom: -28px;
  font-size: 88px;
  font-weight: 900;
  color: rgba(194, 138, 54, 0.09);
  letter-spacing: 0.08em;
}

.community-eyebrow {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  background: #efe0c5;
  color: #8a5a1e;
  font-size: 13px;
  font-weight: 800;
}

.community-hero-copy h1 {
  margin: 18px 0 12px;
  font-size: 42px;
  letter-spacing: -0.04em;
}

.community-hero-copy p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: #5f4d3d;
  font-size: 17px;
  line-height: 1.9;
}

.community-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.publish-primary-btn,
.publish-secondary-btn,
.prompt-card-rebuild button,
.publish-guide-card button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.publish-primary-btn,
.publish-guide-card button {
  background: var(--rebuild-green);
  color: #fff;
}

.publish-secondary-btn {
  border: 1px solid var(--rebuild-line);
  background: #fff;
  color: #8a5a1e;
}

.prompt-card-rebuild {
  border-radius: 30px;
  padding: 26px;
  background: var(--rebuild-green);
  color: #fff;
}

.prompt-card-rebuild span {
  opacity: 0.72;
  font-size: 13px;
}

.prompt-card-rebuild h2 {
  margin: 12px 0;
  font-size: 25px;
}

.prompt-card-rebuild p {
  margin: 0 0 18px;
  line-height: 1.75;
  opacity: 0.86;
}

.prompt-card-rebuild button {
  width: 100%;
  background: #f3cf86;
  color: #342411;
}

.community-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 22px;
}

.community-feed-tabs,
.community-type-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.community-feed-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px;
  border: 1px solid var(--rebuild-line);
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.92);
  backdrop-filter: blur(10px);
}

.community-feed-tabs button,
.community-type-row button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--rebuild-muted);
  font-weight: 800;
  cursor: pointer;
}

.community-feed-tabs button.active {
  background: var(--rebuild-ink);
  color: #fff;
}

.community-type-row button {
  border: 1px solid var(--rebuild-line);
  background: #fff7e9;
  color: #8a5a1e;
}

.community-type-row button.active {
  background: #dce9dd;
  color: var(--rebuild-green);
  border-color: #c6d9c8;
}

.rebuild-post-card {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--rebuild-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(80, 55, 28, 0.08);
}

.rebuild-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: auto;
  padding-left: 0;
  margin-bottom: 14px;
}

.rebuild-avatar {
  position: static;
  width: 50px;
  height: 50px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
}

.rebuild-post-meta {
  flex: 1;
}

.rebuild-post-title {
  margin: 14px 0 8px;
  font-size: 25px;
  color: var(--rebuild-ink);
}

.featured-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f0dfc0;
  color: #8a5a1e;
  font-size: 13px;
  font-weight: 900;
}

.rebuild-post-content {
  margin-bottom: 14px;
  color: #3c2c1e;
  font-size: 17px;
  line-height: 1.95;
  white-space: pre-wrap;
}

.rebuild-shared-poem {
  margin: 16px 0;
  border-radius: 20px;
  background: var(--rebuild-soft);
}

.rebuild-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.rebuild-tag-row span {
  border: 1px solid var(--rebuild-line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff7e9;
  color: #8a5a1e;
  font-size: 13px;
  font-weight: 800;
}

.rebuild-post-actions {
  display: flex;
  gap: 18px;
  border-top: 1px solid #f0e4d3;
  margin-top: 16px;
  padding-top: 14px;
}

.rebuild-post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--rebuild-muted);
  font-weight: 800;
  cursor: pointer;
}

.comments-preview,
.rebuild-comments-section {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: #fbf4e8;
}

.comment-preview-line {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #4a3929;
}

.comment-preview-line strong {
  color: var(--rebuild-green);
}

.comments-preview button {
  border: 0;
  background: transparent;
  color: #8a5a1e;
  font-weight: 800;
  cursor: pointer;
}

.rebuild-comment-input-area {
  margin-top: 12px;
}

.community-side-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.community-side-panel .side-card {
  border-radius: 26px;
  padding: 20px;
  background: #fff;
}

.community-side-panel h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.prompt-side-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px dashed var(--rebuild-line);
  padding: 11px 0;
  background: transparent;
  color: var(--rebuild-muted);
  cursor: pointer;
}

.prompt-side-card button:last-child {
  border-bottom: 0;
}

.publish-guide-card p {
  color: var(--rebuild-muted);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .community-rebuild-page {
    padding: 18px 14px 56px;
  }
  .community-hero-rebuild,
  .community-main-layout {
    grid-template-columns: 1fr;
  }
  .community-hero-copy h1 {
    font-size: 34px;
  }
}

/* Interaction rebuild: likes, comments, replies */
.rebuild-post-actions {
  gap: 10px;
  padding-top: 12px;
}

.rebuild-post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #5f4a32;
  background: rgba(49, 95, 76, .06);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.rebuild-post-actions button:hover:not(:disabled) {
  color: #315f4c;
  background: rgba(49, 95, 76, .12);
}

.rebuild-post-actions button:active:not(:disabled) {
  transform: translateY(1px);
}

.rebuild-post-actions .like-btn.liked {
  color: #a6422b;
  background: rgba(166, 66, 43, .1);
  font-weight: 800;
}

.rebuild-comments-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(92, 63, 32, .12);
  border-radius: 14px;
  background: rgba(255, 250, 240, .72);
}

.rebuild-comments-section .comments-list {
  gap: 8px;
}

.moment-comment {
  display: block;
  padding: 6px 0;
  color: #2b2118;
}

.moment-comment.hot-comment {
  border-left: 0;
  padding-left: 0;
}

.moment-comment.is-reply {
  padding: 7px 0 7px 12px;
  border-radius: 10px;
  background: rgba(49, 95, 76, .045);
}

.moment-comment.reply-target-active {
  background: rgba(199, 146, 66, .12);
}

.moment-comment-line {
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}

.moment-author {
  color: #315f4c;
  font-weight: 800;
}

.moment-comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  color: #806b4f;
  font-size: 12px;
}

.moment-comment-meta button,
.moment-expand-btn {
  border: 0;
  background: transparent;
  color: #315f4c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.moment-comment-meta button:hover,
.moment-expand-btn:hover {
  text-decoration: underline;
}

.moment-replies {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}

.active-reply-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(49, 95, 76, .08);
  color: #315f4c;
  font-size: 13px;
  font-weight: 800;
}

.active-reply-bar button {
  border: 0;
  background: transparent;
  color: #8a3d2b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.rebuild-comment-input-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.rebuild-comment-input-area .comment-input {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(92, 63, 32, .14);
  background: #fffaf0;
  color: #2b2118;
  padding: 0 12px;
}

.rebuild-comment-input-area .comment-input::placeholder {
  color: #735f46;
}

.rebuild-comment-input-area .comment-input:focus {
  outline: none;
  border-color: #315f4c;
  box-shadow: 0 0 0 3px rgba(49, 95, 76, .12);
}

.rebuild-comment-input-area .comment-submit-btn {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 16px;
  background: #315f4c;
  color: #fff;
  font-weight: 900;
}

.rebuild-comment-input-area .comment-submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .rebuild-post-actions { gap: 6px; }
  .rebuild-post-actions button { padding: 7px 9px; }
  .rebuild-comments-section { padding: 10px; border-radius: 12px; }
}

/* Prototype hard alignment: post card, details, actions */
.community-rebuild-page {
  --proto-ink: #2b2118;
  --proto-muted: #7b6b5b;
  --proto-line: #eadbc4;
  --proto-paper: #fffaf1;
  --proto-gold: #c28a36;
  --proto-gold-dark: #8a5a1e;
  --proto-green: #315f4c;
}

.rebuild-posts-list {
  gap: 18px;
}

.rebuild-post-card {
  background: #fff;
  border: 1px solid var(--proto-line);
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 0;
  box-shadow: 0 14px 34px rgba(80,55,28,.08);
}

.rebuild-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 0;
  min-height: 48px;
  margin-bottom: 0;
}

.rebuild-avatar,
.rebuild-post-header .post-avatar {
  position: static;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
}

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

.rebuild-post-meta .author-name-row {
  gap: 0;
}

.rebuild-post-meta .post-author {
  display: inline;
  color: var(--proto-ink);
  font-size: 15px;
  font-weight: 900;
}

.rebuild-post-meta .author-level {
  display: inline;
  margin-left: 4px;
  color: var(--proto-ink);
  font-size: 15px;
  font-weight: 900;
}

.rebuild-post-meta .author-level:before {
  content: ' · ';
  color: var(--proto-ink);
}

.rebuild-post-meta .post-time {
  display: block;
  margin-top: 3px;
  color: var(--proto-muted);
  font-size: 13px;
}

.featured-badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f0dfc0;
  color: var(--proto-gold-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.rebuild-post-title {
  margin: 18px 0 8px;
  color: var(--proto-ink);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 900;
}

.rebuild-post-content {
  margin: 0;
  color: #3c2c1e;
  font-family: 'STKaiti', 'KaiTi', 'Songti SC', serif;
  font-size: 20px;
  line-height: 2.05;
}

.rebuild-shared-poem {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--proto-line);
  border-radius: 20px;
  background: #f7efe2;
}

.rebuild-shared-poem .shared-poem-title {
  color: var(--proto-ink);
  font-size: 16px;
  font-weight: 900;
}

.rebuild-shared-poem .shared-poem-author,
.rebuild-shared-poem .shared-poem-snippet {
  margin-top: 6px;
  color: var(--proto-muted);
}

.rebuild-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.rebuild-tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--proto-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff7e9;
  color: var(--proto-gold-dark);
  font-size: 13px;
  font-weight: 800;
}

.rebuild-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0e4d3;
}

.rebuild-post-actions button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--proto-muted);
  font-size: 14px;
  font-weight: 900;
}

.rebuild-post-actions button:hover:not(:disabled) {
  color: var(--proto-gold-dark);
  background: transparent;
  text-decoration: underline;
}

.rebuild-post-actions .like-btn.liked {
  color: var(--red, #a6422b);
  background: transparent;
}

.comments-preview,
.rebuild-comments-section {
  margin-top: 14px;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: #fbf4e8;
}

.comment-preview-line,
.moment-comment-line {
  color: #3c2c1e;
  line-height: 1.7;
}

.comment-preview-line strong,
.moment-author {
  color: var(--proto-green);
  font-weight: 900;
}

.rebuild-comment-input-area {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.active-reply-bar {
  flex-basis: 100%;
  margin-bottom: 0;
}

.rebuild-comment-input-area .comment-input {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--proto-line);
  border-radius: 999px;
  background: #fff;
  color: var(--proto-ink);
  padding: 0 14px;
}

.rebuild-comment-input-area .comment-submit-btn {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--proto-ink);
  color: #fff;
  font-weight: 900;
}

@media (max-width: 768px) {
  .rebuild-post-card {
    border-radius: 24px;
    padding: 17px;
  }

  .rebuild-post-content {
    font-size: 17px;
    line-height: 1.9;
  }

  .rebuild-comment-input-area {
    position: static;
    box-shadow: none;
    background: transparent;
    border-top: 0;
    padding: 0;
    flex-direction: row;
  }
}

.rebuild-comment-input-area {
  flex-wrap: wrap;
}
.publish-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f1e6 0%, #efe3ce 100%);
  color: #2b2118;
}

.publish-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 250, 240, .92);
  border-bottom: 1px solid rgba(92, 63, 32, .14);
  backdrop-filter: blur(14px);
}

.publish-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #2b2118;
}

.back-btn,
.submit-btn,
.moment-toolbar button,
.moment-topic-grid button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.back-btn {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(49, 95, 76, .08);
  color: #315f4c;
  font-weight: 800;
}

.submit-btn {
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #315f4c 0%, #c79242 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(49, 95, 76, .18);
}

.submit-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.moment-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 30px auto 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
}

.moment-composer-card,
.moment-side-card {
  border: 1px solid rgba(92, 63, 32, .14);
  border-radius: 28px;
  background: rgba(255, 250, 240, .86);
  box-shadow: 0 22px 50px rgba(49, 40, 25, .08);
}

.moment-composer-card { padding: 26px; }
.moment-side-card { padding: 24px; align-self: start; }

.composer-author-line {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.composer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #315f4c;
  color: #fff;
  font-weight: 900;
}

.composer-author-line strong { color: #23180e; font-size: 16px; }
.composer-author-line p { margin: 4px 0 0; color: #735f46; font-size: 13px; line-height: 1.7; }

.moment-textarea {
  width: 100%;
  min-height: 280px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: #2b2118;
  font-size: 18px;
  line-height: 1.9;
  font-family: inherit;
}

.moment-textarea::placeholder { color: #9a8261; }

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  background: #eadcc4;
}

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

.preview-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #7b674d;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.2));
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.56);
  color: #fff;
  cursor: pointer;
}

.moment-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(92, 63, 32, .12);
}

.moment-toolbar button {
  padding: 10px 16px;
  border-radius: 999px;
  background: #315f4c;
  color: #fff;
  font-weight: 900;
}

.moment-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.moment-toolbar span { color: #735f46; font-size: 13px; }

.moment-side-card h2 { margin: 0; color: #23180e; font-size: 18px; }
.moment-side-card p { margin: 8px 0 16px; color: #735f46; line-height: 1.7; font-size: 13px; }

.moment-topic-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.moment-topic-grid button {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 95, 76, .08);
  color: #315f4c;
  font-weight: 800;
}
.moment-topic-grid button.active { background: #315f4c; color: #fff; }

@media (max-width: 820px) {
  .publish-header { padding: 14px 16px; }
  .moment-shell { width: calc(100% - 24px); grid-template-columns: 1fr; margin-top: 16px; }
  .moment-composer-card, .moment-side-card { border-radius: 22px; padding: 18px; }
  .moment-textarea { min-height: 220px; font-size: 16px; }
}

.publish-header-spacer {
  width: 112px;
  height: 1px;
}

.moment-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(92, 63, 32, .12);
}

.moment-submit-row > span {
  color: #735f46;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 820px) {
  .publish-header-spacer { width: 82px; }
  .moment-submit-row {
    position: sticky;
    bottom: 0;
    z-index: 12;
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -18px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 250, 240, .96);
    backdrop-filter: blur(12px);
  }
  .moment-submit-row .submit-btn { flex: 0 0 auto; }
}
.poets-page {
  max-width: 800px;
  margin: 0 auto;
}

.loading-poets {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.poets-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.poet-detail-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.poet-detail-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.poet-big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.poet-header-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.poet-era {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.unlock-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}

.unlock-badge.unlocked {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.unlock-badge.locked {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.poet-body {
  margin-bottom: 16px;
}

.poet-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.poet-body strong {
  color: var(--gold);
}

.poet-intro {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.poet-footer {
  text-align: right;
}

.chat-hint {
  font-size: 13px;
  color: var(--gold);
}

/* 未解锁状态样式 */
.poet-detail-card.poet-locked {
  opacity: 0.7;
  cursor: not-allowed;
}

.poet-detail-card.poet-locked:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

.poet-detail-card.poet-locked .poet-big-avatar {
  filter: grayscale(0.5);
}

.chat-hint.locked-hint {
  color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
  .poets-page {
    max-width: 100%;
  }

  .poets-list {
    gap: 14px;
  }

  .poet-detail-card {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  .poet-header {
    gap: 12px;
    margin-bottom: 12px;
  }

  .poet-big-avatar {
    width: 52px;
    height: 52px;
    font-size: 16px;
  }

  .poet-header-info h2 {
    font-size: 17px;
    margin-bottom: 2px;
  }

  .poet-era {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .unlock-badge {
    padding: 3px 8px;
    font-size: 10px;
  }

  .poet-body {
    margin-bottom: 12px;
  }

  .poet-body p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
  }

  .poet-intro {
    padding-top: 10px;
    margin-top: 10px;
  }

  .chat-hint {
    font-size: 12px;
  }

  .loading-poets {
    padding: 40px 16px;
  }
}

@media (max-width: 480px) {
  .poets-list {
    gap: 12px;
  }

  .poet-detail-card {
    padding: 14px;
  }

  .poet-header {
    gap: 10px;
  }

  .poet-big-avatar {
    width: 46px;
    height: 46px;
    font-size: 14px;
  }

  .poet-header-info h2 {
    font-size: 16px;
  }

  .poet-body p {
    font-size: 12px;
  }
}
.poet-chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(183, 121, 31, 0.18);
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 18px;
}

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

.chat-poet-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-status {
  font-size: 12px;
  color: var(--success);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-message {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.welcome-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.welcome-content {
  background: rgba(212, 168, 83, 0.1);
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  max-width: 80%;
}

.welcome-content p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  font-family: 'STKaiti', 'KaiTi', serif;
}

.message {
  display: flex;
  gap: 12px;
}

.message.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  overflow: hidden;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
}

.welcome-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.msg-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  position: relative;
}

.message.assistant .msg-content {
  background: rgba(212, 168, 83, 0.1);
  border-bottom-left-radius: 4px;
}

.message.user .msg-content {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-bottom-right-radius: 4px;
}

.msg-content p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.msg-time {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-top: 4px;
  display: block;
}

.typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(183, 121, 31, 0.18);
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-primary);
  font-size: 14px;
}

.chat-input:focus {
  outline: none;
  border-color: var(--brand-500);
}

.send-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 24px;
  color: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.4);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}
.profile-page {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--bg-dark);
  border: 3px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

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

.profile-info h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  text-align: left;
}

.profile-bio {
  font-size: 13px;
  color: var(--text-secondary);
  margin: -4px 0 8px 0;
  text-align: left;
  font-style: italic;
  opacity: 0.85;
}

/* 昵称+等级同一行 */
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.profile-name-row h1 {
  margin: 0;
}

.level-inline {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.2) 0%, rgba(183, 121, 31, 0.16) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 600;
  white-space: nowrap;
}

/* 等级徽章包装器 - 去掉左侧padding */
.level-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.2) 0%, rgba(183, 121, 31, 0.16) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 13px;
  color: var(--brand-500);
  font-weight: 600;
  margin-bottom: 8px;
}

.level-badge {
  font-size: 13px;
  color: var(--brand-500);
  font-weight: 600;
  white-space: nowrap;
}

.exp-bar {
  width: 200px;
  height: 28px;
  background: rgba(212, 168, 83, 0.2);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.exp-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 14px;
  transition: width 0.3s ease;
}

.exp-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* 统计数据 */
.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-item.clickable {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.stat-item.clickable:hover {
  background: rgba(212, 168, 83, 0.1);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-500);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 菜单列表 */
.profile-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

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

.menu-item:hover {
  background: rgba(212, 168, 83, 0.1);
}

.menu-icon {
  font-size: 18px;
  margin-right: 12px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
}

.menu-arrow {
  font-size: 20px;
  color: var(--text-secondary);
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.profile-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.profile-login-card h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.profile-login-card p {
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.profile-login-btn {
  border-radius: 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .profile-page {
    padding: 16px;
  }
  
  .profile-header {
    padding: 16px;
    gap: 12px;
  }
  
  .profile-avatar-large {
    width: 64px;
    height: 64px;
    font-size: 18px;
  }
  
  .profile-info h1 {
    font-size: 18px;
  }
  
  .exp-bar {
    width: 150px;
  }
}
.wallet-page {
  max-width: 600px;
  margin: 0 auto;
}

.wallet-header {
  margin-bottom: 24px;
}

.balance-card {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #fffdf8 0%, #f4efe5 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}

.balance-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  line-height: 1.2;
  padding: 8px 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.withdraw-btn {
  display: inline-block;
}

.wallet-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.wallet-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.record-icon {
  font-size: 24px;
  margin-right: 12px;
  flex-shrink: 0;
}

.record-info {
  flex: 1;
  min-width: 0;
}

.record-desc {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.record-reject-reason {
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 4px;
}

.record-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.pending-notice {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 16px;
  padding: 8px 16px;
  background: var(--brand-100);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.record-amount {
  font-size: 16px;
  font-weight: 600;
}

.record-amount.income {
  color: var(--success);
}

.record-amount.expense {
  color: var(--danger);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .wallet-page {
    max-width: 100%;
  }

  .balance-card {
    padding: 32px 20px;
  }

  .balance-amount {
    font-size: 36px;
    min-height: 48px;
  }

  .balance-label {
    font-size: 13px;
  }

  .wallet-section {
    padding: 16px;
  }

  .wallet-section h3 {
    font-size: 14px;
  }

  .record-item {
    padding: 10px 0;
  }

  .record-desc {
    font-size: 13px;
  }

  .record-date {
    font-size: 11px;
  }

  .record-amount {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .balance-card {
    padding: 24px 16px;
  }

  .balance-amount {
    font-size: 32px;
  }

  .record-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .record-amount {
    align-self: flex-end;
  }
}
.withdraw-page {
  max-width: 500px;
  margin: 0 auto;
}

.withdraw-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.amount-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
}

.currency {
  font-size: 20px;
  color: var(--gold);
  margin-right: 8px;
}

.amount-input-wrapper input {
  flex: 1;
  padding: 16px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
}

.amount-input-wrapper input:focus {
  outline: none;
}

.quick-amounts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.quick-amounts button {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-amounts button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.method-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.method-option:hover {
  border-color: var(--gold);
}

.method-option.selected {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
}

.method-option input {
  display: none;
}

.alipay-info-group {
  margin-top: 20px;
}

.alipay-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-label {
  min-width: 80px;
  font-size: 14px;
  color: var(--text-secondary);
}

.alipay-inputs input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.alipay-inputs input:focus {
  outline: none;
  border-color: var(--gold);
}

.alipay-inputs input::placeholder {
  color: var(--text-secondary);
}

.alipay-inputs input.error {
  border-color: #ff4d4f;
}

.error-text {
  font-size: 12px;
  color: #ff4d4f;
  margin-top: 4px;
  margin-left: 92px;
}

/* 兼容旧样式 */
.bank-info-group {
  margin-top: 20px;
}

.bank-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bank-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.bank-input:focus {
  outline: none;
  border-color: var(--gold);
}

.bank-input::placeholder {
  color: var(--text-secondary);
}

.withdraw-info {
  background: rgba(212, 168, 83, 0.05);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.withdraw-info p {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 8px;
}

.withdraw-info ul {
  margin: 0;
  padding-left: 20px;
}

.withdraw-info li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.withdraw-timeline {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(44, 24, 16, 0.35);
}

.timeline-title {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 10px;
}

.timeline-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.2);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.timeline-line {
  width: 18px;
  height: 1px;
  background: var(--border);
}

.submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
  .withdraw-page {
    max-width: 100%;
  }

  .withdraw-form {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

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

  .form-group label {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .amount-input-wrapper {
    padding: 0 12px;
  }

  .currency {
    font-size: 18px;
    margin-right: 6px;
  }

  .amount-input-wrapper input {
    padding: 14px 0;
    font-size: 22px;
  }

  .quick-amounts {
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .quick-amounts button {
    padding: 8px 12px;
    font-size: 12px;
  }

  .method-option {
    padding: 12px;
  }

  .bank-info-group {
    margin-top: 16px;
  }

  .bank-inputs {
    gap: 10px;
  }

  .bank-input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .withdraw-info {
    padding: 12px;
    margin-bottom: 16px;
  }

  .withdraw-info p {
    font-size: 12px;
  }

  .withdraw-info li {
    font-size: 11px;
  }

  .submit-btn {
    padding: 14px;
    font-size: 15px;
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .withdraw-form {
    padding: 14px;
  }

  .amount-input-wrapper input {
    font-size: 20px;
    padding: 12px 0;
  }

  .quick-amounts button {
    padding: 6px 10px;
    font-size: 11px;
  }
}
.badges-page {
  max-width: 700px;
  margin: 0 auto;
}

.current-level-card {
  background: linear-gradient(135deg, rgba(139, 94, 60, 0.3) 0%, rgba(183, 121, 31, 0.18) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

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

.level-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--bg-dark);
}

.level-info {
  flex: 1;
}

.level-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.level-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(212, 168, 83, 0.2);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

.level-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  opacity: 0.5;
}

.level-item.unlocked {
  opacity: 1;
  background: rgba(212, 168, 83, 0.1);
}

.level-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.level-item.unlocked .level-badge {
  background: var(--gold);
  color: var(--bg-dark);
}

.level-detail {
  flex: 1;
}

.level-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.level-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.level-exp {
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 600;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.badge-card {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  opacity: 0.5;
}

.badge-card.earned {
  opacity: 1;
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--brand-500);
}

.badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.badge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.badge-locked {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
}

.badge-status {
  font-size: 11px;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

.badge-status.earned-status {
  color: var(--success);
  background: rgba(47, 133, 90, 0.15);
}

.badge-status.locked-status {
  color: var(--text-secondary);
  background: var(--bg-muted);
}

/* 稀有度样式 */
.badge-rarity-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 500;
}

.badge-card.rarity-common .badge-rarity-tag {
  color: var(--text-muted);
  background: rgba(158, 158, 158, 0.15);
}

.badge-card.rarity-rare .badge-rarity-tag {
  color: var(--brand-500);
  background: var(--brand-100);
}

.badge-card.rarity-epic .badge-rarity-tag {
  color: var(--brand-600);
  background: rgba(154, 101, 25, 0.12);
}

.badge-card.rarity-legendary .badge-rarity-tag {
  color: var(--brand-500);
  background: rgba(183, 121, 31, 0.15);
}

.badge-card.rarity-legendary.earned {
  border-color: var(--brand-500);
  box-shadow: 0 0 15px rgba(183, 121, 31, 0.3);
}

.badge-card.rarity-epic.earned {
  border-color: var(--brand-600);
}

.badge-card.rarity-rare.earned {
  border-color: var(--brand-500);
}

/* 徽章统计卡片 */
.badges-stats-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.stats-item {
  text-align: center;
  flex: 1;
}

.stats-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-500);
  margin-bottom: 4px;
}

.stats-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stats-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* 区块头部 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-progress {
  font-size: 13px;
  color: var(--brand-500);
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(212, 168, 83, 0.1);
  border-radius: 12px;
}

.section-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* 当前特权 */
.current-privilege {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 168, 83, 0.2);
}

.privilege-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.privilege-text {
  font-size: 13px;
  color: var(--brand-500);
  font-weight: 500;
}

.rules-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.4);
  border-radius: 20px;
  color: var(--brand-500);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
}

.rules-link:hover {
  background: rgba(212, 168, 83, 0.25);
  border-color: var(--brand-500);
  transform: translateY(-1px);
}

/* 等级时间线样式 */
.levels-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.level-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  position: relative;
  opacity: 0.5;
}

.level-timeline-item.unlocked {
  opacity: 1;
}

.level-timeline-item.current {
  background: rgba(212, 168, 83, 0.05);
  margin: 0 -12px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
}

.timeline-connector {
  position: absolute;
  left: 19px;
  top: 48px;
  bottom: -16px;
  width: 2px;
  background: var(--border);
}

.level-timeline-item.unlocked .timeline-connector {
  background: linear-gradient(180deg, var(--gold) 0%, var(--border) 100%);
}

.level-timeline-item:last-child .timeline-connector {
  display: none;
}

.timeline-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.level-timeline-item.unlocked .timeline-badge {
  background: var(--gold);
  color: var(--bg-dark);
}

.level-timeline-item.current .timeline-badge {
  box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.2);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.timeline-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-exp {
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 600;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-privilege {
  font-size: 12px;
  color: var(--brand-500);
  opacity: 0.8;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .badges-page {
    max-width: 100%;
  }

  .current-level-card {
    padding: 16px;
  }

  .level-display {
    gap: 12px;
  }

  .level-number {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .level-name {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .progress-text {
    font-size: 11px;
  }

  .current-privilege {
    margin-top: 12px;
    padding-top: 12px;
  }

  .privilege-label,
  .privilege-text {
    font-size: 12px;
  }

  .badges-stats-card {
    padding: 16px;
  }

  .stats-number {
    font-size: 24px;
  }

  .stats-label {
    font-size: 11px;
  }

  .section {
    padding: 16px;
  }

  .section h3 {
    font-size: 14px;
  }

  .section-progress {
    font-size: 12px;
    padding: 3px 10px;
  }

  .badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .badge-card {
    padding: 16px 10px;
  }

  .badge-icon {
    font-size: 28px;
  }

  .badge-name {
    font-size: 12px;
  }

  .badge-desc {
    font-size: 10px;
  }

  .level-timeline-item {
    gap: 12px;
    padding: 12px 0;
  }

  .level-timeline-item.current {
    margin: 0 -8px;
    padding: 12px 8px;
  }

  .timeline-badge {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .timeline-connector {
    left: 15px;
    top: 40px;
  }

  .timeline-name {
    font-size: 14px;
  }

  .timeline-exp {
    font-size: 11px;
  }

  .timeline-desc,
  .timeline-privilege {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .badge-card {
    padding: 12px 8px;
  }

  .badge-icon {
    font-size: 24px;
    margin-bottom: 6px;
  }

  .badge-name {
    font-size: 11px;
  }

  .badge-rarity-tag {
    font-size: 9px;
    padding: 1px 4px;
  }

  .level-number {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .level-name {
    font-size: 15px;
  }

  .stats-number {
    font-size: 20px;
  }
}

/* 我的勋章模块响应式 */
@media (max-width: 768px) {
  .my-badges-section {
    padding: 14px;
    margin-bottom: 14px;
  }

  .my-badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .my-badges-section .badge-card {
    padding: 12px 8px;
  }

  .my-badges-section .badge-icon {
    font-size: 26px;
  }

  .my-badges-section .badge-name {
    font-size: 11px;
  }

  .empty-badges {
    padding: 24px 12px;
  }

  .empty-badges .empty-icon {
    font-size: 36px;
  }
}
.level-rules-page {
  max-width: 800px;
  margin: 0 auto;
}

.rules-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.rules-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 等级权益表格 */
.privileges-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.privilege-row {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.privilege-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  gap: 4px;
}

.level-tag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--bg-dark);
}

.level-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.level-exp-req {
  font-size: 11px;
  color: var(--text-secondary);
}

.privilege-list {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.privilege-tag {
  padding: 6px 12px;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-primary);
}

/* 经验值规则列表 */
.exp-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-rule-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.exp-rule-item:hover {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--brand-500);
}

.rule-action {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.rule-exp {
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
}

.rule-desc {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 180px;
  text-align: right;
}

/* 小贴士 */
.tips-section {
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.12) 0%, rgba(183, 121, 31, 0.12) 100%);
}

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

.tip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
}

.tip-icon {
  font-size: 20px;
}

.tip-text {
  font-size: 14px;
  color: var(--text-primary);
}

/* 底部 */
.rules-footer {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

.rules-footer p {
  font-size: 14px;
  color: var(--brand-500);
  margin-bottom: 16px;
}

.back-link {
  display: inline-block;
  padding: 10px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.back-link:hover {
  border-color: var(--brand-500);
  background: rgba(212, 168, 83, 0.1);
}

/* 响应式 */
@media (max-width: 640px) {
  .privilege-row {
    flex-direction: column;
    gap: 12px;
  }

  .privilege-level {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-width: auto;
  }

  .exp-rule-item {
    flex-wrap: wrap;
  }

  .rule-desc {
    width: 100%;
    text-align: left;
    margin-top: 4px;
    padding-left: 0;
  }
}
.vip-page {
  max-width: 600px;
  margin: 0 auto;
}

.vip-hero {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(139, 94, 60, 0.3) 0%, rgba(44, 24, 16, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.vip-crown {
  font-size: 48px;
  margin-bottom: 12px;
}

.vip-hero h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.vip-hero p {
  color: var(--text-secondary);
}

.plans-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.plans-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.plan-card {
  position: relative;
  text-align: center;
  padding: 20px 12px;
  background: rgba(44, 24, 16, 0.5);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.plan-card:hover {
  border-color: var(--gold);
}

.plan-card.selected {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
}

.plan-card.popular {
  border-color: var(--gold);
}

.popular-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
}

.plan-name {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.currency {
  font-size: 14px;
  color: var(--gold);
}

.amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}

.unit {
  font-size: 12px;
  color: var(--text-secondary);
}

.benefits-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.benefits-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.check {
  width: 20px;
  height: 20px;
  background: rgba(74, 222, 128, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #4ade80;
}

.vip-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}
.invite-page {
  max-width: 500px;
  margin: 0 auto;
}

.invite-card {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, rgba(139, 94, 60, 0.3) 0%, rgba(44, 24, 16, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.invite-badge {
  font-size: 48px;
  margin-bottom: 8px;
}

.invite-card > p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.invite-code-box {
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.code-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.code {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
}

.copy-btn {
  padding: 6px 12px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  opacity: 0.9;
}

.steps-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.steps-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 16px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
  .invite-page {
    max-width: 100%;
  }

  .invite-card {
    padding: 24px 16px;
    margin-bottom: 16px;
  }

  .invite-badge {
    font-size: 40px;
    margin-bottom: 6px;
  }

  .invite-reward {
    font-size: 32px;
  }

  .invite-card > p {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .invite-code-box {
    padding: 12px;
  }

  .code {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .copy-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .invite-stats {
    font-size: 12px;
  }

  .steps-section {
    padding: 16px;
  }

  .steps-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .steps-list {
    gap: 12px;
  }

  .step {
    gap: 12px;
  }

  .step-num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .step-title {
    font-size: 13px;
  }

  .step-desc {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .invite-card {
    padding: 20px 12px;
  }

  .invite-reward {
    font-size: 28px;
  }

  .code {
    font-size: 18px;
  }

  .copy-btn {
    padding: 6px 10px;
  }
}
.settings-page {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-weight: 700;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  background: rgba(44, 24, 16, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.form-section h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(44, 24, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.2);
}

.form-group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.save-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.logout-section {
  background: transparent;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.logout-section h3 {
  color: var(--error);
  border-bottom-color: rgba(220, 53, 69, 0.3);
}

.logout-btn {
  width: 100%;
  padding: 12px;
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: var(--error);
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(220, 53, 69, 0.3);
  border-color: var(--error);
}

/* 头像编辑区域 */
.avatar-edit-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avatar-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--bg-dark);
  border: 3px solid var(--border);
  overflow: hidden;
}

.avatar-uploadable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.avatar-uploadable:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.avatar-uploadable:active {
  transform: scale(0.98);
}

.avatar-text {
  font-family: 'STKaiti', 'KaiTi', serif;
}

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

.avatar-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .settings-page {
    padding: 16px;
  }
  
  .form-section {
    padding: 16px;
  }
}
.mytasks-page {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  color: var(--brand-500);
  margin-bottom: 8px;
  font-family: STKaiti, KaiTi, serif;
}

.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

.filter-tabs button.active {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}

.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
}

.task-info h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.task-poet,
.submit-time,
.reward-pending,
.empty-state p,
.loading {
  color: var(--text-secondary);
}

.status-pending {
  background: rgba(183, 121, 31, 0.12);
  color: var(--brand-500);
}

.status-approved {
  background: rgba(47, 133, 90, 0.12);
  color: var(--success);
}

.status-rejected {
  background: rgba(194, 65, 12, 0.12);
  color: var(--danger);
}

.submission-content {
  background: #fcfaf5;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.submission-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.reward-earned {
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
}

.review-comment {
  margin-top: 12px;
  padding: 10px;
  background: var(--brand-100);
  border-radius: 6px;
  border-left: 3px solid var(--brand-500);
}

.review-comment span {
  font-size: 12px;
  color: var(--brand-500);
}

.btn-primary {
  background: var(--brand-500);
  color: #fff;
}
.mypoems-page {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  color: var(--brand-500);
  margin-bottom: 8px;
  font-family: STKaiti, KaiTi, serif;
}

.page-header p {
  font-size: 13px;
  color: rgba(212, 168, 83, 0.6);
}

.btn-add {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(139, 94, 60, 0.3));
  border: 2px dashed rgba(212, 168, 83, 0.4);
  border-radius: 12px;
  color: var(--brand-500);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-add:hover {
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.3), rgba(139, 94, 60, 0.4));
  border-color: rgba(212, 168, 83, 0.6);
}

.poems-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.poem-card {
  background: linear-gradient(135deg, rgba(139, 94, 60, 0.15), rgba(183, 121, 31, 0.1));
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}

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

.poem-header h3 {
  font-size: 16px;
  color: var(--brand-500);
  margin: 0;
  font-family: STKaiti, KaiTi, serif;
}

.btn-delete {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.btn-delete:hover {
  opacity: 1;
}

.poem-content {
  margin-bottom: 12px;
}

.poem-content p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
  font-family: STKaiti, KaiTi, serif;
}

.poem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 4px 10px;
  background: rgba(212, 168, 83, 0.15);
  border-radius: 12px;
  font-size: 11px;
  color: rgba(212, 168, 83, 0.8);
}

.poem-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(212, 168, 83, 0.5);
}

.poem-likes {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  color: rgba(212, 168, 83, 0.6);
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 41, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.2);
}

.modal-header h3 {
  margin: 0;
  color: var(--brand-500);
  font-size: 16px;
}

.btn-close {
  background: none;
  border: none;
  color: rgba(212, 168, 83, 0.6);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  color: rgba(212, 168, 83, 0.8);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: rgba(31, 41, 55, 0.2);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(212, 168, 83, 0.5);
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(212, 168, 83, 0.2);
}

.modal-footer .btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: var(--text-primary);
}

.loading {
  text-align: center;
  padding: 60px;
  color: rgba(212, 168, 83, 0.6);
}
.user-profile-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

.user-profile-page .loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.user-profile-page .back-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile-page .profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.user-profile-page .profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--bg-dark);
  border: 3px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 12px;
}

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

.user-profile-page .profile-info {
  text-align: center;
}

.user-profile-page .profile-info .profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.user-profile-page .profile-info .profile-name-row h1 {
  margin: 0;
}

.user-profile-page .level-inline {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.2) 0%, rgba(183, 121, 31, 0.16) 100%);
  border: 1px solid rgba(139, 94, 60, 0.5);
  border-radius: 16px;
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 600;
  white-space: nowrap;
}

.user-profile-page .profile-info h1 {
  font-size: 20px;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.user-profile-page .level-badge-wrapper {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.2) 0%, rgba(183, 121, 31, 0.16) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--brand-500);
  font-weight: 600;
  margin-bottom: 8px;
}

.user-profile-page .bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0 0 0;
}

.user-profile-page .profile-stats-row {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.user-profile-page .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.user-profile-page .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-profile-page .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-profile-page .action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-profile-page .follow-btn {
  padding: 10px 40px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  transition: all 0.3s ease;
}

.user-profile-page .follow-btn.following {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.user-profile-page .follow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-profile-page .user-posts h2 {
  font-size: 16px;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.user-profile-page .posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile-page .post-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 16px;
}

.user-profile-page .post-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.user-profile-page .post-images {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.user-profile-page .post-images.grid-1 {
  grid-template-columns: 1fr;
}

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

.user-profile-page .post-images.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.user-profile-page .post-image-wrapper {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

.user-profile-page .post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-page .post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-profile-page .post-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-profile-page .post-actions-inline {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.user-profile-page .empty-posts {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.user-profile-page .empty-state {
  text-align: center;
  padding: 60px 20px;
}

.user-profile-page .empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.user-profile-page .empty-state p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.user-profile-page .empty-state button {
  padding: 10px 24px;
  background: var(--gold);
  color: var(--bg-dark);
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

/* ===== User Profile Rebuild 2026 ===== */
.user-profile-rebuild {
  --profile-ink: #2b2118;
  --profile-muted: #7b6b5b;
  --profile-line: #eadbc4;
  --profile-green: #315f4c;
  max-width: 1180px;
  padding: 28px 24px 72px;
  color: var(--profile-ink);
}

.profile-hero-rebuild {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #2f5e4b 0%, #1f342c 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(80, 55, 28, 0.16);
}

.profile-back-btn {
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}

.profile-avatar-rebuild {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.28);
  border-radius: 30px;
  color: #fff;
  font-size: 36px;
  font-weight: 900;
}

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

.profile-main-rebuild h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 34px;
}

.profile-main-rebuild p {
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}

.profile-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-tag-row span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255,255,255,.14);
  font-size: 13px;
}

.profile-action-box {
  display: grid;
  gap: 10px;
}

.profile-action-box button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.profile-action-box button:first-child {
  background: #f3cf86;
  color: #342411;
}

.profile-action-box button:last-child {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: #fff;
}

.profile-stat-rebuild {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.profile-stat-rebuild div,
.profile-section-rebuild {
  border: 1px solid var(--profile-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(80,55,28,.07);
}

.profile-stat-rebuild div {
  padding: 18px;
  text-align: center;
}

.profile-stat-rebuild strong {
  display: block;
  color: var(--profile-ink);
  font-size: 26px;
}

.profile-stat-rebuild span {
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-layout-rebuild {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
  gap: 22px;
}

.profile-section-rebuild {
  margin-bottom: 18px;
  padding: 22px;
}

.profile-section-rebuild h2 {
  margin: 0 0 16px;
  color: var(--profile-ink);
  font-size: 22px;
}

.profile-work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.profile-work-card {
  border: 1px solid var(--profile-line);
  border-radius: 20px;
  padding: 16px;
  background: #fbf4e8;
}

.profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-card-badge,
.profile-post-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(49, 95, 76, 0.12);
  color: var(--profile-green);
  font-size: 12px;
  font-weight: 800;
}

.profile-card-head time {
  color: var(--profile-muted);
  font-size: 12px;
  white-space: nowrap;
}

.profile-work-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.profile-work-subtitle {
  margin-top: -2px !important;
  margin-bottom: 10px !important;
  color: #6b5a49 !important;
  font-size: 13px !important;
  display: block !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

.profile-work-card p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #4a3929;
  line-height: 1.75;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.profile-work-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.profile-work-foot button {
  border: 1px solid var(--profile-line);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #8a5a1e;
  font-weight: 800;
  cursor: pointer;
}

.profile-foot-note {
  color: var(--profile-muted);
  font-size: 13px;
}

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

.profile-post-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.profile-post-head strong {
  font-size: 15px;
  line-height: 1.45;
}

.profile-post-subtitle {
  margin-top: 6px;
  color: #6b5a49;
  font-size: 13px;
  line-height: 1.6;
}

.profile-post-body p {
  margin: 10px 0 10px;
  color: #4a3929;
  line-height: 1.7;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-work-card span,
.profile-post-row-rebuild span {
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-card-head .profile-card-badge,
.profile-post-head .profile-post-badge {
  color: var(--profile-green);
  font-size: 12px;
}

.profile-post-row-rebuild,
.profile-fact-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px dashed var(--profile-line);
  padding: 14px 0;
}

.profile-post-row-rebuild:first-of-type,
.profile-fact-row:first-of-type {
  border-top: 0;
}

.profile-post-row-rebuild strong,
.profile-fact-row strong {
  display: block;
}

.profile-post-row-rebuild button {
  border: 1px solid var(--profile-line);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #8a5a1e;
  font-weight: 800;
  cursor: pointer;
}

.privacy-note {
  margin: 0;
  color: var(--profile-muted);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .profile-hero-rebuild,
  .profile-layout-rebuild,
  .profile-work-grid {
    grid-template-columns: 1fr;
  }
  .profile-stat-rebuild {
    grid-template-columns: repeat(2, 1fr);
  }
}
.follows-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

.follows-page .loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

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

.follows-header .back-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.follows-header h1 {
  font-size: 18px;
  margin: 0;
  color: var(--text-primary);
}

.follows-tabs {
  display: flex;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.follows-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.follows-tabs .tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  font-weight: 600;
}

.follows-tabs .tab-count {
  margin-left: 4px;
  font-size: 12px;
  opacity: 0.8;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-item:hover {
  background: rgba(212, 168, 83, 0.1);
}

.user-item .user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--bg-dark);
  flex-shrink: 0;
  overflow: hidden;
}

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

.user-item .user-info {
  flex: 1;
  min-width: 0;
}

.user-item .user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-item .user-bio {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item .follow-btn {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.user-item .follow-btn:not(.following):not(.mutual) {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  border: none;
}

.user-item .follow-btn.following {
  background: var(--card-bg);
}

.user-item .follow-btn.mutual {
  background: rgba(212, 168, 83, 0.2);
  color: var(--gold);
  border-color: var(--gold);
}

.follows-page .empty-state {
  text-align: center;
  padding: 60px 20px;
}

.follows-page .empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.follows-page .empty-state p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.follows-page .empty-state .go-discover {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fffdf8 0%, #f4efe5 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--brand-500) 0%, #c79242 100%);
  padding: 40px 30px;
  text-align: center;
  color: white;
}

.login-logo {
  font-size: 32px;
  font-weight: 700;
  font-family: 'STKaiti', 'KaiTi', serif;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.login-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

.login-form {
  padding: 30px;
}

.login-form h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  text-align: center;
}

.login-error {
  background: rgba(194, 65, 12, 0.12);
  border: 1px solid rgba(194, 65, 12, 0.25);
  color: var(--danger);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.phone-input-wrapper:focus-within {
  border-color: var(--brand-500);
}

.phone-prefix {
  padding: 12px 16px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 14px;
  border-right: 1px solid #D9D9D9;
}

.phone-input-wrapper input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #000000;
}

.code-input-wrapper {
  display: flex;
  gap: 12px;
}

.code-input-wrapper input {
  flex: 1;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
  color: #000000;
  background: #ffffff;
}

.code-input-wrapper input:focus {
  border-color: var(--brand-500);
}

.send-code-btn {
  padding: 12px 20px;
  background: var(--brand-500);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.send-code-btn:hover:not(:disabled) {
  background: var(--brand-600);
}

.send-code-btn:disabled {
  background: var(--border-default);
  cursor: not-allowed;
}

.invite-input {
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
  color: #000000;
  text-transform: uppercase;
}

.invite-input:focus {
  border-color: var(--brand-500);
}

.invite-input::placeholder {
  color: var(--text-muted);
  text-transform: none;
}

.login-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-500) 0%, #c79242 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.login-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 121, 31, 0.3);
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-tips {
  margin-top: 24px;
  text-align: center;
}

.login-tips p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0;
}

.agreement-link {
  color: var(--brand-500);
  text-decoration: none;
  font-weight: 500;
}

.agreement-link:hover {
  text-decoration: underline;
}

/* 响应式 */
@media (max-width: 480px) {
  .login-container {
    border-radius: 12px;
  }
  
  .login-header {
    padding: 30px 20px;
  }
  
  .login-logo {
    font-size: 28px;
  }
  
  .login-form {
    padding: 24px 20px;
  }
}
/* 协议页面通用样式 */
.agreement-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.agreement-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-block;
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.back-link:hover {
  opacity: 0.8;
}

.agreement-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.update-date {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.agreement-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.agreement-content section {
  margin-bottom: 28px;
}

.agreement-content section:last-child {
  margin-bottom: 0;
}

.agreement-content h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.agreement-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.agreement-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 10px;
}

.agreement-content ul {
  margin: 0;
  padding-left: 20px;
}

.agreement-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.agreement-content li strong {
  color: var(--text-primary);
}

/* 重点高亮区域 */
.highlight-section {
  background: rgba(212, 168, 83, 0.05);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 168, 83, 0.2);
}

.highlight-box {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.highlight-box:last-child {
  margin-bottom: 0;
}

.highlight-box.warning {
  background: rgba(255, 77, 79, 0.05);
  border: 1px solid rgba(255, 77, 79, 0.2);
}

.highlight-box.warning h3 {
  color: #ff4d4f;
}

.highlight-box ul {
  margin-top: 8px;
}

.highlight-box li {
  margin-bottom: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
  .agreement-page {
    padding: 16px 12px 40px;
  }

  .agreement-header h1 {
    font-size: 20px;
  }

  .agreement-content {
    padding: 16px;
  }

  .agreement-content h2 {
    font-size: 15px;
  }

  .highlight-section {
    padding: 16px;
  }
}
.tools-page {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-primary);
  padding: 20px 16px 40px;
}

.tools-header {
  text-align: center;
  padding: 24px 0 20px;
}

.tools-header h1 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 28px;
  color: var(--brand-500);
  margin: 0 0 8px;
  letter-spacing: 4px;
}

.tools-subtitle,
.back-link {
  color: var(--text-secondary);
  font-size: 14px;
}

.back-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 12px;
}

.tools-content {
  max-width: 860px;
  margin: 0 auto;
}

.tools-content > * + * {
  margin-top: 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tool-grid-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 22px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.tool-grid-item:hover {
  transform: translateY(-3px);
  border-color: var(--brand-500);
  box-shadow: var(--shadow-sm);
}

.tool-grid-info h3 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.tool-grid-info p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.tool-grid-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-grid-arrow {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--brand-500);
}

.tools-login-tip,
.tool-card,
.result-card,
.tool-desc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.tools-login-tip {
  text-align: center;
}

.tools-login-tip h3 {
  color: var(--brand-500);
}

.tools-login-tip p {
  color: var(--text-secondary);
}

.tip-btn {
  display: inline-block;
  background: var(--brand-500);
  color: #fff;
  padding: 10px 32px;
  border-radius: 24px;
  text-decoration: none;
}

.gelv-card,
.yunbiao-card {
  border-top: 2px solid var(--brand-500);
}

.yunbiao-btn {
  background: var(--brand-500) !important;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-grid-item {
    grid-template-columns: 40px 1fr auto;
    padding: 16px 12px;
  }
  .tool-grid-info h3 {
    font-size: 16px;
  }
  .tool-grid-info p {
    font-size: 12px;
  }
}
/* ===== 格律检测详情页 ===== */
.gelv-card {
  border-top: 2px solid var(--brand-500);
}

/* ===== 选项区域 ===== */
.tool-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.option-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.option-btns {
  display: flex;
  gap: 10px;
}

.option-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.option-btn:hover {
  border-color: var(--brand-600);
}

.option-btn.active {
  background: linear-gradient(135deg, var(--border-default) 0%, var(--bg-muted) 100%);
  border-color: var(--brand-500);
}

.btn-label {
  display: block;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

.btn-desc {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.option-btn.active .btn-label {
  color: var(--brand-500);
}

/* 诗体按钮 - 四列布局 */
.poem-type-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 韵书选择 */
.rhyme-system-grid {
  grid-template-columns: repeat(3, 1fr);
}

.rhyme-desc {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

.option-chip.active .rhyme-desc {
  opacity: 0.9;
}

.option-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-chip:hover {
  border-color: var(--brand-600);
}

.option-chip.active {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-500);
  color: #fff;
}

/* ===== 输入区域 ===== */
.poem-input-area {
  margin-bottom: 16px;
}

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

.input-hint {
  color: var(--text-secondary);
  font-size: 12px;
}

.demo-btn {
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  color: var(--brand-500);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-btn:hover {
  background: var(--brand-100);
  border-color: var(--brand-500);
}

.poem-textarea {
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: 'STKaiti', 'KaiTi', 'PingFang SC', serif;
  line-height: 2;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.poem-textarea:focus {
  outline: none;
  border-color: var(--brand-500);
}

.poem-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* ===== 操作按钮 ===== */
.tool-actions {
  display: flex;
  gap: 12px;
}

.clear-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  border-color: var(--brand-600);
  color: var(--text-secondary);
}

.check-btn {
  flex: 3;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.check-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-dot {
  animation: dotPulse 1s infinite;
  color: #fff;
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ===== 错误提示 ===== */
.result-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(232, 68, 68, 0.1);
  border: 1px solid rgba(232, 68, 68, 0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

/* ===== 结果卡片 ===== */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-default);
}

.result-header h3 {
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  margin: 0;
  font-size: 16px;
}

.result-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-tag {
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
}

.meta-tag.type-tag {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-color: var(--brand-500);
}

.meta-tag.rhyme-tag {
  background: rgba(78, 205, 196, 0.15);
  border-color: rgba(78, 205, 196, 0.4);
  color: #4ECDC4;
}

/* ===== 判定结果 ===== */
.verdict-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.verdict-section.verdict-合格 {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.2) 0%, rgba(46, 125, 50, 0.1) 100%);
  border: 1px solid rgba(46, 125, 50, 0.3);
}

.verdict-section.verdict-合格 .verdict-icon {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.verdict-section.verdict-平仄微调 {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.verdict-section.verdict-平仄微调 .verdict-icon {
  background: linear-gradient(135deg, #FFC107 0%, #F57C00 100%);
}

.verdict-section.verdict-字数不符,
.verdict-section.verdict-格式不符 {
  background: linear-gradient(135deg, rgba(232, 68, 68, 0.2) 0%, rgba(232, 68, 68, 0.1) 100%);
  border: 1px solid rgba(232, 68, 68, 0.3);
}

.verdict-section.verdict-字数不符 .verdict-icon,
.verdict-section.verdict-格式不符 .verdict-icon {
  background: linear-gradient(135deg, var(--danger) 0%, #C62828 100%);
}

.verdict-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.verdict-info {
  flex: 1;
}

.verdict-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.verdict-message {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 统计信息 ===== */
.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-item.rusheng-stat {
  border-color: rgba(232, 68, 68, 0.3);
}

.stat-item.rusheng-stat .stat-value {
  color: var(--danger);
}

.stat-item.duoyin-stat {
  border-color: rgba(78, 205, 196, 0.3);
}

.stat-item.duoyin-stat .stat-value {
  color: #4ECDC4;
}

/* ===== 韵脚分析 ===== */
.yunjiao-section {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 10px;
}

.yunjiao-section h4 {
  color: #4ECDC4;
  margin: 0 0 10px;
  font-size: 14px;
}

.yunjiao-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yunjiao-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.yunjiao-line {
  color: var(--text-muted);
  min-width: 50px;
}

.yunjiao-char {
  font-family: 'STKaiti', serif;
  font-size: 16px;
  color: var(--text-primary);
  min-width: 30px;
}

.yunjiao-bu {
  color: #4ECDC4;
}

/* ===== 平仄标注展示 ===== */
.lines-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.line-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.line-num {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 36px;
  padding-top: 6px;
  flex-shrink: 0;
}

.chars-display {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}

.char-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36px;
  position: relative;
  animation: charAppear 0.3s ease-out;
}

@keyframes charAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.char-item .char {
  font-size: 20px;
  font-family: 'STKaiti', serif;
  line-height: 1.2;
  width: 100%;
  text-align: center;
  padding: 6px 0 2px;
  border-radius: 6px;
}

.char-item.ping .char {
  background: rgba(46, 125, 50, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 125, 50, 0.3);
}

.char-item.ze .char {
  background: rgba(183, 28, 28, 0.15);
  color: #EF9A9A;
  border: 1px solid rgba(183, 28, 28, 0.3);
}

.char-item.unknown .char {
  background: rgba(93, 64, 55, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(93, 64, 55, 0.3);
}

.char-item.rusheng .char {
  background: rgba(232, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(232, 68, 68, 0.4);
}

.tone-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.char-item.ping .tone-label { color: var(--success); }
.char-item.ze .tone-label { color: #EF9A9A; }
.char-item.rusheng .tone-label { color: var(--danger); }

/* ===== 错误列表 ===== */
.errors-section {
  margin-bottom: 16px;
}

.errors-section h4 {
  color: var(--danger);
  margin: 0 0 10px;
  font-size: 14px;
}

.error-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(232, 68, 68, 0.08);
  border-radius: 8px;
  margin-bottom: 6px;
}

.error-type {
  background: rgba(232, 68, 68, 0.2);
  color: var(--danger);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.error-msg {
  color: var(--text-primary);
  font-size: 13px;
}

/* ===== 图例 ===== */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.ping-dot { background: rgba(46, 125, 50, 0.4); border: 1px solid rgba(46, 125, 50, 0.6); }
.ze-dot { background: rgba(183, 28, 28, 0.4); border: 1px solid rgba(183, 28, 28, 0.6); }
.rusheng-dot { background: rgba(232, 68, 68, 0.4); border: 1px solid rgba(232, 68, 68, 0.6); }
.duoyin-dot { background: rgba(78, 205, 196, 0.4); border: 1px dashed rgba(78, 205, 196, 0.6); }

/* ===== 说明卡片 ===== */
.tool-desc-card h3 {
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  margin: 0 0 16px;
  font-size: 16px;
}

.desc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.desc-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.desc-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.desc-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.desc-item p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}
/* ===== 韵表查询详情页 ===== */
.yunbiao-card {
  border-top: 2px solid var(--brand-500);
}

.yunbiao-btn {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%) !important;
}

/* ===== 选项区域 ===== */
.tool-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.option-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 韵表查询类型选择 */
.yunbiao-type-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* 韵书选择 */
.rhyme-system-grid {
  grid-template-columns: repeat(3, 1fr);
}

.rhyme-desc {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

.option-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.option-chip:hover {
  border-color: var(--brand-600);
}

.option-chip.active {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-500);
  color: #fff;
}

/* ===== 韵表查询输入区域 ===== */
.yunbiao-input-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.yunbiao-char-input {
  flex: 1;
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 24px;
  font-family: 'STKaiti', 'KaiTi', serif;
  text-align: center;
  transition: border-color 0.2s;
}

.yunbiao-char-input:focus {
  outline: none;
  border-color: var(--brand-500);
}

.yunbiao-char-input::placeholder {
  color: var(--text-muted);
  font-size: 14px;
  font-family: 'PingFang SC', sans-serif;
}

.yunbiao-char-preview {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  border: 1px solid rgba(183, 121, 31, 0.35);
  border-radius: 12px;
}

.preview-char {
  font-size: 36px;
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
}

/* ===== 操作按钮 ===== */
.tool-actions {
  display: flex;
  gap: 12px;
}

.clear-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  border-color: var(--brand-600);
  color: var(--text-secondary);
}

.check-btn {
  flex: 3;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.check-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-dot {
  animation: dotPulse 1s infinite;
  color: #fff;
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ===== 错误提示 ===== */
.result-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(232, 68, 68, 0.1);
  border: 1px solid rgba(232, 68, 68, 0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

/* ===== 结果卡片 ===== */
.yunbiao-result-card {
  border-top: 2px solid var(--brand-500);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-default);
}

.result-header h3 {
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  margin: 0;
  font-size: 16px;
}

.result-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-tag {
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
}

.meta-tag.type-tag {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-color: var(--brand-500);
}

.result-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

/* ===== 查询结果显示 ===== */
.yunbiao-result-content {
  padding: 16px 0;
}

.yunbiao-char-display {
  text-align: center;
  margin-bottom: 20px;
}

.big-char {
  font-size: 72px;
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  text-shadow: 0 0 30px rgba(183, 121, 31, 0.35);
}

.yunbiao-buo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yunbu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--brand-100);
  border: 1px solid rgba(183, 121, 31, 0.25);
  border-radius: 10px;
}

.yunbu-label {
  min-width: 70px;
  color: var(--text-secondary);
  font-size: 13px;
}

.yunbu-value {
  color: var(--brand-500);
  font-size: 16px;
  font-family: 'STKaiti', serif;
  font-weight: bold;
}

/* ===== 同韵字结果 ===== */
.same-yun-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}

.same-yun-char {
  font-size: 28px;
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  margin-right: 12px;
}

.same-yun-buo {
  color: var(--text-secondary);
  font-size: 14px;
}

.same-yun-chars {
  text-align: center;
}

.same-yun-total {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 12px;
}

.same-yun-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.same-yun-char-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--brand-100);
  border: 1px solid rgba(183, 121, 31, 0.35);
  border-radius: 8px;
  font-size: 20px;
  font-family: 'STKaiti', serif;
  color: var(--text-primary);
  animation: charAppear 0.3s ease-out;
}

@keyframes charAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.same-yun-more {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ===== 韵部列表结果 ===== */
.yunbu-list-header {
  margin-bottom: 16px;
}

.yunbu-total {
  color: var(--brand-500);
  font-size: 14px;
}

.yunbu-category {
  margin-bottom: 16px;
}

.yunbu-category h4 {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 10px;
  font-weight: normal;
}

.yunbu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yunbu-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 6px 12px;
  background: var(--brand-100);
  border: 1px solid rgba(183, 121, 31, 0.25);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
}

.yunbu-tag.rusheng {
  background: rgba(232, 68, 68, 0.08);
  border-color: rgba(232, 68, 68, 0.2);
  color: var(--danger);
}

/* ===== 说明卡片 ===== */
.tool-desc-card h3 {
  font-family: 'STKaiti', serif;
  color: var(--brand-500);
  margin: 0 0 16px;
  font-size: 16px;
}

.desc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.desc-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.desc-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.desc-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.desc-item p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}
/* 繁简转换页面样式 */
.fanjian-container {
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.fanjian-header {
  text-align: center;
  margin-bottom: 24px;
}

/* 返回链接 */
.fanjian-header .back-link {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.fanjian-header .back-link:hover {
  color: var(--brand-500);
}

.fanjian-header h2 {
  font-size: 24px;
  color: var(--brand-500);
  margin: 0 0 8px 0;
}

.fanjian-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* 模式切换 */
.fanjian-mode-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  border-radius: 12px;
  padding: 4px;
}

.mode-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn.active {
  background: rgba(255,255,255,0.95);
  color: var(--brand-600);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 输入/结果区 */
.fanjian-section {
  margin-bottom: 16px;
}

.fanjian-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.fanjian-input {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-default);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  background: var(--bg-page);
  color: var(--text-primary);
  transition: border-color 0.3s;
}

.fanjian-input:focus {
  outline: none;
  border-color: var(--brand-500);
}

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

.fanjian-result {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  background: var(--brand-100);
  border: 2px solid rgba(183, 121, 31, 0.35);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-primary);
}

.fanjian-char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 操作按钮 */
.fanjian-action {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.convert-btn {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 121, 31, 0.4);
}

.swap-btn {
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 2px solid var(--border-default);
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--brand-500);
}

.swap-btn:hover {
  background: var(--bg-muted);
  border-color: var(--brand-500);
}

/* 复制按钮样式 */
.text-btn {
  background: none;
  border: none;
  color: var(--brand-500);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.text-btn:hover {
  background: var(--brand-100);
}

.text-btn.copied {
  color: var(--success);
}

/* 示例区 */
.fanjian-examples {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}

.fanjian-examples-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.fanjian-example {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: var(--bg-page);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.fanjian-example:hover {
  background: var(--bg-muted);
}

.example-jian {
  color: var(--text-primary);
}

.example-fan {
  color: var(--brand-500);
}

.example-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}
.ai-tool-card,
.ai-result-card {
  border-top: 2px solid var(--brand-500);
}

.ai-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-span-2 {
  grid-column: span 2;
}

.field-block span {
  color: var(--text-secondary);
  font-size: 13px;
}

.field-block input {
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  box-sizing: border-box;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-block .chip-row {
  margin-top: 4px;
}

.ai-tool-card .tool-actions {
  margin-top: 20px;
}

.option-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.option-chip.active {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-500);
  color: #fff;
}

.poem-result-block {
  text-align: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
  line-height: 1.9;
  color: var(--text-primary);
  padding: 8px 0 4px;
}

.poem-result-block p {
  margin: 0;
}

.result-error {
  margin-top: 12px;
  color: #b42318;
  font-size: 13px;
}

.naming-list,
.naming-record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.naming-card,
.naming-record-item {
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--bg-page);
  padding: 14px 16px;
}

.naming-name {
  font-size: 22px;
  font-family: "STKaiti", "KaiTi", serif;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.naming-reason,
.naming-record-values {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.naming-record-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

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

@media (max-width: 768px) {
  .ai-tool-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }
}
/**
 * PoetryCard.css — 诗词目录行样式
 * 对齐 poetry_library_rebuild_prototype.html 中的 catalog-poem-row
 */
.poetry-v2-container .catalog-poem-row.poetry-card {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--poetry-border);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.poetry-v2-container .catalog-poem-row.poetry-card:hover {
  border-color: var(--poetry-border-strong);
  background: #fffdf8;
  box-shadow: 0 8px 22px rgba(55, 37, 18, 0.06);
}

.poetry-v2-container .poetry-card-title {
  margin: 0;
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
  font-size: 21px;
}

.poetry-v2-container .poetry-card-meta {
  margin-top: 2px;
  color: var(--poetry-text-tertiary);
  font-size: 13px;
}

.poetry-v2-container .poetry-card-meta a {
  color: var(--poetry-accent-bright);
}

.poetry-v2-container .poetry-card-excerpt {
  margin: 7px 0 0;
  color: var(--poetry-text-secondary);
  font-family: var(--poetry-serif);
  font-size: 16px;
}

.poetry-v2-container .poetry-card-tags {
  margin-top: 10px;
}

.poetry-v2-container .poetry-card-actions {
  justify-content: flex-end;
}

.poetry-v2-container .poetry-card-action {
  border: 1px solid var(--poetry-border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--poetry-accent-bright);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  font-family: var(--poetry-sans);
  cursor: pointer;
}

@media (max-width: 900px) {
  .poetry-v2-container .catalog-poem-row.poetry-card {
    grid-template-columns: 1fr;
  }

  .poetry-v2-container .poetry-card-actions {
    justify-content: flex-start;
  }
}
/**
 * PoetryFooter.css — 诗词页脚样式
 * 提取自原型 .site-footer
 */
.poetry-v2-container .poetry-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--poetry-divider);
  text-align: center;
}

.poetry-v2-container .footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.poetry-v2-container .footer-links a {
  font-size: 12px;
  color: var(--poetry-text-tertiary);
  transition: color 0.2s;
}

.poetry-v2-container .footer-links a:hover {
  color: var(--poetry-accent);
}

.poetry-v2-container .footer-copy {
  font-size: 11px;
  color: var(--poetry-text-tertiary);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .poetry-v2-container .footer-links {
    gap: 10px;
  }
}
/**
 * PoetryIndexV2.css — 对齐 poetry_library_rebuild_prototype.html 的目录页
 */
.poetry-catalog-page .catalog-head {
  border: 1px solid var(--poetry-border);
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  margin-bottom: 16px;
}

.poetry-catalog-page .catalog-head h1 {
  margin: 0 0 10px;
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
  font-size: 26px;
}

.poetry-catalog-page .catalog-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.poetry-catalog-page .catalog-search-row input {
  width: 100%;
  border: 1px solid var(--poetry-border);
  outline: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--poetry-text);
  background: #fff;
}

.poetry-catalog-page .catalog-search-row button[type="submit"] {
  border: 0;
  background: var(--poetry-accent-bright);
  color: #fffaf0;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 18px;
}

.poetry-catalog-page .advanced-toggle {
  border: 1px solid var(--poetry-border);
  background: #fff;
  color: var(--poetry-accent-bright);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
}

.poetry-catalog-page .search-mode-row,
.poetry-catalog-page .filter-chip-row,
.poetry-catalog-page .catalog-topic-tags,
.poetry-catalog-page .seo-link-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.poetry-catalog-page .search-mode-row {
  margin-top: 12px;
}

.poetry-catalog-page .search-mode-row button,
.poetry-catalog-page .filter-chip-row button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--poetry-border);
  color: var(--poetry-text-tertiary);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 700;
}

.poetry-catalog-page .search-mode-row button.active,
.poetry-catalog-page .filter-chip-row button.active {
  color: #fffaf0;
  background: var(--poetry-accent-bright);
  border-color: var(--poetry-accent-bright);
}

.poetry-catalog-page .advanced-filter-box {
  margin-top: 12px;
  border: 1px solid var(--poetry-divider);
  background: #fffdf8;
  border-radius: 12px;
  padding: 12px;
}

.poetry-catalog-page .filter-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.poetry-catalog-page .filter-line + .filter-line {
  margin-top: 10px;
}

.poetry-catalog-page .filter-label {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
  font-weight: 800;
  padding-top: 5px;
}

.poetry-catalog-page .catalog-hot-search {
  margin-top: 12px;
}

.poetry-catalog-page .seo-tool-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.poetry-catalog-page .seo-tool-link {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(32, 59, 49, 0.08);
  color: #203b31;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.poetry-catalog-page .seo-tool-link:hover {
  background: rgba(32, 59, 49, 0.14);
}

.poetry-catalog-page .hot-search-label {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
  font-weight: 800;
}

.poetry-catalog-page .hot-search-tag,
.poetry-catalog-page .active-filter-summary span,
.poetry-catalog-page .catalog-topic-tags button,
.poetry-catalog-page .seo-link-list a {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(183, 121, 31, 0.09);
  color: var(--poetry-accent-bright);
  font-size: 13px;
  font-weight: 700;
}

.poetry-catalog-page .catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.poetry-catalog-page .catalog-result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-catalog-page .catalog-poem-list {
  display: grid;
  gap: 12px;
}

.poetry-catalog-page .author-search-results {
  border: 1px solid rgba(183, 121, 31, 0.18);
  background: linear-gradient(135deg, #fffaf0 0%, #ffffff 70%);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.poetry-catalog-page .author-search-title {
  margin-bottom: 10px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  font-weight: 900;
}

.poetry-catalog-page .author-result-grid {
  display: grid;
  gap: 10px;
}

.poetry-catalog-page .author-result-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--poetry-divider);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.poetry-catalog-page .author-result-card:hover {
  border-color: rgba(183, 121, 31, 0.42);
  box-shadow: 0 10px 26px rgba(86, 54, 22, 0.08);
}

.poetry-catalog-page .author-result-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #203b31;
  color: #fffaf0;
  font-family: var(--poetry-serif);
  font-size: 22px;
  font-weight: 900;
}

.poetry-catalog-page .author-result-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.poetry-catalog-page .author-result-main strong {
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
  font-size: 18px;
}

.poetry-catalog-page .author-result-main em,
.poetry-catalog-page .author-result-main small {
  overflow: hidden;
  color: var(--poetry-text-secondary);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poetry-catalog-page .author-result-main small {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
}

.poetry-catalog-page .author-result-link {
  color: var(--poetry-accent-bright);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.poetry-catalog-page .catalog-sidebar,
.poetry-catalog-page .catalog-side-index {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.poetry-catalog-page .catalog-side-card,
.poetry-catalog-page .seo-side-card {
  border: 1px solid var(--poetry-divider);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
}

.poetry-catalog-page .sidebar-title {
  margin: 0 0 10px;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 17px;
}

.poetry-catalog-page .catalog-author-list {
  display: grid;
  gap: 10px;
}

.poetry-catalog-page .catalog-author-list button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--poetry-divider);
  padding: 0 0 9px;
  color: var(--poetry-text-secondary);
  background: transparent;
  text-align: left;
}

.poetry-catalog-page .catalog-author-list button:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.poetry-catalog-page .catalog-author-list strong {
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 16px;
}

.poetry-catalog-page .seo-side-card p {
  margin: 0 0 10px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-catalog-page .poetry-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.poetry-catalog-page .poetry-pagination button,
.poetry-catalog-page .poetry-page-gap {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--poetry-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--poetry-text-secondary);
  background: #fff;
  font-size: 13px;
}

.poetry-catalog-page .poetry-pagination button.active {
  color: #fffaf0;
  background: var(--poetry-accent-bright);
  border-color: var(--poetry-accent-bright);
}

.poetry-catalog-page .clear-filter-btn {
  border: 1px solid var(--poetry-border);
  background: #fff;
  color: var(--poetry-accent-bright);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.poetry-catalog-page .active-filter-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .poetry-catalog-page .catalog-search-row,
  .poetry-catalog-page .catalog-layout {
    grid-template-columns: 1fr;
  }

  .poetry-catalog-page .filter-line {
    grid-template-columns: 1fr;
  }

  .poetry-catalog-page .catalog-sidebar,
  .poetry-catalog-page .catalog-side-index {
    position: static;
  }

  .poetry-catalog-page .catalog-result-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .poetry-catalog-page .author-result-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .poetry-catalog-page .author-result-avatar {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }

  .poetry-catalog-page .author-result-link {
    grid-column: 2;
  }
}
/**
 * PoetryDetailV2.css — 对齐原型详情页
 */
.poetry-detail-proto .detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}

.poetry-detail-proto .detail-card,
.poetry-detail-proto .info-card,
.poetry-detail-proto .side-card,
.poetry-detail-proto .seo-note {
  border: 1px solid var(--poetry-divider);
  background: #fff;
  border-radius: 14px;
}

.poetry-detail-proto .detail-card {
  padding: 28px;
}

.poetry-detail-proto .label {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3e5c8;
  color: var(--poetry-accent-bright);
  font-size: 12px;
  font-weight: 800;
}

.poetry-detail-proto .poem-title-lg {
  text-align: center;
  font-family: var(--poetry-serif);
  font-size: 36px;
  color: var(--poetry-text);
  margin: 8px 0 6px;
}

.poetry-detail-proto .poem-meta-center {
  text-align: center;
  color: var(--poetry-text-tertiary);
  display: flex;
  justify-content: center;
  gap: 8px;
}

.poetry-detail-proto .poem-meta-center a {
  color: var(--poetry-accent-bright);
}

.poetry-detail-proto .poem-body {
  margin: 24px auto;
  max-width: 560px;
  border-top: 1px solid var(--poetry-divider);
  border-bottom: 1px solid var(--poetry-divider);
  padding: 20px 0;
  text-align: center;
}

.poetry-detail-proto .poem-body--article {
  max-width: 720px;
  padding: 22px 4px;
  text-align: left;
}

.poetry-detail-proto .poem-body p {
  margin: 0;
  font-family: var(--poetry-serif);
  font-size: 23px;
  line-height: 2.2;
  color: var(--poetry-text);
}

.poetry-detail-proto .poem-body--article p {
  margin: 0 0 14px;
  text-align: left;
  text-indent: 2em;
  font-size: 20px;
  line-height: 2;
}

.poetry-detail-proto .poem-body--article p:last-child {
  margin-bottom: 0;
}

.poetry-detail-proto .primary-center {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.poetry-detail-proto .primary-btn {
  border: 0;
  background: var(--poetry-accent-bright);
  color: #fffaf0;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}

.poetry-detail-proto .ghost-btn {
  border: 1px solid var(--poetry-border);
  background: #fff;
  color: var(--poetry-accent-bright);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.poetry-detail-proto .detail-hot-row {
  justify-content: center;
  margin-top: 16px;
}

.poetry-detail-proto .chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(183, 121, 31, 0.09);
  color: var(--poetry-accent-bright);
  font-size: 13px;
  font-weight: 700;
}

.poetry-detail-proto .info-sections {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.poetry-detail-proto .info-card {
  padding: 16px;
}

.poetry-detail-proto .info-card h4,
.poetry-detail-proto .side-card h4 {
  margin: 0 0 8px;
  color: var(--poetry-accent-bright);
  font-size: 16px;
}

.poetry-detail-proto .info-card p {
  margin: 0;
  color: var(--poetry-text-secondary);
  white-space: pre-wrap;
}

.poetry-detail-proto .detail-form-block {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.poetry-detail-proto .detail-input,
.poetry-detail-proto .detail-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--poetry-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fffdf8;
  color: var(--poetry-text);
}

.poetry-detail-proto .detail-textarea {
  min-height: 120px;
  resize: vertical;
}

.poetry-detail-proto .detail-submit-btn {
  border: 0;
  background: var(--poetry-accent-bright);
  color: #fffaf0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.poetry-detail-proto .detail-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.poetry-detail-proto .detail-submit-btn-inline {
  white-space: nowrap;
}

.poetry-detail-proto .detail-work-list,
.poetry-detail-proto .detail-comment-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.poetry-detail-proto .detail-work-item,
.poetry-detail-proto .detail-comment-item {
  border: 1px solid var(--poetry-divider);
  border-radius: 12px;
  padding: 12px;
  background: #fffdf8;
}

.poetry-detail-proto .detail-work-item strong,
.poetry-detail-proto .detail-comment-item strong {
  display: block;
  color: var(--poetry-text);
}

.poetry-detail-proto .detail-comment-item span {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
}

.poetry-detail-proto .detail-comment-item p {
  margin-top: 6px;
}

.poetry-detail-proto .detail-comments-card {
  margin-top: 16px;
}

.poetry-detail-proto .detail-comment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.poetry-detail-proto .login-prompt-inline,
.poetry-detail-proto .comment-empty {
  color: var(--poetry-text-secondary);
}

.poetry-detail-proto .side-stack {
  display: grid;
  gap: 12px;
}

.poetry-detail-proto .side-card {
  padding: 18px;
}

.poetry-detail-proto .detail-tool-links {
  display: grid;
  gap: 10px;
}

.poetry-detail-proto .detail-tool-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--poetry-divider);
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  background: #fffdf8;
}

.poetry-detail-proto .detail-tool-link strong {
  color: var(--poetry-text);
}

.poetry-detail-proto .detail-tool-link span {
  color: var(--poetry-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.poetry-detail-proto .author-card-name {
  font-family: var(--poetry-serif);
  font-size: 24px;
  color: var(--poetry-text);
}

.poetry-detail-proto .meta {
  color: var(--poetry-text-tertiary);
  font-size: 13px;
}

.poetry-detail-proto .side-paragraph {
  color: var(--poetry-text-secondary);
  margin-top: 10px;
}

.poetry-detail-proto .side-ghost-btn {
  margin-top: 12px;
}

.poetry-detail-proto .related-item {
  border-top: 1px solid var(--poetry-divider);
  padding: 11px 0;
  cursor: pointer;
}

.poetry-detail-proto .related-item:first-of-type {
  border-top: 0;
}

.poetry-detail-proto .related-item strong {
  display: block;
  color: var(--poetry-text);
}

.poetry-detail-proto .related-item span {
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-detail-proto .seo-note {
  padding: 14px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  background: #fffdf8;
}

.poetry-detail-proto .seo-note strong {
  color: var(--poetry-accent-bright);
}

@media (max-width: 900px) {
  .poetry-detail-proto .detail-layout {
    grid-template-columns: 1fr;
  }

  .poetry-detail-proto .poem-title-lg {
    font-size: 28px;
  }

  .poetry-detail-proto .poem-body p {
    font-size: 20px;
  }

  .poetry-detail-proto .detail-comment-row {
    grid-template-columns: 1fr;
  }
}

.detail-sync-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f4a32;
  font-size: 14px;
  font-weight: 700;
  margin: 2px 0 4px;
}

.detail-sync-check input {
  width: 16px;
  height: 16px;
  accent-color: #315f4c;
}
/**
 * PoemRow.css — 标签页/诗人页目录行样式
 */
.poetry-v2-container .catalog-poem-row.poem-row {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--poetry-border);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.poetry-v2-container .catalog-poem-row.poem-row:hover {
  border-color: var(--poetry-border-strong);
  background: #fffdf8;
}

.poetry-v2-container .poem-row-title {
  margin: 0;
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
  font-size: 21px;
}

.poetry-v2-container .poem-row-meta {
  margin-top: 2px;
  color: var(--poetry-text-tertiary);
  font-size: 13px;
}

.poetry-v2-container .poem-row-author {
  color: var(--poetry-accent-bright);
}

.poetry-v2-container .poem-row-excerpt {
  margin: 7px 0 0;
  color: var(--poetry-text-secondary);
  font-family: var(--poetry-serif);
  font-size: 16px;
}

.poetry-v2-container .poem-row-tags {
  margin-top: 10px;
}

.poetry-v2-container .poem-row-actions {
  justify-content: flex-end;
}

.poetry-v2-container .poem-row-action {
  border: 1px solid var(--poetry-border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--poetry-accent-bright);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  font-family: var(--poetry-sans);
  cursor: pointer;
}

@media (max-width: 900px) {
  .poetry-v2-container .catalog-poem-row.poem-row {
    grid-template-columns: 1fr;
  }

  .poetry-v2-container .poem-row-actions {
    justify-content: flex-start;
  }
}
/**
 * TagDetail.css — 对齐原型标签页
 */
.poetry-tag-page .topic-hero {
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid var(--poetry-divider);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf8 0%, #f7edda 100%);
}

.poetry-tag-page .topic-hero h1 {
  margin: 0;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 32px;
}

.poetry-tag-page .topic-hero p {
  margin: 9px 0 0;
  color: var(--poetry-text-secondary);
  max-width: 780px;
}

.poetry-tag-page .hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.poetry-tag-page .hero-meta {
  border: 1px solid var(--poetry-divider);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 12px;
}

.poetry-tag-page .hero-meta strong {
  display: block;
  color: var(--poetry-text);
}

.poetry-tag-page .hero-meta span {
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-tag-page .tag-layout,
.poetry-tag-page .two-col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.poetry-tag-page .featured-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.poetry-tag-page .feature-mini {
  border: 1px solid var(--poetry-divider);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
}

.poetry-tag-page .feature-mini h4 {
  margin: 0;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 20px;
}

.poetry-tag-page .feature-mini .meta {
  margin-top: 2px;
  color: var(--poetry-text-tertiary);
  font-size: 13px;
}

.poetry-tag-page .feature-mini p {
  margin: 8px 0 0;
  color: var(--poetry-text-secondary);
  font-family: var(--poetry-serif);
}

.poetry-tag-page .result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-tag-page .poem-list {
  display: grid;
  gap: 12px;
}

.poetry-tag-page .side-stack,
.poetry-tag-page .sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.poetry-tag-page .side-card,
.poetry-tag-page .seo-note {
  border: 1px solid var(--poetry-divider);
  background: #fff;
  border-radius: 14px;
}

.poetry-tag-page .side-card {
  padding: 18px;
}

.poetry-tag-page .side-card h4 {
  margin: 0 0 10px;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 17px;
}

.poetry-tag-page .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poetry-tag-page .topic-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(183, 121, 31, 0.09);
  color: var(--poetry-accent-bright);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.poetry-tag-page .author-list {
  display: grid;
  gap: 10px;
}

.poetry-tag-page .author-row-button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--poetry-divider);
  padding: 0 0 9px;
  color: var(--poetry-text-secondary);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.poetry-tag-page .author-row-button:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.poetry-tag-page .author-row-button strong {
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
}

.poetry-tag-page .seo-note {
  padding: 14px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  background: #fffdf8;
}

.poetry-tag-page .seo-note strong {
  color: var(--poetry-accent-bright);
}

.poetry-tag-page .poetry-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.poetry-tag-page .poetry-pagination button,
.poetry-tag-page .poetry-page-gap {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--poetry-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--poetry-text-secondary);
  background: #fff;
  font-size: 13px;
}

.poetry-tag-page .poetry-pagination button.active {
  color: #fffaf0;
  background: var(--poetry-accent-bright);
  border-color: var(--poetry-accent-bright);
}

@media (max-width: 900px) {
  .poetry-tag-page .tag-layout,
  .poetry-tag-page .two-col-layout,
  .poetry-tag-page .hero-meta-grid,
  .poetry-tag-page .featured-strip {
    grid-template-columns: 1fr;
  }

  .poetry-tag-page .side-stack,
  .poetry-tag-page .sidebar {
    position: static;
  }

  .poetry-tag-page .result-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
/**
 * AuthorDetail.css — 对齐原型诗人页
 */
.poetry-author-page .author-hero {
  padding: 26px;
  margin-bottom: 18px;
  border: 1px solid var(--poetry-divider);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 10%, rgba(176, 98, 42, 0.12), transparent 26%),
    linear-gradient(135deg, #fffdf8 0%, #f7edda 100%);
  box-shadow: 0 18px 46px rgba(92, 58, 22, 0.08);
}

.poetry-author-page .author-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.poetry-author-page .author-portrait,
.poetry-author-page .author-avatar {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--poetry-divider);
  background: #f1dfbd;
  object-fit: cover;
}

.poetry-author-page .author-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c4e10;
  font-family: var(--poetry-serif);
  font-size: 44px;
  font-weight: 900;
}

.poetry-author-page .author-hero h1 {
  margin: 0;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 38px;
  line-height: 1.15;
}

.poetry-author-page .author-hero .collapsible-text {
  margin: 9px 0 0;
  color: var(--poetry-text-secondary);
  max-width: 780px;
  font-size: 15px;
  line-height: 1.9;
}

.poetry-author-page .hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.poetry-author-page .hero-meta {
  border: 1px solid var(--poetry-divider);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px 15px;
}

.poetry-author-page .hero-meta strong {
  display: block;
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
  font-size: 18px;
}

.poetry-author-page .hero-meta span {
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-author-page .poet-layout,
.poetry-author-page .two-col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 20px;
  align-items: start;
}

.poetry-author-page .info-card,
.poetry-author-page .side-card,
.poetry-author-page .seo-note {
  border: 1px solid var(--poetry-divider);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(92, 58, 22, 0.05);
}

.poetry-author-page .author-featured-card {
  padding: 18px;
  margin-bottom: 16px;
}

.poetry-author-page .author-profile-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.poetry-author-page .author-profile-card {
  padding: 20px 20px 18px;
}

.poetry-author-page .collapsible-text {
  margin: 0;
  color: var(--poetry-text-secondary);
  line-height: 1.95;
  white-space: pre-wrap;
}

.poetry-author-page .collapsible-text:not(.expanded) {
  display: -webkit-box;
  -webkit-line-clamp: var(--clamp-lines, 5);
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poetry-author-page .expand-button {
  border: 0;
  margin-top: 10px;
  padding: 0;
  color: var(--poetry-accent-bright);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.poetry-author-page .expand-button:hover {
  color: var(--poetry-accent);
}

.poetry-author-page .module-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(156, 103, 45, 0.14);
}

.poetry-author-page .module-title span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 20px;
  font-weight: 900;
}

.poetry-author-page .module-title span::before {
  content: "";
  width: 6px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--poetry-accent-bright), #d5a247);
}

.poetry-author-page .module-title small {
  color: var(--poetry-text-muted);
  font-size: 12px;
}

.poetry-author-page .info-card h4,
.poetry-author-page .side-card h4 {
  margin: 0 0 10px;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 17px;
}

.poetry-author-page .featured-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.poetry-author-page .feature-mini {
  border: 1px solid var(--poetry-divider);
  background: linear-gradient(180deg, #fff 0%, #fffaf1 100%);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.poetry-author-page .feature-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(92, 58, 22, 0.08);
}

.poetry-author-page .feature-mini h4 {
  margin: 0;
  font-family: var(--poetry-serif);
  color: var(--poetry-text);
  font-size: 20px;
}

.poetry-author-page .feature-mini p {
  margin: 8px 0 0;
  color: var(--poetry-text-secondary);
  font-family: var(--poetry-serif);
}

.poetry-author-page .result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
}

.poetry-author-page .poem-list {
  display: grid;
  gap: 12px;
}

.poetry-author-page .side-stack,
.poetry-author-page .sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.poetry-author-page .side-card {
  padding: 18px;
}

.poetry-author-page .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poetry-author-page .author-list {
  display: grid;
  gap: 10px;
}

.poetry-author-page .author-row-button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--poetry-divider);
  padding: 0 0 9px;
  color: var(--poetry-text-secondary);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.poetry-author-page .author-row-button:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.poetry-author-page .author-row-button strong {
  color: var(--poetry-text);
  font-family: var(--poetry-serif);
}

.poetry-author-page .seo-note {
  padding: 14px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  background: #fffdf8;
}

.poetry-author-page .seo-note strong {
  color: var(--poetry-accent-bright);
}

.poetry-author-page .poetry-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.poetry-author-page .poetry-pagination button,
.poetry-author-page .poetry-page-gap {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--poetry-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--poetry-text-secondary);
  background: #fff;
  font-size: 13px;
}

.poetry-author-page .poetry-pagination button.active {
  color: #fffaf0;
  background: var(--poetry-accent-bright);
  border-color: var(--poetry-accent-bright);
}

@media (max-width: 900px) {
  .poetry-author-page .poet-layout,
  .poetry-author-page .two-col-layout,
  .poetry-author-page .hero-meta-grid,
  .poetry-author-page .featured-strip {
    grid-template-columns: 1fr;
  }

  .poetry-author-page .side-stack,
  .poetry-author-page .sidebar {
    position: static;
  }

  .poetry-author-page .result-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .poetry-author-page .author-hero-main {
    align-items: flex-start;
  }

  .poetry-author-page .author-hero {
    padding: 18px;
    border-radius: 18px;
  }

  .poetry-author-page .author-hero h1 {
    font-size: 30px;
  }

  .poetry-author-page .module-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .poetry-author-page .author-portrait,
  .poetry-author-page .author-avatar {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    font-size: 34px;
  }
}
.my-works-page {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

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

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 标签页 */
.tabs {
  display: flex;
  background: rgba(44, 24, 16, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 9px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  font-weight: 600;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* 按钮 - 复用全局 .btn-primary 样式（已在 App.css 定义） */

/* 作品列表 */
.works-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* 诗词跳转卡片 - 与 Community.jsx 保持一致风格 */
.shared-poem-card {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(212, 168, 83, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  /* 比 work-card 稍窄 */
  margin-left: -4px;
  margin-right: -4px;
}

.shared-poem-card:hover {
  background: rgba(212, 168, 83, 0.35);
  border-color: var(--gold);
}

.shared-poem-card:active {
  transform: scale(0.99);
}

.shared-poem-content {
  flex: 1;
  min-width: 0;
}

.shared-poem-content .shared-poem-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.shared-poem-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'STKaiti', 'KaiTi', serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-poem-arrow {
  font-size: 16px;
  color: var(--gold);
  margin-left: 10px;
  flex-shrink: 0;
}

.work-content {
  margin-bottom: 12px;
}

.work-content p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

.work-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.work-author {
  font-size: 13px;
  color: var(--text-secondary);
}

.work-date {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.recitation-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recitation-type {
  font-size: 14px;
  color: var(--text-secondary);
}

.recitation-duration {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.work-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.work-time {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.work-ref {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.75;
  margin-bottom: 6px;
  font-style: italic;
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 83, 0.3);
}

.status-approved {
  background: rgba(82, 196, 26, 0.15);
  color: #52c41a;
  border: 1px solid rgba(82, 196, 26, 0.3);
}

.status-rejected {
  background: rgba(255, 77, 79, 0.15);
  color: #ff7875;
  border: 1px solid rgba(255, 77, 79, 0.3);
}

.reject-reason {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 77, 79, 0.08);
  border: 1px solid rgba(255, 77, 79, 0.2);
  border-radius: 6px;
  font-size: 12px;
  color: #ff7875;
}

/* 创作模式标签 */
.creation-mode-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 83, 0.3);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 18px;
}

.creation-mode-tag.original {
  background: rgba(82, 196, 26, 0.12);
  color: #73d13d;
  border-color: rgba(82, 196, 26, 0.3);
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* ===== My Works Rebuild 2026 ===== */
.myworks-rebuild-page {
  --works-ink: #2b2118;
  --works-muted: #7b6b5b;
  --works-paper: #fffaf1;
  --works-soft: #f7efe2;
  --works-line: #eadbc4;
  --works-green: #315f4c;
  max-width: 1180px;
  padding: 28px 24px 72px;
  color: var(--works-ink);
}

.myworks-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 30px;
  border: 1px solid var(--works-line);
  border-radius: 30px;
  background: linear-gradient(135deg, #f4dfbc 0%, #fff8ed 100%);
  box-shadow: 0 18px 50px rgba(80, 55, 28, 0.12);
}

.myworks-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #efe0c5;
  color: #8a5a1e;
  font-size: 13px;
  font-weight: 900;
}

.myworks-hero-panel h1 {
  margin: 0 0 8px;
  font-size: 38px;
  color: var(--works-ink);
}

.myworks-hero-panel p {
  max-width: 760px;
  margin: 0;
  color: var(--works-muted);
  line-height: 1.8;
}

.myworks-hero-actions {
  display: flex;
  gap: 10px;
}

.myworks-hero-actions button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
}

.myworks-hero-actions button:first-child {
  background: var(--works-green);
  color: #fff;
}

.myworks-hero-actions button:last-child {
  border: 1px solid var(--works-line);
  background: #fff;
  color: #8a5a1e;
}

.myworks-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.myworks-stat-grid div {
  border: 1px solid var(--works-line);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
  text-align: center;
}

.myworks-stat-grid strong {
  display: block;
  color: var(--works-ink);
  font-size: 25px;
}

.myworks-stat-grid span {
  color: var(--works-muted);
  font-size: 13px;
}

.myworks-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.myworks-filter-nav {
  display: grid;
  gap: 6px;
  align-content: start;
  height: max-content;
  padding: 14px;
  border: 1px solid var(--works-line);
  border-radius: 24px;
  background: #fff;
}

.myworks-filter-nav button {
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  background: transparent;
  color: var(--works-muted);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.myworks-filter-nav button.active {
  background: var(--works-ink);
  color: #fff;
}

.myworks-list-panel {
  display: grid;
  gap: 14px;
}

.workbench-card-real {
  border: 1px solid var(--works-line);
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(80, 55, 28, 0.08);
}

.workbench-card-head-real {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.workbench-card-head-real h2 {
  margin: 0 0 10px;
  color: var(--works-ink);
  font-size: 23px;
}

.workbench-card-head-real time {
  color: var(--works-muted);
  font-size: 13px;
}

.workbench-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workbench-tags span {
  border: 1px solid var(--works-line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff7e9;
  color: #8a5a1e;
  font-size: 12px;
  font-weight: 800;
}

.workbench-content-real {
  color: #4a3929;
  line-height: 1.85;
  white-space: pre-wrap;
}

.workbench-actions-real {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.workbench-actions-real button {
  border: 1px solid var(--works-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #8a5a1e;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .myworks-hero-panel,
  .myworks-layout {
    grid-template-columns: 1fr;
  }
  .myworks-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .myworks-hero-actions {
    flex-direction: column;
  }
}

.work-editor-panel {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid rgba(92, 63, 32, .14);
  border-radius: 28px;
  background: rgba(255, 250, 240, .9);
  box-shadow: 0 18px 40px rgba(49, 40, 25, .08);
}

.work-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.work-editor-head h2 { margin: 6px 0 0; color: #24180d; font-size: 24px; }
.work-editor-head button,
.work-type-switch button,
.work-editor-actions button,
.poem-option-panel button {
  font-family: inherit;
  cursor: pointer;
}
.work-editor-head button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(49,95,76,.1);
  color: #315f4c;
  font-weight: 800;
}

.work-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.work-type-switch button {
  text-align: left;
  border: 1px solid rgba(92, 63, 32, .14);
  border-radius: 18px;
  padding: 14px;
  background: #fff8ec;
  color: #2b2118;
}

.work-type-switch button.active {
  border-color: #315f4c;
  background: #e2ecdf;
}

.work-type-switch strong { display: block; margin-bottom: 5px; font-size: 15px; }
.work-type-switch span { color: #735f46; font-size: 12px; line-height: 1.6; }

.work-editor-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 14px;
}

.work-editor-panel label { display: flex; flex-direction: column; gap: 8px; color: #5f4a32; font-weight: 800; }
.work-editor-panel input,
.work-editor-panel select,
.work-editor-panel textarea {
  width: 100%;
  border: 1px solid rgba(92,63,32,.16);
  border-radius: 16px;
  background: #fffaf0;
  color: #2b2118;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}
.work-editor-panel input:focus,
.work-editor-panel select:focus,
.work-editor-panel textarea:focus { border-color: #315f4c; box-shadow: 0 0 0 3px rgba(49,95,76,.12); }

.poem-search-field { position: relative; margin-top: 14px; }
.poem-option-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 15;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(92,63,32,.16);
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 18px 38px rgba(49,40,25,.14);
}
.poem-option-panel button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #2b2118;
  text-align: left;
}
.poem-option-panel button:hover { background: rgba(49,95,76,.08); }
.poem-option-panel span,
.poem-option-empty { color: #735f46; font-size: 13px; }
.selected-poem-line { margin-top: 8px; color: #315f4c; font-size: 13px; }

.work-content-field { margin-top: 14px; }
.work-content-field textarea { min-height: 180px; resize: vertical; line-height: 1.8; }
.work-content-field.compact textarea { min-height: 80px; }

.work-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.sync-check { flex-direction: row !important; align-items: center; font-size: 14px; }
.sync-check input { width: 16px; accent-color: #315f4c; }
.work-editor-actions button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #315f4c 0%, #c79242 100%);
  color: #fff;
  font-weight: 900;
}
.work-editor-actions button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 820px) {
  .work-editor-grid,
  .work-type-switch { grid-template-columns: 1fr; }
  .work-editor-actions { align-items: stretch; flex-direction: column; }
}


.workbench-tool-panel {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--works-line);
  border-radius: 26px;
  background: #fff;
}

.workbench-tool-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.workbench-tool-head h2 {
  margin: 4px 0 0;
  color: var(--works-ink);
  font-size: 22px;
}

.workbench-tool-head a {
  color: #315f4c;
  font-weight: 900;
  text-decoration: none;
}

.workbench-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workbench-tool-grid button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  min-height: 112px;
  border: 1px solid rgba(92,63,32,.14);
  border-radius: 18px;
  padding: 14px;
  background: #fffaf0;
  color: var(--works-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.workbench-tool-grid button:hover {
  border-color: #315f4c;
  background: #f2f7ef;
  transform: translateY(-1px);
}

.workbench-tool-grid button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(49,95,76,.1);
  color: #315f4c;
  font-weight: 900;
}

.workbench-tool-grid button strong,
.workbench-tool-grid button em {
  grid-column: 2;
}

.workbench-tool-grid button strong {
  font-size: 15px;
}

.workbench-tool-grid button em {
  color: var(--works-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .workbench-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .workbench-tool-head { align-items: flex-start; flex-direction: column; }
  .workbench-tool-grid { grid-template-columns: 1fr; }
}
/* Beishi.css - 我爱背诗重构版 */

.beishi-v2 {
  width: min(1180px, calc(100vw - 40px));
  max-width: none;
  margin: 0 auto;
  padding: 8px 0 72px;
  color: var(--text-primary);
}

.beishi-v2 button,
.beishi-v2 a {
  font-family: inherit;
}

.beishi-v2 a {
  text-decoration: none;
}

.beishi-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  margin-bottom: 20px;
}

.beishi-hero-main,
.beishi-stat-card,
.beishi-panel,
.beishi-library {
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 16px;
}

.beishi-hero-main {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 85% 10%, rgba(154, 101, 25, 0.12), transparent 28%),
    linear-gradient(135deg, #fff 0%, #f8f5ee 100%);
}

.beishi-hero-main::after {
  content: "背";
  position: absolute;
  right: 24px;
  top: 8px;
  color: rgba(154, 101, 25, 0.06);
  font-family: STKaiti, KaiTi, serif;
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
}

.beishi-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
}

.beishi-hero-main h1 {
  max-width: 760px;
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 34px;
  line-height: 1.24;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.beishi-hero-main > p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #374151;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.today-poem-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #fff;
}

.today-poem-copy > span {
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 800;
}

.today-poem-copy h2 {
  margin: 6px 0 4px;
  color: #1f2937;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: 34px;
  line-height: 1.2;
}

.today-poem-copy p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.today-poem-copy blockquote {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  color: #2f2418;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: 24px;
  line-height: 1.6;
}

.today-actions {
  display: grid;
  gap: 10px;
}

.beishi-btn,
.library-link,
.load-more-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--brand-600);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.beishi-btn.primary,
.load-more-v2 {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.beishi-btn:hover,
.library-link:hover {
  border-color: var(--brand-600);
}

.beishi-hero-side {
  display: grid;
  gap: 12px;
}

.beishi-stat-card {
  padding: 18px;
}

.stat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-600);
  font-weight: 800;
  margin-bottom: 14px;
}

.progress-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--brand-600) 0 72%, #eadfce 72% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.progress-ring span {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.beishi-stat-card p,
.muted-text {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 14px;
}

.review-mini-list {
  display: grid;
  gap: 8px;
}

.review-mini-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #fbfcfb;
  cursor: pointer;
}

.review-mini-list span {
  color: #1f2937;
  font-weight: 800;
}

.review-mini-list em {
  color: var(--brand-600);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.beishi-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  margin-bottom: 20px;
}

.beishi-panel,
.beishi-library {
  padding: 22px;
}

.beishi-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.beishi-panel-head h2 {
  margin: 0;
  color: #1f2937;
  font-size: 22px;
  line-height: 1.25;
}

.beishi-panel-head p {
  margin: 6px 0 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 14px;
}

.practice-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.practice-mode {
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: #fff;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.practice-mode.active {
  background: #2f2418;
  border-color: #2f2418;
  color: #fffaf0;
}

.practice-mode span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 900;
  margin-bottom: 12px;
}

.practice-mode.active span {
  background: rgba(255,255,255,0.13);
  color: #fffaf0;
}

.practice-mode strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.practice-mode em {
  color: #4b5563;
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.practice-mode.active em {
  color: #ead9c0;
}

.share-preview {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: linear-gradient(180deg, #fffaf2 0%, #fff 100%);
}

.share-stamp {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border: 2px solid #b91c1c;
  color: #b91c1c;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: STKaiti, KaiTi, serif;
  font-size: 22px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.share-preview h3 {
  margin: 0;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: 26px;
}

.share-preview p {
  color: #4b5563;
  line-height: 1.6;
  margin: 10px 0 16px;
}

.library-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.library-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: #f4efe5;
  color: #4b5563;
  font-weight: 800;
  cursor: pointer;
}

.library-tabs button.active {
  background: #2f2418;
  border-color: #2f2418;
  color: #fffaf0;
}

.library-tabs span {
  margin-left: 4px;
}

.library-list {
  display: grid;
  gap: 10px;
}

.library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: #fff;
}

.library-row.mastered {
  border-color: rgba(47, 133, 90, 0.25);
  background: linear-gradient(180deg, #fff 0%, #f7fbf8 100%);
}

.library-main {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.library-main strong {
  display: block;
  color: #1f2937;
  font-size: 17px;
}

.library-main span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.library-main em {
  display: block;
  margin-top: 8px;
  color: #4b5563;
  font-style: normal;
  line-height: 1.55;
}

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

.beishi-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  background: #fff;
  color: #4b5563;
  cursor: pointer;
}

.beishi-icon-btn.success {
  color: #2f855a;
  background: #e7f3ec;
  border-color: #c7e3d1;
}

.beishi-icon-btn.danger {
  color: #c2410c;
}

.load-more-v2 {
  width: 100%;
  margin-top: 14px;
}

.beishi-empty {
  padding: 34px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  text-align: center;
  background: #fffdf8;
}

.beishi-empty svg {
  color: var(--brand-600);
}

.beishi-empty h3 {
  margin: 12px 0 6px;
}

.beishi-empty p {
  margin: 0 0 18px;
  color: #4b5563;
}

.recommend-poems {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recommend-poems a {
  display: block;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #fff;
  color: var(--text-primary);
  text-align: left;
}

.recommend-poems strong {
  display: block;
}

.recommend-poems span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

.beishi-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  color: #4b5563;
}

.spin {
  animation: beishi-spin 1s linear infinite;
}

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

.practice-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 41, 55, 0.48);
}

.practice-dialog-card {
  width: min(960px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border-default);
}

.share-choice-dialog {
  width: min(440px, 100%);
  border-radius: 24px;
  background: #fffaf0;
  border: 1px solid #d8c8ae;
  padding: 30px;
  text-align: center;
  box-shadow: 0 28px 90px rgba(47, 36, 24, 0.24);
}

.share-choice-dialog .share-stamp {
  margin: 0 auto 16px;
}

.share-choice-dialog h2 {
  margin: 0;
  color: #2f2418;
  font-family: STKaiti, KaiTi, serif;
  font-size: 30px;
}

.share-choice-dialog p {
  margin: 12px 0 22px;
  color: #6b7280;
  line-height: 1.7;
}

.share-choice-dialog .beishi-btn {
  width: 100%;
  margin-top: 10px;
}

.share-choice-cancel {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 800;
  cursor: pointer;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-default);
}

.dialog-head span {
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 800;
}

.dialog-head h2 {
  margin: 4px 0 0;
  font-family: STKaiti, KaiTi, serif;
  font-size: 30px;
}

.dialog-head button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  background: #fff;
  cursor: pointer;
}

.dialog-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.dialog-steps {
  display: grid;
  gap: 10px;
}

.dialog-steps button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.dialog-steps button.active {
  border-color: var(--brand-600);
  background: #fffaf2;
}

.dialog-steps button.done span {
  background: #2f855a;
  color: #fff;
}

.dialog-steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 900;
}

.recite-board {
  min-height: 420px;
  border-radius: 16px;
  background: #2f2418;
  color: #fffaf0;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.recite-board-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #ead9c0;
  font-size: 13px;
}

.recite-board-top em {
  font-style: normal;
}

.recite-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
  text-align: center;
}

.recite-content p {
  margin: 0;
  font-family: STKaiti, KaiTi, serif;
  font-size: 28px;
  line-height: 2;
}

.recite-content p.masked-line {
  letter-spacing: 0.04em;
}

.blank-word {
  display: inline-flex;
  width: 46px;
  height: 30px;
  border-bottom: 2px solid #f3d6a5;
  vertical-align: middle;
  margin: 0 4px;
}

.recite-content textarea {
  width: min(520px, 100%);
  min-height: 170px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.08);
  color: #fffaf0;
  outline: 0;
  resize: vertical;
  font-size: 16px;
  line-height: 1.7;
}

.recite-content textarea::placeholder {
  color: #ead9c0;
}

.recite-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wrong-sentence {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 22px 22px;
  padding: 12px;
  border-radius: 12px;
  background: #fffaf2;
  color: #6b4c1f;
  font-size: 14px;
}

@media (max-width: 980px) {
  .beishi-hero,
  .beishi-workspace,
  .dialog-body {
    grid-template-columns: 1fr;
  }

  .practice-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-row {
    grid-template-columns: 1fr;
  }

  .library-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .beishi-v2 {
    width: min(100% - 24px, 1180px);
    padding-bottom: 40px;
  }

  .beishi-hero-main,
  .beishi-panel,
  .beishi-library,
  .beishi-stat-card {
    padding: 18px;
    border-radius: 14px;
  }

  .beishi-hero-main h1 {
    font-size: 26px;
  }

  .today-poem-card,
  .practice-mode-grid,
  .recommend-poems {
    grid-template-columns: 1fr;
  }

  .beishi-panel-head {
    display: block;
  }

  .library-link {
    margin-top: 12px;
  }

  .dialog-head,
  .dialog-body {
    padding: 16px;
  }

  .recite-board {
    min-height: 360px;
  }

  .recite-content p {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beishi-v2 *,
  .practice-dialog * {
    animation: none !important;
    transition: none !important;
  }
}
.notifications-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.notifications-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.notifications-page .page-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.mark-all-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mark-all-btn:hover {
  border-color: var(--brand-500);
  color: var(--brand-500);
}

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

.notification-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-item:hover {
  border-color: var(--brand-500);
  background: rgba(212, 168, 83, 0.05);
}

.notification-item.unread {
  background: rgba(212, 168, 83, 0.1);
  border-color: rgba(212, 168, 83, 0.3);
}

.notification-item.read {
  opacity: 0.7;
}

.notification-icon {
  font-size: 32px;
  margin-right: 14px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.notification-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.notification-time {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.unread-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .notifications-page {
    padding: 0 12px;
  }

  .notifications-page .page-header {
    margin-bottom: 16px;
  }

  .notifications-page .page-header h1 {
    font-size: 18px;
  }

  .notification-item {
    padding: 14px;
  }

  .notification-icon {
    font-size: 28px;
    margin-right: 12px;
  }

  .notification-title {
    font-size: 14px;
  }

  .notification-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .notification-item {
    padding: 12px;
  }

  .notification-icon {
    font-size: 24px;
    margin-right: 10px;
  }

  .notification-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .notification-text {
    font-size: 12px;
    line-height: 1.4;
  }
}
/* 诗词模块古风主题 */
/**
 * poetry-theme.css — 诗词模块古风深色主题
 *
 * 所有 CSS 变量使用 --poetry-* 前缀，避免与全局变量冲突。
 * 作用域：.poetry-v2-container 内的所有子元素。
 *
 * 配色来源：原型 HTML 提取，统一为 --poetry-* 命名
 */
/* ====== 主题变量 ====== */
.poetry-v2-container {
  /* 背景 */
  --poetry-bg: #F8F5EE;
  --poetry-bg-content: #FFFDF8;
  --poetry-card: #FFFFFF;
  --poetry-card-hover: #FCF7EE;
  --poetry-bg-input: #FFFFFF;

  /* 文字 */
  --poetry-text: #1F2937;
  --poetry-text-secondary: #4B5563;
  --poetry-text-tertiary: #6B7280;

  /* 强调色（秋金） */
  --poetry-accent: #B7791F;
  --poetry-accent-light: #C79242;
  --poetry-accent-bright: #9A6519;
  --poetry-accent-bg: rgba(183, 121, 31, 0.08);
  --poetry-accent-bg-hover: rgba(183, 121, 31, 0.14);

  /* 边框与分割线 */
  --poetry-border: #E7E0D3;
  --poetry-border-strong: #D8C8AE;
  --poetry-divider: #F0E8D8;

  /* 圆角 */
  --poetry-radius: 10px;
  --poetry-radius-sm: 6px;

  /* 字体栈 */
  --poetry-serif: "Noto Serif SC", "STSong", "Songti SC", "SimSun", serif;
  --poetry-sans: "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;

  /* 布局 */
  --poetry-max-width: 800px;
  --poetry-max-width-wide: 1180px;
  --poetry-max-width-detail: 1180px;
  --poetry-sidebar-width: 280px;
  --poetry-sidebar-width-tag: 260px;

  /* 基础样式 */
  color: var(--poetry-text);
  font-family: var(--poetry-sans);
  font-size: 14px;
  line-height: 1.6;
}
/* ====== 链接 ====== */
.poetry-v2-container a {
  color: var(--poetry-accent);
  text-decoration: none;
  transition: color 0.2s;
}
.poetry-v2-container a:hover {
  color: var(--poetry-accent-bright);
}
/* ====== 页面容器 ====== */
.poetry-v2-container .page-container {
  max-width: var(--poetry-max-width);
  margin: 0 auto;
  padding: 32px 24px;
}
.poetry-v2-container .page-container--detail {
  max-width: var(--poetry-max-width-detail);
}
.poetry-v2-container .page-container--wide {
  max-width: var(--poetry-max-width-wide);
}
/* ====== 面包屑 ====== */
.poetry-v2-container .breadcrumb {
  font-size: 12px;
  color: var(--poetry-text-tertiary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.poetry-v2-container .breadcrumb a {
  color: var(--poetry-text-tertiary);
  font-size: 12px;
}
.poetry-v2-container .breadcrumb a:hover {
  color: var(--poetry-accent);
}
.poetry-v2-container .breadcrumb .sep {
  opacity: 0.4;
}
/* ====== 两栏布局 ====== */
.poetry-v2-container .detail-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width);
  gap: 32px;
  align-items: start;
}
.poetry-v2-container .tag-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width-tag);
  gap: 28px;
  align-items: start;
}
.poetry-v2-container .poet-layout {
  display: grid;
  grid-template-columns: 1fr var(--poetry-sidebar-width);
  gap: 32px;
  align-items: start;
}
/* ====== 侧栏 ====== */
.poetry-v2-container .sidebar {
  position: sticky;
  top: 80px;
}
.poetry-v2-container .sidebar-card {
  background: var(--poetry-card);
  border: 1px solid var(--poetry-border);
  border-radius: var(--poetry-radius);
  padding: 20px;
  margin-bottom: 14px;
}
.poetry-v2-container .sidebar-title {
  font-family: var(--poetry-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--poetry-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--poetry-divider);
}
/* ====== 卡片通用 ====== */
.poetry-v2-container .card-top-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--poetry-accent), transparent);
  opacity: 0.25;
}
/* ====== 标签药丸 ====== */
.poetry-v2-container .tag-pill {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--poetry-text-secondary);
  background: var(--poetry-accent-bg);
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.poetry-v2-container .tag-pill:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-border-strong);
}
/* ====== 操作按钮 ====== */
.poetry-v2-container .action-btn {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--poetry-text-tertiary);
  background: transparent;
  border: 1px solid var(--poetry-border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}
.poetry-v2-container .action-btn:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-accent);
  background: var(--poetry-accent-bg);
}
/* ====== 小操作按钮（侧栏推荐） ====== */
.poetry-v2-container .action-mini {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  color: var(--poetry-text-tertiary);
  background: transparent;
  border: 1px solid var(--poetry-border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}
.poetry-v2-container .action-mini:hover {
  color: var(--poetry-accent);
  border-color: var(--poetry-accent);
}
/* ====== 加载更多 ====== */
.poetry-v2-container .load-more {
  text-align: center;
  padding: 24px 0;
}
.poetry-v2-container .load-more-btn {
  padding: 10px 36px;
  background: transparent;
  border: 1px solid var(--poetry-border);
  border-radius: 24px;
  color: var(--poetry-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--poetry-sans);
}
.poetry-v2-container .load-more-btn:hover {
  border-color: var(--poetry-accent);
  color: var(--poetry-accent);
}
/* ====== 空态 ====== */
.poetry-v2-container .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--poetry-text-tertiary);
}
.poetry-v2-container .empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.poetry-v2-container .empty-state-text {
  font-size: 14px;
  line-height: 1.8;
}
/* ====== 响应式 768px ====== */
@media (max-width: 768px) {
  .poetry-v2-container .page-container,
  .poetry-v2-container .page-container--detail {
    padding: 16px 12px;
  }
  .poetry-v2-container .detail-layout,
  .poetry-v2-container .tag-layout,
  .poetry-v2-container .poet-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .poetry-v2-container .sidebar {
    position: static;
  }
}
/* App 层仅保留基础结构，不覆盖 index.css 的主题变量 */
:root {
  --bg-hover: rgba(183, 121, 31, 0.08);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}
/* 加载页面 */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-page);
}
.loading-text {
  font-size: 18px;
  color: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
/* 页面标题 */
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}
/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--brand-500);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(183, 121, 31, 0.35);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* 加载状态 */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}
/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
