/* OPC圈子 · H5 资源中心 + AI 助手 */

/* 资源页头 */
.h5res-hero {
  padding: 4px 4px 16px;
}

.h5res-hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #1e5eff, #7c4df0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.h5res-hero p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
}

/* 模块快捷入口 */
.h5res-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.h5res-quick button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 13px 6px 11px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.h5res-quick button i {
  font-style: normal;
  font-size: 19px;
}

.h5res-quick button.on {
  border-color: var(--brand);
  background: linear-gradient(160deg, #f2f6ff, #f7f3ff);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(30, 94, 255, 0.12);
}

.h5res-quick button:active {
  transform: scale(0.96);
}

/* 面板 */
.h5res-panel {
  padding-bottom: 8px;
}

.h5res-sec-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 4px 2px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h5res-sec-title span {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}

/* 社区卡 */
.h5res-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  margin-bottom: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* 社区搜索 / 城市胶囊 / 计数 */
.h5res-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  background: #fff;
  outline: none;
  margin-bottom: 10px;
  -webkit-appearance: none;
  appearance: none;
}
.h5res-search:focus {
  border-color: var(--brand);
}
.h5res-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.h5res-chips button {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.h5res-chips button.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.h5res-count {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.h5res-card-img {
  width: calc(100% + 30px);
  margin: -14px -15px 10px;
  height: 130px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  display: block;
}
.h5res-modal-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  display: block;
}

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

.h5res-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.h5res-card-head b {
  font-size: 14.5px;
  line-height: 1.45;
}

.h5res-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5res-subsidy {
  margin-top: 9px;
  font-size: 12px;
  color: #7a4b00;
  background: linear-gradient(90deg, #fff7e6, #fffbef);
  border: 1px solid #ffe6b0;
  border-radius: 8px;
  padding: 7px 9px;
  line-height: 1.6;
}

.h5res-tags {
  margin-top: 9px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* 活动 */
.h5res-act {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}

.h5res-date {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(150deg, #f2f6ff, #eaf1ff);
  border: 1px solid #e2eaff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.h5res-date b {
  font-size: 17px;
  line-height: 1.1;
}

.h5res-date span {
  font-size: 10.5px;
  color: var(--ink-3);
}

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

.h5res-act-body b {
  font-size: 14px;
  display: block;
  line-height: 1.45;
}

.h5res-act-body .h5res-meta {
  margin-top: 5px;
}

/* 合规手风琴 */
.h5res-acc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 9px;
  overflow: hidden;
}

.h5res-acc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 600;
}

.h5res-acc-head .ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.h5res-acc-head .lvl {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
}

.h5res-acc-head .lvl.mid {
  background: var(--warn-soft);
  color: var(--warn);
}

.h5res-acc-body {
  display: none;
  padding: 0 15px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.8;
}

.h5res-acc.open .h5res-acc-body {
  display: block;
}

.h5res-acc-body ul {
  margin: 8px 0;
  padding-left: 16px;
  line-height: 1.9;
}

.h5res-acc-body .tip {
  background: #f3f7ff;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 9px 11px;
  font-size: 12px;
  margin-top: 8px;
}

/* 融资 */
.h5res-fund {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  margin-bottom: 10px;
}

.h5res-fund b {
  font-size: 14.5px;
}

.h5res-fund .amount {
  display: block;
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(120deg, #1e5eff, #6b46e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h5res-fund p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

.h5res-fund .foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 工具 */
.h5res-tool {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
}

.h5res-tool b {
  font-size: 13.5px;
}

.h5res-tool span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* 自测 */
.h5res-cert {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
}

.h5res-cert-bar {
  height: 5px;
  border-radius: 5px;
  background: var(--line-2);
  overflow: hidden;
  margin-bottom: 6px;
}

.h5res-cert-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #2f6bff, #7c4df0);
  transition: width 0.25s ease;
}

.h5res-cert-step {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-bottom: 12px;
  display: block;
}

.h5res-cert h4 {
  margin: 0 0 4px;
  font-size: 15.5px;
  line-height: 1.5;
}

.h5res-cert .sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.h5res-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.h5res-opt:active {
  transform: scale(0.98);
  border-color: var(--brand);
  background: #f7faff;
}

.h5res-opt i {
  font-style: normal;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--line-2);
  color: var(--ink-3);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.h5res-score {
  text-align: center;
  padding: 6px 0 2px;
}

.h5res-score b {
  display: block;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, #1e5eff, #6b46e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h5res-score span {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.h5res-score p {
  margin: 10px 0 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.75;
  text-align: left;
}

/* AI 助手（H5） */
.h5ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 12px;
}

.h5ai-back {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.h5ai-head b {
  display: block;
  font-size: 15px;
}

.h5ai-head span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.h5ai-thread {
  min-height: 52vh;
  padding-bottom: 8px;
}

.h5ai-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 13px;
  animation: h5ai-in 0.2s ease;
}

@keyframes h5ai-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.h5ai-msg .av {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: linear-gradient(135deg, #eef3ff, #f3eeff);
  border: 1px solid #e5ebff;
}

.h5ai-msg.user {
  flex-direction: row-reverse;
}

.h5ai-msg.user .av {
  background: linear-gradient(135deg, #2f6bff, #5b3ce0);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.h5ai-bubble {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}

.h5ai-msg.user .h5ai-bubble {
  background: linear-gradient(135deg, #2f6bff, #1246d4);
  color: #fff;
  border: none;
}

.h5ai-links {
  margin-top: 9px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.h5ai-links a {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f5f8ff;
  border: 1px solid var(--brand-soft-2);
  color: var(--brand);
}

.h5ai-suggest {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}

.h5ai-suggest::-webkit-scrollbar {
  display: none;
}

.h5ai-suggest button {
  flex-shrink: 0;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}

.h5ai-form {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 6px 6px 12px;
}

.h5ai-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font);
  background: transparent;
  min-width: 0;
}

.h5ai-form .btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ===== 加载状态：提示条 / 失败重试态 ===== */
.h5res-notice {
  display: none;
}

.h5res-notice.show {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 12px;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  background: linear-gradient(120deg, #f4f7ff, #f7f4ff);
  border: 1px solid #e6ecff;
}

.h5res-notice.show.warn {
  color: #8a5a00;
  background: #fffaf0;
  border-color: #ffe6b8;
}

.h5res-notice .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
  animation: h5res-blink 1s ease-in-out infinite;
}

.h5res-notice .dot.warn {
  background: #f0a020;
  animation: none;
}

.h5res-notice button {
  margin-left: auto;
  flex: none;
  border: 1px solid currentColor;
  background: #fff;
  color: inherit;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}

@keyframes h5res-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.h5res-state {
  padding: 28px 16px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.h5res-state .ic {
  font-size: 26px;
  display: block;
  margin-bottom: 8px;
}

.h5res-state b {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 5px;
}

.h5res-state p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}
