/* 创作首页：沿用现有侧栏与工作台，只在首页启用轻色产品入口。 */
#app:has(.portal-home) {
  --xyq-bg: #f7f9fc;
  --xyq-panel: #fff;
  --xyq-line: #e3e7ee;
  --xyq-text: #18202d;
  --xyq-muted: #687385;
  --xyq-accent-soft: #fff0e6;
  background: var(--xyq-bg);
}
.xyq-body:has(.portal-home) { background: #f7f9fc; }
#app:has(.portal-home) .hero2-agent { color: var(--xyq-text); }
#app:has(.portal-home) .sb-promo-card { background: #f7ffdf; }
#app:has(.portal-home) .sb-promo-t { color: #263622; }
#app:has(.portal-home) .sb-promo-d { color: #667458; }
#app:has(.portal-home) .hscroll::-webkit-scrollbar-thumb { background: #d5dae4; }

.portal-home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 28px 4px;
  color: #18202d;
}
.portal-heading { margin-bottom: 25px; }
.portal-kicker {
  display: block;
  color: #687385;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.portal-heading h1 {
  margin: 11px 0 9px;
  font-size: clamp(29px, 3.1vw, 42px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.18;
}
.portal-heading p { margin: 0; color: #677386; font-size: 14px; line-height: 1.7; }
.portal-slogan { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; color: #8a93a3; }

.portal-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.portal-product {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  min-height: 202px;
  padding: 23px 22px;
  border: 1px solid #dce4bc;
  border-radius: 22px;
  background: #f7ffdf;
  color: #17202a;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.portal-product:hover, .portal-product:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(30, 49, 12, .10);
  border-color: #b5d56e;
  outline: none;
}
.portal-product-video { background: #fff; border-color: #dfe3e9; }
.portal-product-video:hover, .portal-product-video:focus-visible { border-color: #b9c3d0; }
.portal-product-icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #fff;
  font-size: 25px;
  line-height: 1;
  color: #1f2a27;
}
.portal-product-video .portal-product-icon { background: #f6f8fb; }
.portal-product-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-right: 22px; }
.portal-product-title { font-size: 21px; line-height: 1.2; font-weight: 760; letter-spacing: -.025em; }
.portal-product-subtitle { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #4b5663; }
.portal-product-description { margin-top: 8px; font-size: 13.5px; line-height: 1.62; color: #657286; }
.portal-product-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9ffab;
  color: #304810;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0;
}
.portal-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 14px; }
.portal-tags span {
  padding: 4px 9px;
  border: 1px solid #dce3dc;
  border-radius: 999px;
  background: #fff;
  color: #3f4b5a;
  font-size: 10.5px;
  white-space: nowrap;
}
.portal-product-arrow {
  position: absolute;
  top: 25px; right: 22px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid #dfe5dc;
  border-radius: 50%;
  background: #fff;
  font-size: 19px;
}

.portal-pipeline { margin-top: 40px; }
.portal-tools-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 15px; }
.portal-tools-heading h2 { margin: 7px 0 0; font-size: 22px; letter-spacing: -.02em; }
.portal-tools-note { color: #8290a0; font-size: 12px; white-space: nowrap; }
.portal-pipeline-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.portal-pipeline-list li { min-height: 112px; padding: 16px 18px; border: 1px solid #e2e6ec; border-radius: 16px; background: #fff; }
.portal-pipeline-list li > span { display: block; color: #7fa927; font-size: 12px; font-weight: 800; letter-spacing: .08em; margin-bottom: 8px; }
.portal-pipeline-list strong { display: block; font-size: 14px; }
.portal-pipeline-list p { margin: 6px 0 0; color: #69778a; font-size: 12px; line-height: 1.55; }

.portal-pipeline + .portal-tools-heading { margin-top: 41px; }
.portal-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.portal-tool {
  min-width: 0; min-height: 153px;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 15px;
  border: 1px solid #e0e5ec; border-radius: 17px;
  background: #fff; color: #18202d;
  text-align: left; cursor: pointer; font: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.portal-tool:hover, .portal-tool:focus-visible {
  transform: translateY(-3px);
  border-color: #b8d080;
  box-shadow: 0 13px 28px rgba(40, 54, 30, .08);
  outline: none;
}
.portal-tool-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f2ffd5;
  font-size: 21px;
  line-height: 1;
}
.portal-tool strong { font-size: 14px; line-height: 1.3; }
.portal-tool > span:last-child { margin-top: 7px; font-size: 11.5px; line-height: 1.5; color: #6b7788; }
.portal-notice {
  position: fixed; right: 25px; bottom: 24px; z-index: 80;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  border: 1px solid #d4ddb9;
  border-radius: 13px;
  background: #fbffe9;
  color: #2d3a29;
  box-shadow: 0 15px 38px rgba(24, 37, 17, .16);
  font-size: 13px;
  line-height: 1.5;
}
.portal-notice[hidden] { display: none; }

html.drama-mode .portal-home, .xyq-body.drama-mode .portal-home { display: none; }
html:not(.drama-mode) .drama-only { display: none; }
html.drama-mode .hero2, .xyq-body.drama-mode .hero2 { padding-top: 48px; }

#app:has(.portal-home) .hero2 { padding-top: 52px; scroll-margin-top: 60px; }
#app:has(.portal-home) .hero2-logo { height: 42px; }
#app:has(.portal-home) .hero2-title { font-size: 21px; }

@media (max-width: 1180px) {
  .portal-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .portal-home { padding: 34px 20px 4px; }
  .portal-products { grid-template-columns: 1fr; }
  .portal-product { min-height: 175px; }
}
@media (max-width: 600px) {
  .portal-home { padding: 28px 16px 4px; }
  .portal-heading h1 { font-size: 29px; }
  .portal-product { padding: 18px; gap: 12px; }
  .portal-product-icon { flex-basis: 42px; width: 42px; height: 42px; }
  .portal-product-title { font-size: 19px; }
  .portal-product-arrow { right: 17px; top: 17px; }
  .portal-pipeline-list { grid-template-columns: 1fr; }
  .portal-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .portal-tool { min-height: 148px; padding: 12px; }
  .portal-tools-note { display: none; }
}
