
:root {
  --brand: #0b7a5b;
  --brand-2: #12a97e;
  --ink: #1f2a37;
  --muted: #6b7785;
  --bg: #f4f6f8;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 64px;
}

.nav-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: 46px;
  background: linear-gradient(90deg, #0b7a5b, #12a97e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  z-index: 100;
  padding: 0 12px;
}

.lang-btn {
  background: rgba(255,255,255,.22);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.lang-btn:active { background: rgba(255,255,255,.35); }

.nav-placeholder {
  height: 46px;
}

.hero {
  background: linear-gradient(135deg, #0b7a5b 0%, #12a97e 60%, #3ec9a0 100%);
  padding: 16px 16px 20px;
  border-radius: 0 0 22px 22px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  right: -70px;
  top: -90px;
}

.hero-country-picker {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-country-picker .country-item {
  flex: 1;
  min-width: 0;
}

.hero-country-picker label {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 4px;
}

.hero-country-picker select {
  width: 100%;
  padding: 7px 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  font-size: 13px;
  color: #1f2a37;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.cat-tabs-wrap {
  position: sticky;
  top: 46px;
  z-index: 10;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.cat-tabs {
  display: flex;
  overflow-x: auto;
  padding: 0 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cat-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  flex: 0 0 auto;
  padding: 12px 14px;
  font-size: 15px;
  color: #6b7785;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color .2s;
  user-select: none;
}

.cat-tab--active {
  color: #0b7a5b;
  font-weight: 700;
  background-color: #ddf1ec;
  font-size: 18px;
}

.cat-tab--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: #0b7a5b;
}

.list {
  padding: 12px 14px 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 两列等宽 */
  gap: 12px;                                /* 卡片间距 */
}

.card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(31, 42, 55, .07);
  transition: transform .15s;
}

.card:active {
  transform: scale(.985);
}

.card-cover {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cover-emoji {
  font-size: 54px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25));
}

.card-body {
  padding: 12px 14px 14px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.card-summary {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.card-meta .read {
  font-size: 11.5px;
  color: #9aa5b1;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #0b7a5b;
  border: 1px solid #b7dcd1;
  background: #f3faf7;
  line-height: 1.4;
}

.empty {
  padding: 40px 0;
  text-align: center;
  color: #9aa5b1;
  font-size: 14px;
}

.state-tip {
  padding: 60px 20px;
  text-align: center;
  color: #9aa5b1;
  font-size: 14px;
  line-height: 1.8;
}

.state-tip.error {
  color: #e04545;
}

.retry-btn {
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}

.detail-hero {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-emoji {
  font-size: 68px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28));
}

.detail-head {
  background: #fff;
  padding: 16px 16px 14px;
}

.detail-head h1 {
  font-size: 19px;
  line-height: 1.45;
  margin: 0 0 10px;
  font-weight: 800;
}

.detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-tags .read {
  margin-left: auto;
  font-size: 11.5px;
  color: #9aa5b1;
}

.detail-body {
  background: #f4f6f8;
  padding: 0 0 90px;
}

.module {
  background: #fff;
  margin: 12px 16px;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(31, 42, 55, .05);
}

.module .sec-title {
  margin-top: 0;
}

.prose {
  font-size: 14.5px;
  line-height: 1.85;
  color: #39424e;
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.sec-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
  margin: 18px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--brand);
  line-height: 1.2;
}

.tip {
  font-size: 12px;
  color: #9aa5b1;
  line-height: 1.7;
  background: #f7f9fa;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 16px;
}

.detail-action-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid #eef1f3;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .05);
  z-index: 100;
}

.detail-action-bar button {
  flex: 1;
  padding: 12px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
}

.btn-test {
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px solid #b7dcd1;
}

.btn-fav {
  background: #0b7a5b;
  color: #fff;
  border: 1px solid #0b7a5b;
}

.btn-fav.is-fav {
  background: #fff;
  color: #0b7a5b;
  border-color: #b7dcd1;
}

.quiz-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.quiz-panel {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}

.quiz-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.quiz-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-refresh {
  border: none;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}

.quiz-refresh:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.quiz-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #9aa5b1;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.quiz-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.quiz-loading {
  text-align: center;
  padding: 40px 0;
  color: #9aa5b1;
  font-size: 14px;
  line-height: 1.7;
}

.quiz-result {
  text-align: center;
  padding: 8px 0 16px;
}

.quiz-result .score {
  font-size: 34px;
  font-weight: 800;
  color: #0b7a5b;
}

.quiz-result .desc {
  font-size: 13px;
  color: #6b7785;
  margin-top: 6px;
}

.quiz-q {
  margin-bottom: 18px;
}

.quiz-q-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
  color: #1f2a37;
  margin-bottom: 10px;
}

.opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #39424e;
  cursor: pointer;
  transition: all .15s;
  line-height: 1.5;
  font-family: inherit;
}

.opt:hover {
  border-color: #b7dcd1;
}

.opt.selected {
  border-color: #0b7a5b;
  background: #f3faf7;
  color: #0b7a5b;
  font-weight: 600;
}

.opt.correct {
  border-color: #12a97e;
  background: #e8f7f0;
  color: #0b7a5b;
}

.opt.wrong {
  border-color: #e04545;
  background: #fdeaea;
  color: #c0392b;
}

.opt:disabled {
  cursor: default;
}

.quiz-explain {
  font-size: 12.5px;
  color: #6b7785;
  line-height: 1.7;
  background: #f7f9fa;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 2px;
}

.quiz-footer {
  padding: 12px 16px;
  border-top: 1px solid #eef1f3;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.quiz-footer button {
  flex: 1;
  padding: 11px;
  border-radius: 22px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.quiz-submit {
  background: #0b7a5b;
  color: #fff;
}

.quiz-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.quiz-again {
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px solid #b7dcd1 !important;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
  z-index: 100;
}

.tabbar-item {
  flex: 1;
  padding: 8px 0 6px;
  text-align: center;
  font-size: 11px;
  color: #9aa5b1;
  cursor: pointer;
  user-select: none;
  transition: color .2s;
}

.tabbar-item .icon {
  display: block;
  font-size: 19px;
  margin-bottom: 2px;
  line-height: 1;
}

.tabbar-item.active {
  font-size: 1em;
  color: #0b7a5b;
  background-color: #e0e6e4;
}

.chat-wrap {
  position: fixed;
  top: 46px;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #eef1f3;
  font-size: 13px;
  color: #6b7785;
}

.chat-topbar button {
  border: none;
  background: none;
  color: #0b7a5b;
  font-size: 13px;
  cursor: pointer;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 4px;
  -webkit-overflow-scrolling: touch;
}

.chat-item {
  display: flex;
  margin-bottom: 10px;
}

.chat-item.user {
  justify-content: flex-end;
}

.chat-item.assistant {
  justify-content: flex-start;
}

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-item.user .bubble {
  background: #0b7a5b;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-item.assistant .bubble {
  background: #fff;
  color: var(--ink);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #eef1f3;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #eef1f3;
  align-items: flex-end;   /* 👈 新增：贴底对齐 */
}

.chat-input-textarea {
  flex: 1;
  min-width: 0;
  height: 38px;              /* 初始 1 行高度 */
  min-height: 38px;
  max-height: 120px;         /* 约 5 行，超过就滚动 */
  padding: 9px 14px;
  border: 1px solid #dce3e8;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  line-height: 1.4;
  font-family: inherit;
  background: #f9fbfc;
  color: var(--ink);
  resize: none;              /* 去掉右下角的调整手柄 */
  overflow-y: hidden;        /* 默认隐藏滚动条，到上限后自动变 auto */
  box-sizing: border-box;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-input-textarea:focus {
  border-color: #12a97e;
  background: #fff;
}

/* 发送按钮高度固定，跟输入框首行对齐 */
.chat-input-bar button {
  flex-shrink: 0;
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: #0b7a5b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.chat-input-bar button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.chat-input-bar button {
  flex-shrink: 0;            /* 👈 关键：发送按钮永不被压缩 */
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: #0b7a5b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.chat-input-bar button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== 社区 ===== */
.community-wrap {
  padding: 14px;
}

.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 4px 2px;
}

.community-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2a37;
}

.community-sub {
  font-size: 12px;
  color: #9aa5b1;
  margin-top: 4px;
}

.btn-post {
  background: #0b7a5b;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-post:hover {
  background: #0a6e51;
}

.post-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(31, 42, 55, .05);
  cursor: pointer;
  transition: transform .15s;
}

.post-card:active {
  transform: scale(.99);
}

.post-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf1;
  flex-shrink: 0;
}

.post-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf1;
  flex-shrink: 0;
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2a37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-time {
  font-size: 11.5px;
  color: #9aa5b1;
  margin-top: 2px;
}

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: #1f2a37;
  margin-bottom: 6px;
}

.post-card-content {
  font-size: 13px;
  color: #55606d;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #9aa5b1;
}

.post-detail {
  background: #fff;
  padding: 18px 16px;
  margin-bottom: 12px;
}

.post-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.post-detail-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  color: #1f2a37;
  margin: 0 0 12px;
}

.post-detail-content {
  font-size: 14.5px;
  line-height: 1.85;
  color: #39424e;
  white-space: pre-wrap;
}

.comments-section {
  background: #fff;
  padding: 16px;
  margin-bottom: 70px;
}

.comments-title {
  font-size: 14px;
  font-weight: 700;
  color: #0b7a5b;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid #0b7a5b;
  line-height: 1.2;
}

.comments-empty {
  font-size: 13px;
  color: #9aa5b1;
  text-align: center;
  padding: 20px 0;
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f3f5;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comment-name {
  font-size: 13px;
  font-weight: 600;
  color: #0b7a5b;
}

.comment-time {
  font-size: 11.5px;
  color: #9aa5b1;
}

.comment-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #39424e;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-input-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid #eef1f3;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .05);
  z-index: 100;
}

.comment-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #dce3e8;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: #f9fbfc;
  color: var(--ink);
}

.comment-input-bar button {
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: #0b7a5b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.comment-input-bar button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.comment-login-tip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #9aa5b1;
  padding: 0 4px;
}

.comment-login-tip .btn-primary {
  padding: 8px 16px;
  border: none;
  border-radius: 18px;
  background: #0b7a5b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.profile {
  padding: 16px 14px;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(31, 42, 55, .07);
}

.auth-card .auth-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
}

.auth-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.auth-card p {
  margin: 0 0 18px;
  font-size: 13px;
  color: #6b7785;
  line-height: 1.7;
}

.auth-btns {
  display: flex;
  gap: 12px;
}

.auth-btns button {
  flex: 1;
  padding: 12px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: #0b7a5b;
  color: #fff;
}

.btn-ghost {
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px solid #b7dcd1 !important;
}

.me-header {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(31, 42, 55, .07);
}

.me-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8edf1;
  cursor: pointer;
  position: relative;
}

.me-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.me-avatar::after {
  content: "换";
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #0b7a5b;
  color: #fff;
  font-size: 10px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  border: 2px solid #fff;
}

.me-info {
  flex: 1;
  min-width: 0;
}

.me-info .me-nick {
  font-size: 16px;
  font-weight: 700;
  color: #1f2a37;
  display: flex;
  align-items: center;
  gap: 6px;
}

.me-info .me-edit {
  font-size: 11.5px;
  color: #0b7a5b;
  cursor: pointer;
  background: #f3faf7;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: normal;
}

.me-info .me-user {
  font-size: 12.5px;
  color: #9aa5b1;
  margin-top: 4px;
}

.me-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.me-actions button {
  flex: 1;
  padding: 9px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #dce3e8;
  background: #fff;
  color: #39424e;
  font-family: inherit;
}

.me-actions button.danger {
  color: #e04545;
  border-color: #f5c4c4;
}

.me-section-title {
  font-size: 13px;
  color: #6b7785;
  margin: 20px 4px 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.me-section-title span.sub {
  font-size: 11.5px;
  color: #9aa5b1;
  font-weight: normal;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
  max-height: 88vh;
  overflow-y: auto;
}

.modal-panel h3 {
  margin: 0 0 16px;
  font-size: 17px;
  text-align: center;
  font-weight: 700;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 12.5px;
  color: #6b7785;
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  color: #1f2a37;
  font-family: inherit;
  background: #f9fbfc;
  box-sizing: border-box;
  resize: vertical;
}

.form-row textarea {
  min-height: 120px;
  line-height: 1.6;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: #12a97e;
  background: #fff;
}

.form-captcha {
  display: flex;
  gap: 8px;
}

.form-captcha input {
  flex: 1;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  min-width: 100px;
  justify-content: center;
  font-family: ui-monospace, monospace;
}

.form-tip {
  font-size: 11.5px;
  color: #9aa5b1;
  line-height: 1.6;
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.form-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 22px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.form-error {
  color: #e04545;
  font-size: 12.5px;
  text-align: center;
  min-height: 16px;
  line-height: 16px;
  margin-bottom: 6px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.avatar-grid .av {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}

.avatar-grid .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-grid .av.active {
  border-color: #0b7a5b;
}

.progress-wrap {
  padding: 40px 24px;
  text-align: center;
}

.progress-wrap .p-title {
  font-size: 14px;
  color: #39424e;
  font-weight: 600;
}

.progress-wrap .p-sub {
  font-size: 12px;
  color: #9aa5b1;
  margin-top: 6px;
  line-height: 1.6;
}

.progress-bar {
  height: 6px;
  background: #e8edf1;
  border-radius: 3px;
  overflow: hidden;
  margin: 16px auto;
  max-width: 280px;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #0b7a5b, #12a97e);
  transition: width .3s;
  border-radius: 3px;
}

.search-loading {
  font-size: 11px;
  color: #0b7a5b;
  margin-left: 8px;
  white-space: nowrap;
}

.load-more-wrap {
  padding: 0 14px 20px;
}

.load-more-btn {
  width: 100%;
  padding: 12px;
  border: 1px dashed #b7dcd1;
  border-radius: 14px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.load-more-btn:hover {
  background: #e8f4ee;
}

.load-more-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 图片发送按钮 */
.chat-img-btn {
  border: none;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
  border-radius: 20px;
  line-height: 1;
  font-family: inherit;
  flex-shrink: 0;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-img-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 图片预览条 */
.chat-img-preview-bar {
  padding: 8px 14px 0;
  background: #fff;
  display: flex;
  gap: 8px;
}
.chat-img-preview-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eef1f3;
  background: #f9fbfc;
}
.chat-img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-img-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  border-radius: 0 8px 0 8px;
}

/* 聊天气泡内的图片 */
.bubble-img {
  display: block;
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.identity-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: linear-gradient(135deg,#0b7a5b,#12a97e);
  color: #fff;
  line-height: 1.5;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .5px;
}

.audio-play-btn {
  padding: 2px 10px;
  border: 1px solid #b7dcd1;
  border-radius: 14px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.audio-play-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ===== 相关视频推荐 ===== */
.video-rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-rec-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.video-rec-item:active {
  transform: scale(.985);
  background: #f3faf7;
}

.video-rec-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.video-rec-icon.bilibili { background: #fdeef1; }
.video-rec-icon.douyin   { background: #f0f0f2; }

.video-rec-body { flex: 1; min-width: 0; }

.video-rec-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-rec-reason {
  font-size: 12px;
  color: #6b7785;
  margin-top: 4px;
  line-height: 1.5;
}

.video-rec-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.video-rec-platform {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.video-rec-platform.bilibili {
  color: #fb7299;
  background: #fdeef1;
}

.video-rec-platform.douyin {
  color: #1f2a37;
  background: #f0f0f2;
}

.video-rec-kw {
  font-size: 11px;
  color: #9aa5b1;
}

.video-rec-arrow {
  font-size: 20px;
  color: #c8d0d8;
  line-height: 1;
  margin-top: 8px;
  flex-shrink: 0;
}

.video-rec-loading {
  font-size: 13px;
  color: #9aa5b1;
  padding: 16px 0;
  text-align: center;
}

/* ===== 免责声明 ===== */
.disclaimer {
  margin: 20px 16px 90px;   /* 底部 90px 避开固定操作栏 */
  padding: 14px 16px;
  background: #fff8e6;
  border: 1px solid #f5e0a3;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.disclaimer-icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.disclaimer-body {
  flex: 1;
  min-width: 0;
}

.disclaimer-title {
  font-size: 13px;
  font-weight: 700;
  color: #a06b00;
  margin-bottom: 6px;
  letter-spacing: .3px;
}

.disclaimer-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: #8a6d2f;
}

.disclaimer-list li {
  margin-bottom: 4px;
}

.disclaimer-list li:last-child {
  margin-bottom: 0;
}

/* ===== AI 回复气泡的操作按钮 ===== */
.bubble-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #eef1f3;
  flex-wrap: wrap;
}

.bubble-action-btn {
  padding: 4px 12px;
  border: 1px solid #dce3e8;
  border-radius: 14px;
  background: #f9fbfc;
  color: #0b7a5b;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  transition: all .15s;
  white-space: nowrap;
}

.bubble-action-btn:hover {
  background: #f3faf7;
  border-color: #b7dcd1;
}

.bubble-action-btn:active {
  transform: scale(.96);
}

.bubble-action-btn.is-loading {
  opacity: .6;
  cursor: not-allowed;
}

.bubble-action-btn:disabled {
  cursor: not-allowed;
}

/* ===== 全局 Toast ===== */
.global-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: rgba(31, 42, 55, .92);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 22px;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  animation: toastFadeIn .25s ease;
  max-width: 80vw;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 详情页导出 Word 按钮 ===== */
.export-word-btn {
  margin-left: auto;           /* 推到 detail-tags 最右侧 */
  padding: 4px 12px;
  border: 1px solid #b7dcd1;
  border-radius: 14px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  transition: all .15s;
}
.export-word-btn:hover  { background: #e8f4ee; }
.export-word-btn:active { transform: scale(.96); }
.export-word-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 让原有的 .read 不再独占右侧 auto，把右侧空间让给按钮 */
.detail-tags .read {
  margin-left: 0;
}

/* ===== 内容封面图 ===== */
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.card:active .cover-img {
  transform: scale(1.04);
}

.detail-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 用户资料卡片 ===== */
.user-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 12px;
  gap: 10px;
}
.user-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf1;
}
.user-profile-name {
  font-size: 17px;
  font-weight: 700;
  color: #1f2a37;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.user-profile-username {
  font-size: 13px;
  color: #9aa5b1;
}

/* ===== 私聊弹窗 ===== */
.chat-dialog-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 70vh;
  max-height: 560px;
  max-width: 420px;
  overflow: hidden;
}
.chat-dialog-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}
.chat-dialog-back {
  font-size: 18px;
  cursor: pointer;
  color: #6b7785;
  padding-right: 4px;
  user-select: none;
}
.chat-dialog-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf1;
}
.chat-dialog-name {
  font-size: 15px;
  font-weight: 600;
  color: #1f2a37;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  background: #f7f9fa;
  -webkit-overflow-scrolling: touch;
}
.chat-dialog-empty {
  text-align: center;
  color: #9aa5b1;
  font-size: 13px;
  padding: 40px 0;
}
.chat-dialog-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  max-width: 78%;
}
.chat-dialog-item.mine {
  margin-left: auto;
  align-items: flex-end;
}
.chat-dialog-item.other {
  align-items: flex-start;
}
.chat-dialog-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-dialog-item.mine .chat-dialog-bubble {
  background: #0b7a5b;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-dialog-item.other .chat-dialog-bubble {
  background: #fff;
  color: #1f2a37;
  border: 1px solid #eef1f3;
  border-bottom-left-radius: 4px;
}
.chat-dialog-time {
  font-size: 10.5px;
  color: #9aa5b1;
  margin-top: 3px;
  padding: 0 4px;
}
.chat-dialog-input {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #eef1f3;
  background: #fff;
  flex-shrink: 0;
}
.chat-dialog-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #dce3e8;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: #f9fbfc;
  color: var(--ink);
  font-family: inherit;
}
.chat-dialog-input button {
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: #0b7a5b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.chat-dialog-input button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== 律师认证申请 ===== */
.lawyer-status-box {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
}
.lawyer-status-box.success {
  background: #f0faf5;
  border-color: #b7e5cc;
}
.lawyer-status-box.pending {
  background: #fff8e6;
  border-color: #f5e0a3;
}
.lawyer-status-box.rejected {
  background: #fdf3f3;
  border-color: #f5c4c4;
}
.lawyer-status-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a37;
  margin-bottom: 8px;
}
.lawyer-status-tip {
  font-size: 12.5px;
  color: #6b7785;
  line-height: 1.7;
  margin: 0 0 6px;
}
.lawyer-status-img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin: 10px 0;
  cursor: pointer;
  border: 1px solid #eef1f3;
}
.lawyer-status-desc {
  font-size: 12.5px;
  color: #39424e;
  line-height: 1.7;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #eef1f3;
}
.lawyer-upload-box {
  width: 100%;
  height: 160px;
  border: 2px dashed #b7dcd1;
  border-radius: 12px;
  background: #f3faf7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: background .15s;
}
.lawyer-upload-box:hover { background: #e8f4ee; }
.lawyer-upload-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.lawyer-upload-placeholder {
  text-align: center;
  color: #0b7a5b;
  user-select: none;
}

/* ===== 顶部导航右侧按钮组 ===== */
.nav-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn {
  background: rgba(255,255,255,.22);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.share-btn:active { background: rgba(255,255,255,.35); }

/* ===== 分享二维码弹窗 ===== */
.share-panel {
  max-width: 340px;
  text-align: center;
}
.share-qrcode {
  display: block;
  width: 240px;
  height: 240px;
  margin: 4px auto 14px;
  object-fit: contain;
  background: #f9fbfc;
  border-radius: 12px;
  border: 1px solid #eef1f3;
  cursor: zoom-in;
}
.share-url {
  display: inline-block;
  padding: 8px 16px;
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px dashed #b7dcd1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  word-break: break-all;
  max-width: 100%;
  transition: background .15s;
}
.share-url:hover { background: #e8f4ee; }
.share-tip {
  font-size: 12px;
  color: #9aa5b1;
  margin-top: 10px;
  line-height: 1.6;
}

/* ===== 头像旁「聊过天」徽章 ===== */
.avatar-badge-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;    /* 保持原头像的 flex 行为，不被压缩 */
  line-height: 0;    /* 去掉 img inline 基线间隙 */
  cursor: pointer;
}

.avatar-badge-wrap .post-avatar,
.avatar-badge-wrap .post-avatar-sm {
  display: block;
}

.chat-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgb(255, 94, 0);
  border: 2px solid #fff;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  pointer-events: none;   /* 徽章本身不响应点击，点它等于点头像 */
}

.chat-badge-sm {
  width: 15px;
  height: 15px;
  font-size: 8px;
  right: -2px;
  bottom: -2px;
  border-width: 1.5px;
}

@keyframes chatBadgePulse {
  0%, 100% { box-shadow: 0 3px 6px rgba(0,0,0,.15), 0 0 0 0 rgba(7, 199, 144, 0.4); }
  50%      { box-shadow: 0 3px 6px rgba(0,0,0,.15), 0 0 0 4px rgba(11,122,91,0); }
}
.chat-badge {
  animation: chatBadgePulse 2s ease-in-out infinite;
}

.self-hint {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #9aa5b1;
  background: #f7f9fa;
  border-radius: 22px;
  border: 1px dashed #dce3e8;
  padding: 11px;
}

/* ===== 评论删除按钮 ===== */
.comment-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.comment-delete-btn {
  padding: 2px 6px;
  border: 1px solid #f5c4c4;
  border-radius: 8px;
  background: #fff;
  color: #e04545;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.3;
  font-family: inherit;
  transition: all .15s;
}

.comment-delete-btn:hover {
  background: #fdeaea;
}

.comment-delete-btn:active {
  transform: scale(.94);
}

/* ===== 列表页两列卡片适配（只作用于 .list 下的 .card） ===== */

/* 移除原来的一列时的 margin-bottom，改用父级 grid 的 gap */
.list .card {
  margin-bottom: 0;
  border-radius: 12px;
}

/* 封面高度缩小（原来 130px 在两列下太高） */
.list .card-cover {
  height: 100px;
}

/* 封面 emoji 也跟着缩小 */
.list .card-cover .cover-emoji {
  font-size: 40px;
}

/* 卡片正文内边距缩小，留出更多空间 */
.list .card-body {
  padding: 8px 10px 10px;
}

/* 标题字号略小、最多显示 2 行（防止长标题把卡片撑得太高） */
.list .card-title {
  font-size: 13.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 摘要字号小、最多 2 行 */
.list .card-summary {
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 4px;
  -webkit-line-clamp: 2;
}

/* 底部 meta 行上下间距小一点 */
.list .card-meta {
  margin-top: 6px;
}

/* tag 缩小 */
.list .card-meta .tag {
  font-size: 10.5px;
  padding: 1px 6px;
}

/* 阅读数缩小 */
.list .card-meta .read {
  font-size: 10px;
}

/* 空状态要跨满两列 */
.list .empty {
  grid-column: 1 / -1;
}

/* "加载更多"按钮要跨满两列 */
.list .load-more-wrap {
  grid-column: 1 / -1;
  padding: 4px 0 20px;
}

/* ===== 社区头部按钮组 ===== */
.community-header-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-chat {
  position: relative;
  background: #fff;
  color: #0b7a5b;
  border: 1px solid #b7dcd1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-chat:hover { background: #f3faf7; }
.btn-chat:active { transform: scale(.97); }

.unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e04545;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border: 2px solid #fff;
  box-sizing: content-box;
  text-align: center;
}

/* ===== 聊天联系人列表弹窗 ===== */
.chat-list-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  max-width: 420px;
  overflow: hidden;
}
.chat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}
.chat-list-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.chat-list-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #9aa5b1;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.chat-list-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-list-loading,
.chat-list-empty {
  text-align: center;
  color: #9aa5b1;
  font-size: 13px;
  padding: 40px 0;
}
.chat-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f3f5;
  cursor: pointer;
  transition: background .15s;
}
.chat-contact-item:last-child { border-bottom: none; }
.chat-contact-item:active { background: #f3faf7; }
.chat-contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8edf1;
}
.chat-contact-info {
  flex: 1;
  min-width: 0;
}
.chat-contact-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2a37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-last {
  font-size: 12.5px;
  color: #9aa5b1;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.chat-contact-time {
  font-size: 11px;
  color: #c8d0d8;
}
.chat-contact-unread {
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e04545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
}

/* ===== 帖子卡片：右侧「查看主页」按钮 ===== */
.btn-view-profile {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #b7dcd1;
  border-radius: 14px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}

.btn-view-profile:hover {
  background: #e8f4ee;
}

.btn-view-profile:active {
  transform: scale(.95);
}

/* 窄屏（手机）时按钮只留图标，节省横向空间 */
@media (max-width: 400px) {
  .btn-view-profile-text {
    display: none;
  }
  .btn-view-profile {
    padding: 5px 8px;
    min-width: 30px;
    justify-content: center;
  }
}

/* ===== 学情分析按钮（详情页操作栏） ===== */
.btn-report {
  background: #fff8e6;
  color: #a06b00;
  border: 1px solid #f5e0a3;
  font-size: 14px;
}
.btn-report:active {
  transform: scale(.97);
}

/* ===== 学情分析弹窗 ===== */
.report-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  max-width: 480px;
  overflow: hidden;
}
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}
.report-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.report-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #9aa5b1;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.report-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.report-loading {
  text-align: center;
  color: #9aa5b1;
  font-size: 13px;
  padding: 40px 0;
}

/* 概览卡片 */
.report-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.report-stat {
  background: #f9fbfc;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.report-stat.highlight {
  background: #f0faf5;
  border: 1px solid #b7e5cc;
}
.report-stat .val {
  font-size: 18px;
  font-weight: 800;
  color: #0b7a5b;
  line-height: 1.2;
}
.report-stat.highlight .val {
  color: #12a97e;
  font-size: 20px;
}
.report-stat .label {
  font-size: 11px;
  color: #9aa5b1;
  margin-top: 4px;
}

/* 分节标题 */
.report-section {
  margin-top: 18px;
}
.report-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b7a5b;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.2;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-refresh-btn {
  border: 1px solid #b7dcd1;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: normal;
}

/* 分类表现 */
.report-cat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-cat-item {
  padding: 10px 12px;
  background: #f9fbfc;
  border-radius: 10px;
  border: 1px solid #eef1f3;
}
.report-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.report-cat-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2a37;
}
.report-cat-acc {
  font-size: 13px;
  font-weight: 700;
  color: #6b7785;
}
.report-cat-bar {
  height: 6px;
  background: #e8edf1;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.report-cat-bar-inner {
  height: 100%;
  border-radius: 3px;
  transition: width .4s;
}
.report-cat-sub {
  font-size: 11px;
  color: #9aa5b1;
}

/* 最近做题 */
.report-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.report-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fbfc;
  border-radius: 10px;
  border: 1px solid #eef1f3;
}
.report-recent-info {
  flex: 1;
  min-width: 0;
}
.report-recent-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2a37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-recent-meta {
  font-size: 11px;
  color: #9aa5b1;
  margin-top: 3px;
}
.report-recent-cat {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px solid #b7dcd1;
  margin-right: 4px;
}
.report-recent-score {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
}
.report-recent-score.is-good { color: #12a97e; }
.report-recent-score.is-mid  { color: #f0ad4e; }
.report-recent-score.is-low  { color: #e04545; }

/* AI 加载动画 */
.report-ai-loading {
  text-align: center;
  padding: 30px 0;
}
.report-ai-dots {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 10px;
}
.report-ai-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0b7a5b;
  animation: reportDotBounce 1.2s infinite ease-in-out;
}
.report-ai-dots span:nth-child(2) { animation-delay: .2s; }
.report-ai-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes reportDotBounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}
.report-ai-loading-text {
  font-size: 13px;
  color: #6b7785;
}
.report-ai-error {
  text-align: center;
  color: #e04545;
  font-size: 13px;
  padding: 20px 0;
}
.report-ai-retry {
  display: block;
  margin: 10px auto 0;
  padding: 6px 16px;
  border: 1px solid #f5c4c4;
  background: #fdeaea;
  color: #e04545;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.report-ai-empty {
  text-align: center;
  padding: 16px 0;
}

/* AI 分析内容（Markdown 渲染后） */
.report-ai-content {
  font-size: 13.5px;
  line-height: 1.8;
  color: #39424e;
}
.report-ai-content h3,
.report-ai-content h4,
.report-ai-content h5 {
  font-size: 14px;
  font-weight: 700;
  color: #0b7a5b;
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.3;
}
.report-ai-content h3:first-child,
.report-ai-content h4:first-child {
  margin-top: 0;
}
.report-ai-content p {
  margin: 0 0 10px;
}
.report-ai-content ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
.report-ai-content li {
  margin-bottom: 4px;
}
.report-ai-content strong {
  color: #1f2a37;
  font-weight: 700;
}

/* ===== 详情页操作栏：4 按钮紧凑版 ===== */
.detail-action-bar--4 button {
  font-size: 13px;
  padding: 11px 4px;
  letter-spacing: 0;
  white-space: nowrap;
}
.detail-action-bar--4 .btn-sim {
  background: #eef4ff;
  color: #2b6cb0;
  border: 1px solid #c7d9f5;
}
.detail-action-bar--4 .btn-sim:active {
  transform: scale(.97);
}

/* ===== 情景模拟弹窗 ===== */
.sim-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  max-width: 480px;
  overflow: hidden;
}
.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}
.sim-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sim-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2a37;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sim-round {
  font-size: 11.5px;
  color: #9aa5b1;
  background: #f3faf7;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.sim-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #9aa5b1;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  flex-shrink: 0;
}
.sim-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 场景选择视图 */
.sim-scene-view {
  padding: 14px 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sim-scene-hint {
  font-size: 12.5px;
  color: #9aa5b1;
  margin-bottom: 12px;
  line-height: 1.6;
}
.sim-scene-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
}
.sim-scene-item:active {
  transform: scale(.985);
  background: #f3faf7;
  border-color: #b7dcd1;
}
.sim-scene-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.sim-scene-info { flex: 1; min-width: 0; }
.sim-scene-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a37;
  margin-bottom: 4px;
}
.sim-scene-brief {
  font-size: 12px;
  color: #6b7785;
  line-height: 1.5;
  margin-bottom: 6px;
}
.sim-scene-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sim-scene-country {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #f3faf7;
  color: #0b7a5b;
  border: 1px solid #b7dcd1;
}
.sim-scene-diff {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.sim-scene-diff.diff-easy { background: #e8f7f0; color: #0b7a5b; }
.sim-scene-diff.diff-mid  { background: #fff8e6; color: #a06b00; }
.sim-scene-diff.diff-hard { background: #fdeaea; color: #e04545; }

/* 对话视图 */
.sim-chat-view { padding: 0; }
.sim-scene-banner {
  padding: 8px 16px;
  background: #eef4ff;
  color: #2b6cb0;
  font-size: 12.5px;
  border-bottom: 1px solid #d9e4f6;
  flex-shrink: 0;
}
.sim-scene-banner strong { font-weight: 700; }
.sim-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  background: #f7f9fa;
  -webkit-overflow-scrolling: touch;
}
.sim-chat-item {
  display: flex;
  margin-bottom: 10px;
}
.sim-chat-item.user { justify-content: flex-end; }
.sim-chat-item.assistant { justify-content: flex-start; }
.sim-chat-bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}
.sim-chat-item.user .sim-chat-bubble {
  background: #2b6cb0;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.sim-chat-item.assistant .sim-chat-bubble {
  background: #fff;
  color: #1f2a37;
  border: 1px solid #eef1f3;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.sim-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}
.sim-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b7dcd1;
  animation: simDotBounce 1.2s infinite ease-in-out;
}
.sim-typing span:nth-child(2) { animation-delay: .2s; }
.sim-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes simDotBounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}
.sim-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #eef1f3;
  flex-shrink: 0;
}
.sim-input-bar input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #dce3e8;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: #f9fbfc;
  color: var(--ink);
  font-family: inherit;
}
.sim-input-bar input:focus { border-color: #2b6cb0; background: #fff; }
.sim-input-bar button {
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: #2b6cb0;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.sim-input-bar button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.sim-chat-footer {
  padding: 8px 14px 12px;
  background: #fff;
  border-top: 1px solid #eef1f3;
  flex-shrink: 0;
}
.sim-end-btn {
  width: 100%;
  padding: 11px;
  border: 1px solid #b7dcd1;
  border-radius: 22px;
  background: #f3faf7;
  color: #0b7a5b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sim-end-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 点评视图 */
.sim-review-view {
  padding: 14px 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sim-review-loading {
  text-align: center;
  padding: 40px 0;
  color: #6b7785;
  font-size: 13px;
}
.sim-review-error {
  text-align: center;
  color: #e04545;
  font-size: 13px;
  padding: 20px 0;
}
.sim-retry-btn {
  display: block;
  margin: 10px auto 0;
  padding: 6px 16px;
  border: 1px solid #f5c4c4;
  background: #fdeaea;
  color: #e04545;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.sim-review-content {
  font-size: 13.5px;
  line-height: 1.8;
  color: #39424e;
}
.sim-review-content h3,
.sim-review-content h4,
.sim-review-content h5 {
  font-size: 14px;
  font-weight: 700;
  color: #0b7a5b;
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.3;
}
.sim-review-content h3:first-child,
.sim-review-content h4:first-child { margin-top: 0; }
.sim-review-content p { margin: 0 0 10px; }
.sim-review-content ul { margin: 0 0 10px; padding-left: 20px; }
.sim-review-content li { margin-bottom: 4px; }
.sim-review-content strong { color: #1f2a37; font-weight: 700; }
.sim-review-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef1f3;
}
.sim-review-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}

/* ===== 我的页：快捷工具 ===== */
.me-tools {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px 14px;
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(31, 42, 55, .07);
}
.me-tools-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1f2a37;
  margin-bottom: 12px;
}
.me-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.me-tool-item {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0faf5, #e8f7f0);
  border: 1px solid #b7e5cc;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.me-tool-item:active {
  transform: scale(.97);
  box-shadow: 0 2px 8px rgba(11, 122, 91, .12);
}
.me-tool-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 6px;
}
.me-tool-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b7a5b;
  margin-bottom: 2px;
}
.me-tool-desc {
  font-size: 11.5px;
  color: #6b7785;
  line-height: 1.4;
}

/* ===== 法律文书生成弹窗 ===== */
.docgen-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  max-width: 520px;
  overflow: hidden;
}
.docgen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}
.docgen-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.docgen-close {
  border: none;
  background: none;
  font-size: 22px;
  color: #9aa5b1;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.docgen-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 18px;
  -webkit-overflow-scrolling: touch;
}
.docgen-hint {
  font-size: 12.5px;
  color: #9aa5b1;
  margin-bottom: 14px;
  line-height: 1.6;
}
.docgen-form-row {
  margin-bottom: 12px;
}
.docgen-form-row label {
  display: block;
  font-size: 12.5px;
  color: #6b7785;
  margin-bottom: 6px;
  font-weight: 600;
}
.docgen-form-row label .req {
  color: #e04545;
  margin-left: 2px;
}
.docgen-form-row select,
.docgen-form-row input,
.docgen-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  color: #1f2a37;
  font-family: inherit;
  background: #f9fbfc;
  box-sizing: border-box;
  resize: vertical;
}
.docgen-form-row select:focus,
.docgen-form-row input:focus,
.docgen-form-row textarea:focus {
  border-color: #12a97e;
  background: #fff;
}
.docgen-form-row textarea {
  line-height: 1.6;
  min-height: 60px;
}
.docgen-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px) {
  .docgen-form-grid-2 {
    grid-template-columns: 1fr;
  }
}
.docgen-form-counter {
  font-size: 11px;
  color: #c8d0d8;
  text-align: right;
  margin-top: 2px;
}
.docgen-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eef1f3;
}
.docgen-form-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}
.docgen-form-actions button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 结果视图 */
.docgen-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f0faf5;
  border: 1px solid #b7e5cc;
  border-radius: 10px;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
.docgen-result-type {
  font-size: 13px;
  font-weight: 700;
  color: #0b7a5b;
}
.docgen-result-time {
  font-size: 11.5px;
  color: #6b7785;
}
.docgen-result-content {
  font-size: 13.5px;
  line-height: 1.85;
  color: #39424e;
}
.docgen-result-content h1,
.docgen-result-content h2,
.docgen-result-content h3,
.docgen-result-content h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #0b7a5b;
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.35;
}
.docgen-result-content h1:first-child,
.docgen-result-content h2:first-child,
.docgen-result-content h3:first-child {
  margin-top: 0;
}
.docgen-result-content p {
  margin: 0 0 10px;
}
.docgen-result-content ul,
.docgen-result-content ol {
  margin: 0 0 10px;
  padding-left: 20px;
}
.docgen-result-content li {
  margin-bottom: 4px;
}
.docgen-result-content strong {
  color: #1f2a37;
  font-weight: 700;
}
.docgen-result-content hr {
  border: none;
  border-top: 1px dashed #dce3e8;
  margin: 14px 0;
}
.docgen-result-actions {
  flex-wrap: wrap;
}
.docgen-result-actions button {
  flex: 1 1 30%;
  min-width: 90px;
}

/* ===== 律师认证：多选标签 ===== */
.lawyer-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lawyer-tag {
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid #dce3e8;
  background: #f9fbfc;
  color: #39424e;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.3;
  transition: all .15s;
}
.lawyer-tag:active { transform: scale(.96); }
.lawyer-tag.is-on {
  background: #f3faf7;
  color: #0b7a5b;
  border-color: #0b7a5b;
  font-weight: 600;
}

.lawyer-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 400px) {
  .lawyer-form-grid-2 { grid-template-columns: 1fr; }
}

/* ===== 律师执业档案卡 ===== */
.me-lawyer-card {
  background: linear-gradient(135deg, #f0faf5 0%, #f9fbfc 100%);
  border: 1px solid #b7dcd1;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: 0 2px 10px rgba(11, 122, 91, .06);
}

.me-lawyer-title {
  font-size: 14px;
  font-weight: 700;
  color: #0b7a5b;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.2;
}

.me-lawyer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-bottom: 4px;
}

.me-lawyer-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  min-width: 0;
}

.me-lawyer-item--full { grid-column: 1 / -1; }

.me-lawyer-label {
  color: #9aa5b1;
  font-size: 11.5px;
}

.me-lawyer-value {
  color: #1f2a37;
  font-weight: 500;
  word-break: break-word;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.me-lawyer-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #b7dcd1;
  color: #0b7a5b;
  font-size: 11.5px;
  line-height: 1.5;
}

.me-lawyer-cases {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d1e7df;
}

.me-lawyer-cases-text {
  font-size: 12.5px;
  line-height: 1.7;
  color: #39424e;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.me-lawyer-cases-text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.me-lawyer-toggle {
  margin-top: 6px;
  padding: 2px 10px;
  border: 1px solid #b7dcd1;
  border-radius: 10px;
  background: #fff;
  color: #0b7a5b;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}
.me-lawyer-toggle:active { transform: scale(.96); }

.me-lawyer-hint {
  margin-top: 10px;
  font-size: 11px;
  color: #9aa5b1;
  font-style: italic;
  text-align: right;
}


/* ===== 用户资料卡：律师摘要 ===== */
.user-lawyer-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-lawyer-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #39424e;
}

.user-lawyer-icon {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.5;
  width: 18px;
  text-align: center;
}

.user-lawyer-line-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.user-lawyer-tags {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.user-lawyer-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #b7dcd1;
  color: #0b7a5b;
  font-size: 11.5px;
  line-height: 1.5;
}

.user-lawyer-loading {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
}
.user-lawyer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b7dcd1;
  animation: userLawyerBounce 1.2s infinite ease-in-out;
}
.user-lawyer-dot:nth-child(2) { animation-delay: .2s; }
.user-lawyer-dot:nth-child(3) { animation-delay: .4s; }
@keyframes userLawyerBounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}



/* ===== AI 律师匹配 ===== */
.lawyer-match-analysis {
  background: #f0faf5;
  border: 1px solid #b7e5cc;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.lawyer-match-analysis-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b7a5b;
  margin-bottom: 10px;
}
.lawyer-match-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.lawyer-match-analysis-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lawyer-match-analysis-label {
  font-size: 11px;
  color: #9aa5b1;
}
.lawyer-match-analysis-value {
  font-size: 13px;
  font-weight: 600;
  color: #1f2a37;
}
.lawyer-match-analysis-urgency {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.lawyer-match-analysis-urgency.urg-high   { background: #fdeaea; color: #e04545; }
.lawyer-match-analysis-urgency.urg-medium { background: #fff8e6; color: #a06b00; }
.lawyer-match-analysis-urgency.urg-low    { background: #f0faf5; color: #0b7a5b; }
.lawyer-match-analysis-summary {
  font-size: 12.5px;
  line-height: 1.7;
  color: #39424e;
  padding-top: 8px;
  border-top: 1px dashed #d1e7df;
}

.lawyer-match-list-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b7a5b;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid #0b7a5b;
  line-height: 1.2;
}
.lawyer-match-empty {
  text-align: center;
  color: #9aa5b1;
  font-size: 13px;
  padding: 24px 12px;
  background: #f9fbfc;
  border-radius: 10px;
  line-height: 1.7;
}

.lawyer-match-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
  border-radius: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lawyer-match-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8edf1;
}
.lawyer-match-info {
  flex: 1;
  min-width: 0;
}
.lawyer-match-name {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a37;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lawyer-match-meta {
  font-size: 12px;
  color: #6b7785;
  margin-top: 3px;
}
.lawyer-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.lawyer-match-tag {
  padding: 1px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #b7dcd1;
  color: #0b7a5b;
  font-size: 11.5px;
  line-height: 1.5;
}
.lawyer-match-tag--country {
  background: #eef4ff;
  border-color: #c7d9f5;
  color: #2b6cb0;
}
.lawyer-match-reason {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dce3e8;
  font-size: 12.5px;
  line-height: 1.6;
  color: #39424e;
  font-style: italic;
}
.lawyer-match-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 18px;
  border: none;
  background: #0b7a5b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  align-self: center;
}
.lawyer-match-btn:hover { background: #0a6e51; }
.lawyer-match-btn:active { transform: scale(.96); }

@media (max-width: 400px) {
  .lawyer-match-analysis-grid { grid-template-columns: 1fr; }
  .lawyer-match-card { flex-wrap: wrap; }
  .lawyer-match-btn { width: 100%; }
}

/* ===== 文书拍照解读 ===== */
.doc-translate-upload {
  width: 100%;
  min-height: 180px;
  border: 2px dashed #b7dcd1;
  border-radius: 12px;
  background: #f3faf7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 20px;
  transition: background .15s;
  text-align: center;
}
.doc-translate-upload:active { background: #e8f4ee; }
.doc-translate-upload-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}
.doc-translate-upload-text {
  font-size: 14px;
  font-weight: 600;
  color: #0b7a5b;
  margin-bottom: 4px;
}
.doc-translate-upload-hint {
  font-size: 11.5px;
  color: #9aa5b1;
}

.doc-translate-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fbfc;
  border: 1px solid #eef1f3;
}
.doc-translate-preview-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
  background: #fff;
  cursor: zoom-in;
}
.doc-translate-preview-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #eef1f3;
  justify-content: center;
}

.doc-translate-camera-row {
  display: flex;
  justify-content: center;
  margin: -6px 0 12px;
}
.doc-translate-camera-btn {
  padding: 8px 18px;
  border-radius: 18px;
  border: 1px solid #b7dcd1;
  background: #fff;
  color: #0b7a5b;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.doc-translate-camera-btn:active { transform: scale(.97); }

.doc-translate-loading-hint {
  text-align: center;
  font-size: 11.5px;
  color: #9aa5b1;
  margin-top: 8px;
}

/* ===== Hero 搜索 ===== */
.hero-search input::placeholder {
  color: #9aa5b1;
}
/* 隐藏 type=search 的浏览器自带清除按钮 */
.hero-search input::-webkit-search-cancel-button {
  display: none;
}
.hero-search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8edf1;
  color: #6b7785;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.hero-search-clear:active { background: #dce3e8; }
.search-loading {
  font-size: 11.5px;
  color: #0b7a5b;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

.hero-search-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 14px;
  border: none;
  background: #0b7a5b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.hero-search-btn:hover { background: #0a6e51; }
.hero-search-btn:active { transform: scale(.95); }
.hero-search-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.hero-search input:disabled { opacity: .6; }

.hero-search-icon {
  font-size: 14px;
  flex-shrink: 0;
  opacity: .6;
}
.hero-search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8edf1;
  color: #6b7785;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.hero-search-clear:active { background: #dce3e8; }
.hero-search-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 14px;
  border: none;
  background: #0b7a5b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.hero-search-btn:hover { background: #0a6e51; }
.hero-search-btn:active { transform: scale(.95); }
.hero-search-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.hero-search {
  margin-bottom: 10px;
  background: rgba(255,255,255,.96);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  height: 40px;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.hero-search input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0;
  font-size: 14px; color: var(--ink);
  font-family: inherit; height: 100%; padding: 0;
}
.hero-search input::placeholder { color: #9aa5b1; }
.hero-search input:disabled { opacity: .6; }
.hero-search input::-webkit-search-cancel-button { display: none; }

/* ===== 注册同意声明 ===== */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #6b7785;
  cursor: pointer;
  user-select: none;
}

.agree-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #0b7a5b;   /* 现代浏览器下勾选框变绿色 */
  cursor: pointer;
}

.agree-text { flex: 1; min-width: 0; }

.agree-link {
  color: #0b7a5b;
  text-decoration: underline;
}

/* ===== 声明弹层 ===== */
.terms-panel {
  max-width: 480px;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.terms-panel h3 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f3;
  flex-shrink: 0;
}

.terms-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  line-height: 1.8;
  color: #39424e;
}

.terms-body p { margin: 0 0 10px; }

.terms-body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.terms-body li { margin-bottom: 8px; }

.terms-footer {
  font-size: 12px;
  color: #9aa5b1;
  border-top: 1px dashed #eef1f3;
  padding-top: 10px;
}

.terms-panel .form-actions {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #eef1f3;
  flex-shrink: 0;
}