﻿:root {
  --blue-900: #0b376d;
  --blue-800: #104c86;
  --blue-700: #1764a8;
  --blue-100: #e8f2fb;
  --line: #d6e3f2;
  --text: #172336;
  --muted: #65758b;
  --warning: #fff6df;
  --warning-line: #c88418;
  --danger: #b42318;
  --ok: #116b4f;
  --panel: #f7faff;
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: #eef3f8;
  font-size: 16px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.no-copy { user-select: none; }
.copyable { user-select: text; }

.intro-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, #eaf3fb 0%, #f7fafc 100%);
}
.intro-card {
  width: min(920px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(24, 58, 101, 0.13);
  border-radius: 8px;
  padding: 34px;
}
.intro-card.narrow { width: min(760px, 100%); }
.brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.brand-mark, .logo-dot {
  width: 48px; height: 48px; border-radius: 6px;
  display: grid; place-items: center;
  color: white; background: var(--blue-900); font-weight: 800;
}
.brand-row h1 { margin: 0 0 6px; font-size: 28px; }
.brand-row p, .muted { margin: 0; color: var(--muted); line-height: 1.7; }
.task-callout {
  border-left: 6px solid var(--warning-line);
  background: var(--warning);
  padding: 18px 20px;
  font-size: 24px;
  font-weight: 800;
  margin: 22px 0;
}
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.rule-grid div {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 16px;
  border-radius: 6px;
  min-height: 106px;
}
.rule-grid strong { display: block; color: var(--blue-900); margin-bottom: 8px; }
.rule-grid span, .reward-box p { color: #34465d; line-height: 1.65; }
.reward-box {
  border: 1px solid #f0d9a9;
  background: #fffaf0;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 20px 0;
}
.reward-box p { margin: 4px 0; }
.reward-box.strong { border-color: #e7bd6c; }
.reward-amount,
.reward-total {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 900;
}
.reward-amount {
  color: #0b4f8f;
  background: #e7f2ff;
  border: 1px solid #9ec7ef;
}
.reward-total {
  color: #7a3f00;
  background: #fff0cf;
  border: 1px solid #e2ad4b;
}
.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.primary, .ghost {
  border-radius: 6px;
  padding: 10px 18px;
  border: 1px solid var(--blue-700);
  font-weight: 700;
}
.primary { background: #1666ad; color: #fff; }
.primary:hover { background: #0e5799; }
.primary:disabled { background: #9ab5cf; border-color: #9ab5cf; cursor: not-allowed; }
.ghost { background: #fff; color: var(--blue-900); border-color: #b9cce3; }
.large { font-size: 18px; padding: 13px 24px; }
.id-box {
  margin: 18px 0 12px;
  padding: 18px;
  border: 2px dashed var(--blue-700);
  background: #f0f7ff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 3px;
  text-align: center;
  border-radius: 6px;
}

.experiment-shell {
  min-height: 100vh;
  display: grid;
  gap: 14px;
  padding: 14px;
}
.experiment-shell.no-ai { grid-template-columns: 380px minmax(720px, 1fr); }
.experiment-shell.with-ai { grid-template-columns: 340px minmax(620px, 1fr) 430px; }
.task-panel, .portal-wrap, .ai-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: calc(100vh - 28px);
}
.task-panel {
  padding: 20px;
  overflow: auto;
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
}
.phase-pill {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-900);
  border: 1px solid #c5d9ed;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 10px;
}
.task-panel h2 { margin: 6px 0 12px; font-size: 26px; }
.task-highlight {
  background: #fff0ca;
  border-left: 7px solid var(--warning-line);
  color: #2d2108;
  padding: 15px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
  border-radius: 4px;
  margin-bottom: 14px;
}
.task-panel p { color: #42536a; line-height: 1.7; }
.material-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.material-block h3 { color: var(--blue-900); margin: 0 0 10px; font-size: 18px; }
.material-block .copyable {
  background: #f5f9ff;
  border: 1px solid #d8e6f5;
  padding: 9px 10px;
  border-radius: 5px;
  margin: 8px 0;
}
.copy-list { margin: 0; }
.copy-list dt { font-weight: 900; color: var(--blue-900); margin: 11px 0 5px; }
.copy-list dd { margin: 4px 0; color: #3b4f67; line-height: 1.55; }
.compact p { font-size: 14px; }

.portal-wrap { overflow: auto; }
.portal-header {
  height: 74px;
  background: var(--blue-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: 8px 8px 0 0;
}
.portal-title { display: flex; align-items: center; gap: 12px; }
.portal-title strong { display: block; font-size: 22px; }
.portal-title span { color: #c9d9eb; }
.logo-dot { width: 42px; height: 42px; background: #1b7dbf; }
.portal-nav { display: flex; gap: 8px; margin-left: auto; margin-right: 18px; }
.portal-nav-button {
  border: 2px solid #b9d6f0;
  background: #fff;
  color: var(--blue-900);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(0,0,0,0.16);
}
.portal-nav-button:hover:not(:disabled) { background: #e8f3ff; border-color: #fff; transform: translateY(-1px); }
.portal-nav-button:disabled { opacity: 0.4; cursor: not-allowed; }
.timer {
  background: #fff;
  color: #b42318;
  border: 3px solid #ff3b30;
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.2);
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 800;
}
.timer strong { font-size: 25px; margin-left: 8px; color: #d10f00; }
.timer.timer-critical { animation: timer-pulse 0.8s infinite alternate; }
@keyframes timer-pulse {
  from { transform: scale(1); box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.2); }
  to { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 59, 48, 0.35); }
}
.portal-page { padding: 28px; }
.breadcrumb { color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.breadcrumb button {
  border: 1px solid transparent;
  background: #edf6ff;
  color: var(--blue-700);
  padding: 5px 9px;
  border-radius: 5px;
  font-weight: 700;
}
.breadcrumb button:hover { border-color: #8bb9df; background: #dceeff; text-decoration: underline; }
.breadcrumb span[aria-current="page"] { color: #53677d; }
.breadcrumb i { margin: 0 8px; font-style: normal; color: #9aa9ba; }
.portal-page h1 { font-size: 32px; margin: 0 0 24px; }
.portal-page h2 { font-size: 22px; margin: 28px 0 14px; color: var(--blue-900); }
.hero-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1767aa, #21a4be);
  color: #fff;
  padding: 34px;
  border-radius: 2px;
  margin-bottom: 24px;
}
.hero-band h1 { color: #fff; margin: 0 0 12px; }
.hero-band p { font-size: 20px; margin: 0; }
.service-grid { display: grid; gap: 16px; }
.service-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-grid.one { grid-template-columns: minmax(280px, 360px); }
.service-card {
  text-align: left;
  min-height: 112px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  color: var(--text);
}
.service-card:hover { border-color: #80afd9; box-shadow: 0 8px 22px rgba(18, 74, 125, 0.12); }
.service-card strong { display: block; color: var(--blue-900); font-size: 22px; margin-bottom: 10px; }
.service-card span { color: #5f7084; font-size: 18px; line-height: 1.45; }
.notice {
  border-left: 6px solid var(--warning-line);
  background: var(--warning);
  padding: 16px 20px;
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.page-error, .page-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.page-error { background: #fff1f0; color: var(--danger); border: 1px solid #ffccc7; }
.page-message { background: #effaf6; color: var(--ok); border: 1px solid #b8e7d2; }
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.data-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.data-table th, .data-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { background: #f3f7fc; color: var(--blue-900); }
.split-form { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(340px, 0.9fr); gap: 20px; align-items: start; }
.two-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card, .candidate-panel, .preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}
.form-card.wide { max-width: 780px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; color: #506078; font-weight: 700; margin-bottom: 8px; }
.field b { color: #c92222; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbdced;
  background: #fff;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc7ec; border-color: #4f97d2; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid #cbdced; border-radius: 6px; overflow: hidden; }
.seg { border: 0; background: #fff; padding: 12px; color: #52647a; }
.seg + .seg { border-left: 1px solid #cbdced; }
.seg.selected { background: #dfefff; color: var(--blue-900); font-weight: 800; }
.candidate-panel { background: #eef7ff; }
.candidate-panel h2 { margin-top: 0; }
.candidate {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: 1px solid #bdd7ef; background: #fff; border-radius: 7px;
  padding: 14px 16px; margin: 10px 0; text-align: left;
}
.candidate strong { display: block; color: var(--blue-900); font-size: 20px; }
.candidate em { display: block; color: #68798d; font-style: normal; margin: 4px 0; }
.candidate b { color: #0f62a5; }
.candidate i { font-style: normal; color: #1764a8; font-weight: 900; font-size: 22px; }
.three-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.preview-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; max-width: 860px; padding: 0; overflow: hidden; }
.preview-card div { padding: 14px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.preview-card span { display: block; color: var(--muted); margin-bottom: 5px; }
.preview-card strong { color: var(--text); }

.ai-panel {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ai-head {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--blue-900);
  color: #fff;
  padding: 16px;
}
.ai-logo {
  width: 48px; height: 48px; border-radius: 50%;
  background: #eaf5ff; color: var(--blue-900);
  display: grid; place-items: center;
  font-weight: 900;
  border: 3px solid #5fb7df;
}
.ai-head h2 { margin: 0 0 4px; font-size: 20px; }
.ai-head p { margin: 0; color: #d5e5f5; font-size: 13px; }
.ai-note { margin: 14px; padding: 12px; border: 1px solid #d8e6f5; background: #f5f9ff; border-radius: 6px; line-height: 1.55; color: #44556b; }
.ai-progress { margin: 0 14px 12px; color: var(--blue-900); font-weight: 700; }
.suggestions { display: grid; gap: 8px; padding: 0 14px 12px; }
.suggestions button { border: 1px solid #c5d9ed; background: #fff; color: var(--blue-900); padding: 9px; border-radius: 6px; text-align: left; line-height: 1.4; }
.chat-log { flex: 1; overflow: auto; padding: 12px 14px; background: #f8fbff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chat { margin-bottom: 12px; }
.chat span { display: block; font-size: 12px; color: #6c7c91; margin-bottom: 4px; }
.chat p { margin: 0; padding: 10px 12px; border-radius: 7px; line-height: 1.55; white-space: pre-wrap; }
.chat.assistant p { background: #fff; border: 1px solid var(--line); }
.chat.user p { background: #dff0ff; border: 1px solid #b8d8f2; }
.chat-form { padding: 12px; display: grid; gap: 8px; }
.chat-form textarea { min-height: 74px; resize: vertical; }

.loading { padding: 40px; }

@media (max-width: 1280px) {
  .experiment-shell.with-ai { grid-template-columns: 320px minmax(540px, 1fr) 390px; }
  .service-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .experiment-shell, .experiment-shell.no-ai, .experiment-shell.with-ai { grid-template-columns: 1fr; }
  .task-panel, .ai-panel { position: static; height: auto; min-height: 0; }
  .rule-grid, .two-forms, .split-form, .preview-card { grid-template-columns: 1fr; }
}
.example-title {
  margin: 0 14px 8px;
  color: #42536a;
  font-size: 14px;
  font-weight: 700;
}
.example-list {
  margin: 0;
  padding: 0 14px 12px 30px;
  color: var(--blue-900);
}
.example-list li {
  border: 1px solid #c5d9ed;
  background: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  line-height: 1.45;
}
.notice.light {
  background: #f5f9ff;
  border-left-color: #6aa6d8;
  font-size: 16px;
}
.result-status {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 16px;
}
.result-status.success { background: #e9f8f1; color: #0b6b48; border: 1px solid #a9dfc7; }
.result-status.fail { background: #fff1f0; color: #b42318; border: 1px solid #ffb4ad; }
.reward-direct {
  font-size: 22px;
  font-weight: 900;
  color: var(--blue-900);
  background: #eef7ff;
  border: 1px solid #bad8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}
.reward-direct.no-reward { background: #fff8ea; border-color: #e8ca8b; color: #704b00; }
.id-warning { color: #704b00; background: #fff8ea; border: 1px solid #e8ca8b; border-radius: 6px; padding: 12px; margin-top: 18px; }

.ai-head.compact { padding: 13px 15px; }
.ai-head.compact .ai-logo { width: 42px; height: 42px; border-radius: 12px; }
.ai-head.compact h2 { font-size: 18px; }
.ai-count {
  margin: 12px 14px 8px;
  padding: 9px 11px;
  border: 1px solid #cfe0f1;
  background: #f6faff;
  border-radius: 6px;
  color: var(--blue-900);
  font-weight: 800;
}
.ai-count strong { font-size: 18px; }
.ai-use-tip {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border-left: 4px solid #1d6fb8;
  background: #eef7ff;
  color: #27425f;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}
.example-title {
  margin: 0 14px 10px;
  color: #52647a;
  font-size: 13px;
  font-weight: 500;
}
.chat-log {
  background: #f2f5f8;
  padding: 14px 12px;
}
.chat-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 13px;
}
.chat-row.user {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  font-size: 12px;
  font-weight: 900;
  background: #e7f4ff;
  color: var(--blue-900);
  border: 2px solid #69b6df;
}
.chat-row.user .chat-avatar {
  background: #f2f4f7;
  color: #43536a;
  border-color: #cbd5e1;
}
.chat-bubble {
  max-width: calc(100% - 48px);
}
.chat-bubble span {
  display: block;
  font-size: 12px;
  color: #6c7c91;
  margin: 0 0 4px 2px;
}
.chat-row.user .chat-bubble span { text-align: right; margin-right: 2px; }
.chat-bubble p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #d7e4f2;
}
.chat-row.user .chat-bubble p {
  background: #dcefff;
  border-color: #abd2f3;
}
.chat-form.inline {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 8px;
  padding: 10px;
  align-items: stretch;
}
.chat-form.inline textarea {
  min-height: 46px;
  max-height: 92px;
  resize: vertical;
  padding: 10px 12px;
}
.send-button {
  padding: 0;
  min-height: 46px;
}
.ai-logo svg,
.chat-avatar svg {
  width: 70%;
  height: 70%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-logo {
  color: var(--blue-900);
}
.chat-avatar.assistant {
  background: #e7f7ff;
  color: #0b5d9b;
  border-color: #69b6df;
}
.chat-avatar.user {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}
.ai-head.compact .ai-logo svg {
  width: 74%;
  height: 74%;
}
.rule-grid .highlight-card {
  border-color: #f1c66b;
  background: #fff8e8;
  box-shadow: inset 0 0 0 1px rgba(193, 132, 24, 0.12);
}
.rule-grid .highlight-card strong {
  color: #8a5700;
}
.rule-grid .highlight-card span b {
  color: #172336;
  font-size: 17px;
}
.task-callout b,
.reward-box b {
  color: #0b376d;
}

.conversation-review {
  margin: 22px 0 18px;
  border: 1px solid #c8d8ea;
  background: #f7fbff;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}
.conversation-review-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-bottom: 1px solid #d8e5f3;
  background: #edf6ff;
}
.conversation-review-head h2 {
  margin: 0 0 6px;
  color: #12355f;
  font-size: 20px;
}
.conversation-review-head p {
  margin: 0;
  color: #42536a;
  line-height: 1.55;
}
.review-countdown {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #9fc3e6;
  color: #0b4f88;
  font-weight: 800;
  white-space: nowrap;
}
.conversation-review-log {
  max-height: 360px;
  overflow: auto;
  padding: 14px 18px 4px;
}
.review-chat-row {
  margin: 0 0 14px;
}
.review-chat-meta {
  margin-bottom: 5px;
  color: #5a6b82;
  font-size: 13px;
  font-weight: 800;
}
.review-chat-content {
  border: 1px solid #d5e2f1;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: #182638;
  line-height: 1.65;
  white-space: pre-wrap;
}
.review-chat-row.user .review-chat-content {
  background: #e8f4ff;
  border-color: #b7d7f3;
}
@media (max-width: 720px) {
  .conversation-review-head { flex-direction: column; }
  .review-countdown { white-space: normal; }
  .conversation-review-log { max-height: 320px; }
}
