* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #1f2328;
}

body.modal-open {
  height: 100vh;
  overflow: hidden;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  text-align: center;
  padding: 24px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  min-height: 520px;
}

.hero.compact {
  min-height: unset;
  padding: 16px 20px;
}

.hero.compact-strong {
  min-height: unset;
  padding: 12px 16px;
}

.hero-subtitle {
  text-align: center;
  line-height: 1.6;
  margin: 10px 0 16px;
}

.hero-title-link {
  cursor: pointer;
}

.hero-title-link:hover {
  text-decoration: underline;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}

.modal-open .topbar {
  filter: brightness(0.85);
  opacity: 0.9;
}

.card {
  margin-top: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.toggle-panel {
  height: 580px;
  min-height: 580px;
  overflow-y: auto;
}

.toggle-panel.collapsed {
  display: none;
}

#togglePlaceholder {
  height: 580px;
  min-height: 580px;
  background: #ffffff;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

label {
  display: block;
  margin-bottom: 12px;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 14px;
}

select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 14px;
  background: #ffffff;
}

.primary {
  background: #111827;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d0d7de;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.small {
  padding: 6px 10px;
  font-size: 12px;
}

.recharge-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.wechat-login {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.wechat-login__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.calm-instruction {
  margin-top: 10px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #b91c1c;
  line-height: 1.6;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.topbar .user-bar {
  background: #ffffff;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid #eef2f7;
}

.user-badge {
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-balance {
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  min-width: 96px;
  text-align: center;
}

.home-btn {
  border-radius: 999px;
  padding: 6px 12px;
}

.hero-title-link {
  font-size: 26px;
  line-height: 1.2;
}

.hero-subtitle {
  text-align: center;
  line-height: 1.6;
  margin: 12px auto 16px;
  max-width: 520px;
}

.hero-form {
  max-width: 520px;
  margin: 16px auto 10px;
  text-align: left;
}

.hero-calm {
  max-width: 520px;
  margin: 24px auto 10px;
  text-align: left;
}

.recharge-panel {
  max-width: 520px;
  margin: 12px auto 0;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #e5e7eb;
}

#rechargeSection {
  margin-top: 16px;
  margin-bottom: 16px;
}

.recharge-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.recharge-option {
  border: 1px solid #d0d7de;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.recharge-option.active {
  border-color: #111827;
  color: #111827;
  font-weight: 700;
}

.admin-group {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
}

.admin-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.inline-alert {
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.block {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.chat-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  line-height: 1.6;
}

.chat-message__meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.chat-message.user {
  align-self: flex-end;
  background: #f1f5f9;
}

.chat-message.ai {
  align-self: flex-start;
  background: #f8fafc;
}

.chat-message.system {
  align-self: center;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  max-width: 92%;
}

.chat-message__body {
  white-space: pre-wrap;
  line-height: 1.6;
}

.chat-message__body .md-h1 {
  font-size: 16px;
  font-weight: 700;
  margin: 6px 0;
}

.chat-message__body .md-h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 6px 0;
}

.chat-message__body .md-h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 6px 0;
}

.chat-message__body .md-li {
  margin: 2px 0 2px 8px;
}

.admin-detail {
  display: grid;
  gap: 12px;
}

.admin-detail details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.admin-detail summary {
  cursor: pointer;
  font-weight: 600;
  color: #111827;
}

.section-title {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.share-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 10px;
  color: #1e3a8a;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 13px;
}

.poster-modal-content {
  width: min(92vw, 560px);
  max-width: 560px;
  max-height: min(88vh, 920px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.poster-modal-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.poster-modal-tip {
  margin-top: 8px;
 }

.poster-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  background: #f8fafc;
}

.poster-modal-footer {
  flex: none;
  margin-top: 0;
  padding: 16px 20px 20px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.poster-modal-image {
  display: block;
  width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.followup-retry-area {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  border-radius: 10px;
}

.followup-retry-title {
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 8px;
}

.followup-retry-list {
  display: grid;
  gap: 8px;
}

.followup-retry-item {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.followup-retry-item__text {
  flex: 1;
  min-width: 200px;
  color: #7c2d12;
  font-size: 13px;
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.inline-select--right {
  margin-left: auto;
}

.inline-select select {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.calm-actions {
  display: grid;
  gap: 10px;
}

.calm-actions__primary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.calm-actions__config {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.calm-actions__config .inline-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.calm-actions__config .inline-select select {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 8px 10px;
}

.calm-actions__save {
  height: 38px;
  align-self: end;
  white-space: nowrap;
}

.calm-actions__tips {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 18px;
}

.calm-actions__tips .tip {
  margin-top: 0;
}

.calm-actions__tips .inline-alert {
  margin-top: 0;
}

.invite-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.invite-label {
  min-width: 72px;
  font-weight: 600;
  color: #111827;
}

.invite-value {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #111827;
  word-break: break-all;
}

.invite-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: #374151;
  flex-wrap: wrap;
}

.invite-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.history-row {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  margin-top: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-row:hover {
  background: #f8fafc;
}

.history-row__time {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.history-row__text {
  font-size: 14px;
  color: #111827;
  margin-top: 2px;
}

.history-row__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.history-row__content {
  flex: 1;
  min-width: 0;
}

.order-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  margin-top: 12px;
}

.order-list {
  margin-top: 12px;
}

#historyList {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.community-composer {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.community-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.community-post {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.community-post__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
}

.community-post__user {
  font-weight: 600;
  color: #111827;
}

.community-post__content {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  white-space: pre-wrap;
}

.community-post__title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.community-post__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-post__status {
  margin-top: 6px;
  font-size: 12px;
  color: #b45309;
}

.community-action.active {
  border-color: #111827;
  font-weight: 700;
}

.community-replies {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
  display: grid;
  gap: 8px;
}

.community-reply {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.community-reply__meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.community-reply__content {
  font-size: 13px;
  color: #111827;
  line-height: 1.5;
  white-space: pre-wrap;
}

.community-reply-composer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.community-reply-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 13px;
}


.moderation-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.moderation-actions input {
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 12px;
}

.moderation-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 6px;
}

.moderation-item__header {
  font-size: 12px;
  color: #6b7280;
}

.moderation-item__title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.moderation-item__content {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  white-space: pre-wrap;
}

.moderation-item__status {
  font-size: 12px;
  color: #b45309;
}

.moderation-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.moderation-reject-input {
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 12px;
}

.moderation-reject-select {
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
}

.moderation-log-title {
  margin: 0;
  font-size: 14px;
}

.moderation-log {
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #4b5563;
  background: #f8fafc;
}

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

.order-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.order-meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #374151;
  white-space: pre-wrap;
}

.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.order-qr {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  white-space: pre-wrap;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge--pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.badge--fail {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.tip {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

.auth-message {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.auth-tip-title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2328;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.disclaimer-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
}

.modal-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal-content p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

#realnameStatus {
  white-space: pre-wrap;
}

#shareSheet .form-actions {
  justify-content: flex-start;
}

#shareSheet .form-actions button {
  min-width: 108px;
}

/* 临时取消隐藏效果，展示所有模块 */
.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}

body.show-history #historySection,
body.show-history #historySection.hidden {
  display: block !important;
}



/* 允许免责声明正常隐藏，避免遮挡后续流程 */
#disclaimer.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#disclaimer.hidden::before {
  content: "";
  display: none;
}

/* 允许登录模块在登录后隐藏 */
#loginSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#loginSection.hidden::before {
  content: "";
  display: none;
}

/* 允许增加次数模块按逻辑隐藏 */
#rechargePanel.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#rechargePanel.hidden::before {
  content: "";
  display: none;
}

/* 允许“次数不足”等提示按逻辑隐藏 */
#nonsenseNotice.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#nonsenseNotice.hidden::before {
  content: "";
  display: none;
}

/* 结果区：仅管理员可见的块按逻辑隐藏 */
#calcTitle.hidden,
#calcBlock.hidden,
#guaTitle.hidden,
#guaBlock.hidden,
#guaProTitle.hidden,
#guaBlockPro.hidden,
#adminDetailBlock.hidden,
#historyBackBtn.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#calcTitle.hidden::before,
#calcBlock.hidden::before,
#guaTitle.hidden::before,
#guaBlock.hidden::before,
#guaProTitle.hidden::before,
#guaBlockPro.hidden::before,
#adminDetailBlock.hidden::before,
#historyBackBtn.hidden::before {
  content: "";
  display: none;
}

/* 结果区子模块标识（便于测试时识别） */
#historyBackBtn.hidden::before {
  content: "【返回记录列表按钮】";
}

#calcTitle.hidden::before {
  content: "【计算说明标题】";
}

#calcBlock.hidden::before {
  content: "【计算说明内容区】";
}

#guaTitle.hidden::before {
  content: "【起卦结果标题】";
}

#guaBlock.hidden::before {
  content: "【起卦结果内容区】";
}

#guaProTitle.hidden::before {
  content: "【起卦结果（专业版）标题】";
}

#guaBlockPro.hidden::before {
  content: "【起卦结果（专业版）内容区】";
}

#adminDetailBlock.hidden::before {
  content: "【管理员详情区】";
}

#followupSection.hidden::before {
  content: "【追问输入区】";
}

#followupBtn.hidden::before {
  content: "【追问按钮】";
}

/* 管理员模块恢复按逻辑隐藏 */
#adminDashboardSection.hidden,
#adminHistorySection.hidden,
#adminPaymentsSection.hidden,
#adminMetricsSection.hidden,
#adminEventsSection.hidden,
#adminCostSection.hidden,
#adminWithdrawalsSection.hidden,
#adminReportsSection.hidden,
#adminUsersSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#adminDashboardSection.hidden::before,
#adminHistorySection.hidden::before,
#adminPaymentsSection.hidden::before,
#adminMetricsSection.hidden::before,
#adminEventsSection.hidden::before,
#adminCostSection.hidden::before,
#adminWithdrawalsSection.hidden::before,
#adminReportsSection.hidden::before,
#adminUsersSection.hidden::before {
  content: "";
  display: none;
}

/* 用户功能模块恢复按逻辑隐藏 */
#passwordSection.hidden,
#paymentHistorySection.hidden,
#commissionSection.hidden,
#inviteRecordsSection.hidden,
#withdrawalSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#passwordSection.hidden::before,
#paymentHistorySection.hidden::before,
#commissionSection.hidden::before,
#inviteRecordsSection.hidden::before,
#withdrawalSection.hidden::before {
  content: "";
  display: none;
}

/* 讨论区/审核管理在用户端需真正隐藏 */
#communityToggleBtn.hidden,
#moderationToggleBtn.hidden,
#communitySection.hidden,
#moderationSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#communityToggleBtn.hidden::before,
#moderationToggleBtn.hidden::before,
#communitySection.hidden::before,
#moderationSection.hidden::before {
  content: "";
  display: none;
}

/* 邀请分享与空白占位模块需真正隐藏 */
#inviteSection.hidden,
#togglePlaceholder.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#inviteSection.hidden::before,
#togglePlaceholder.hidden::before {
  content: "";
  display: none;
}

/* 登录时只展示登录模块 */
#mainSection.hidden,
#toast.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#mainSection.hidden::before,
#toast.hidden::before {
  content: "";
  display: none;
}

/* 主页状态下的历史/结果/追问按逻辑隐藏 */
#historySection.hidden,
#resultSection.hidden,
#followupSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#historySection.hidden::before,
#resultSection.hidden::before,
#followupSection.hidden::before {
  content: "";
  display: none;
}


/* 增加次数模块按逻辑隐藏 */
#rechargeSection.hidden {
  display: none !important;
}

.hidden::before {
  content: "";
  display: none;
}


#rechargeSection.hidden::before {
  content: "";
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 520px) {
  .user-bar {
    flex-wrap: wrap;
    white-space: normal;
  }

  .user-badge {
    max-width: 140px;
  }

  .calm-actions__config {
    grid-template-columns: 1fr;
  }

  .calm-actions__save {
    width: fit-content;
  }
}

@media (max-width: 720px) and (min-width: 521px) {
  .calm-actions__config {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .calm-actions__save {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
