:root {
  --green: #4a7a01;
  --green-soft: #eef4e5;
  --black: #11130f;
  --gray-700: #5b5f56;
  --gray-500: #858a80;
  --gray-300: #dfe2dc;
  --gray-100: #f6f7f4;
  --white: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--white);
  color: var(--black);
  font-family: "Microsoft YaHei", "微软雅黑", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}
button, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 40px, 920px); margin: 0 auto; }
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--gray-300); }
.brand {
  color: var(--black);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
}
.eyebrow { margin: 52px 0 12px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 0; color: var(--green); font-size: clamp(72px, 13vw, 132px); line-height: .92; letter-spacing: -.075em; }
.tool-name { margin: 18px 0 9px; color: var(--green); font-size: clamp(17px, 2.3vw, 22px); font-weight: 700; letter-spacing: .01em; }
.intro { max-width: 720px; margin-bottom: 0; color: var(--gray-500); font-size: 13px; line-height: 1.75; }
.workspace, .results-section { padding: 48px 0; border-bottom: 1px solid var(--gray-300); }
.section-heading { display: grid; grid-template-columns: 44px 1fr; gap: 12px; margin-bottom: 28px; }
.section-heading .step { color: var(--green); font-size: 12px; font-weight: 700; }
.section-heading h2 { margin-bottom: 4px; font-size: clamp(23px, 4vw, 34px); line-height: 1.25; letter-spacing: -.025em; }
.section-heading div > p { margin-bottom: 0; color: var(--gray-500); font-size: 14px; }
.conversation:empty { display: none; }
.conversation { display: grid; gap: 12px; margin: 0 0 18px 56px; }
.message { max-width: 86%; padding: 14px 16px; border-radius: 2px 14px 14px 14px; background: var(--gray-100); color: var(--gray-700); white-space: pre-wrap; }
.message.user { justify-self: end; border-radius: 14px 2px 14px 14px; background: var(--green-soft); color: #304c06; }
.message strong { display: block; margin-bottom: 5px; color: var(--black); font-size: 13px; }
.composer { margin-left: 56px; border: 1px solid var(--gray-300); border-radius: 14px; background: var(--white); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74, 122, 1, .08); }
textarea { display: block; width: 100%; min-height: 176px; padding: 20px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--black); line-height: 1.7; }
textarea::placeholder { color: #a1a69c; opacity: 1; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 12px 12px 20px; border-top: 1px solid var(--gray-300); }
.composer-footer > span { color: var(--gray-500); font-size: 12px; }
.composer-footer button, .new-product-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
}
button:disabled { cursor: wait; opacity: .58; }
.secondary-actions { display: flex; justify-content: flex-end; gap: 16px; margin: 10px 0 0 56px; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 700; }
.text-button.muted { color: var(--gray-500); font-weight: 400; }
.result-note { margin: -8px 0 24px 56px; padding: 12px 14px; border-left: 3px solid var(--green); background: var(--green-soft); color: #3f5d12; font-size: 13px; }
.results-grid { display: grid; gap: 16px; margin-left: 56px; }
.result-card { padding: 24px; border: 1px solid var(--gray-300); border-radius: 14px; }
.result-card header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.result-card h3 { margin-bottom: 4px; font-size: 19px; }
.result-card .strategy { margin-bottom: 0; color: var(--gray-500); font-size: 13px; }
.direction-number { color: var(--green); font-size: 12px; font-weight: 700; }
.output-block + .output-block { margin-top: 18px; }
.output-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--gray-500); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.count.over { color: #a53d25; }
.output-text { margin: 0; color: var(--black); font-size: 16px; line-height: 1.55; }
.issues { margin: 14px 0 0; color: #a53d25; font-size: 12px; }
.card-footer { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--gray-300); }
.reason { max-width: 560px; margin: 0; color: var(--gray-500); font-size: 12px; }
.copy-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.copy-button { min-height: 36px; padding: 0 11px; border: 1px solid var(--gray-300); border-radius: 7px; background: var(--white); color: var(--black); font-size: 12px; }
.copy-button:hover { border-color: var(--green); color: var(--green); }
.new-product-button { display: block; margin: 28px 0 0 56px; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px 0 48px; color: var(--gray-500); font-size: 11px; }
footer p { margin-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; padding: 10px 16px; border-radius: 8px; background: var(--black); color: var(--white); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .page-shell { width: min(100% - 28px, 920px); }
  .hero { padding: 30px 0 32px; }
  .eyebrow { margin-top: 38px; }
  h1 { font-size: 76px; }
  .tool-name { margin-top: 14px; }
  .workspace, .results-section { padding: 36px 0; }
  .section-heading { grid-template-columns: 32px 1fr; gap: 6px; }
  .conversation, .composer, .secondary-actions, .results-grid, .result-note { margin-left: 0; }
  .message { max-width: 94%; }
  textarea { min-height: 220px; padding: 16px; font-size: 16px; }
  .composer-footer { align-items: flex-start; flex-direction: column; padding: 12px; }
  .composer-footer button { width: 100%; }
  .secondary-actions { justify-content: space-between; }
  .result-card { padding: 18px; }
  .card-footer { align-items: stretch; flex-direction: column; }
  .copy-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .copy-button { padding: 0 7px; }
  .new-product-button { width: 100%; margin-left: 0; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
