:root {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: #432f43;
  background: #fbf5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid #c36b91;
  outline-offset: 3px;
}
.app-shell { min-height: 100dvh; }
.masthead {
  height: 70px;
  max-width: 1040px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eadde2;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #432f43; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: #70435d; color: #fff; border-radius: 10px; font-size: 19px; }
.model-status { font-size: 11px; color: #806a7a; text-align: right; }
.flow { max-width: 760px; min-height: calc(100dvh - 70px); margin: auto; padding: 32px 28px 72px; display: flex; flex-direction: column; }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.back-button, .quiet-button { border: 0; background: none; color: #795c72; padding: 6px 0; font-size: 13px; }
.back-button:hover, .quiet-button:hover { text-decoration: underline; }
.step-count { color: #806f7b; font-size: 12px; white-space: nowrap; }
.progress { height: 4px; background: #ecdfe5; border-radius: 5px; overflow: hidden; margin: 20px 0 0; }
.progress-fill { height: 100%; background: #c36b91; border-radius: 5px; transition: width .22s ease; }
.eyebrow { margin: 38px 0 14px; color: #a64f75; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.hero-title { font-size: clamp(34px, 7vw, 58px); letter-spacing: -.05em; line-height: 1.18; margin: 0 0 18px; max-width: 620px; }
.lead { margin: 0; color: #746472; font-size: 15px; line-height: 1.8; max-width: 590px; }
.welcome-steps { margin: 32px 0 0; padding: 22px 22px 22px 45px; border-radius: 20px; background: #fff; border: 1px solid #eddee5; color: #665365; font-size: 14px; line-height: 1.9; }
.welcome-steps li + li { margin-top: 10px; }
.welcome-steps li::marker { color: #b95e87; font-weight: 700; }
.welcome-card { margin-top: 17px; padding: 18px 20px; border-left: 3px solid #c36b91; background: #f5e7ec; color: #704d65; line-height: 1.75; font-size: 13px; }
.soft-panel { background: #fff; border: 1px solid #eddee5; border-radius: 20px; padding: 20px; margin: 26px 0 0; }
.gender-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; }
.control-row + .control-row { border-top: 1px solid #f1e7eb; }
.control-label { font-size: 13px; font-weight: 700; }
.control-note { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: #968593; }
.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #f6edf1; flex-wrap: wrap; justify-content: flex-end; }
.segment { border: 0; background: transparent; border-radius: 7px; padding: 8px 11px; color: #785f73; font-size: 12px; min-height: 36px; }
.segment[aria-pressed="true"] { background: #70435d; color: #fff; }
.keyword-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 24px 0 0; }
.keyword-option { min-height: 63px; padding: 12px 9px; border: 1px solid #e7cfda; border-radius: 14px; background: #fff; color: #65415b; font-size: 16px; font-weight: 700; box-shadow: 0 3px 9px #70435d0b; transition: transform .15s, background .15s, border-color .15s; }
.keyword-option:hover { transform: translateY(-2px); border-color: #bf7395; background: #fff9fb; }
.keyword-option[aria-pressed="true"] { background: #70435d; color: #fff; border-color: #70435d; }
.category-selected { min-height: 20px; margin: 17px 0 0; color: #775c70; font-size: 12px; line-height: 1.6; }
.jump-row { display: flex; align-items: center; gap: 10px; margin-top: 19px; color: #9a8493; font-size: 11px; }
.jump-row select { max-width: 190px; padding: 7px 9px; border: 1px solid #e4d3dc; border-radius: 8px; background: #fff; color: #714d65; font-size: 12px; }
.stage-actions { margin-top: auto; padding-top: 34px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; }
.primary-button, .secondary-button { min-height: 52px; border-radius: 12px; padding: 12px 18px; font-size: 14px; font-weight: 700; }
.primary-button { border: 1px solid #70435d; background: #70435d; color: #fff; }
.primary-button:hover:not(:disabled) { background: #573348; }
.secondary-button { border: 1px solid #dfcbd6; background: #fff; color: #754f68; }
.secondary-button:hover { background: #fff7fa; }
.full-button { width: 100%; }
.switch-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fff; border: 1px solid #eddee5; border-radius: 20px; padding: 22px; margin: 32px 0 0; cursor: pointer; }
.switch-copy strong { display: block; font-size: 17px; }
.switch-copy span { display: block; margin-top: 7px; font-size: 13px; line-height: 1.6; color: #806e7d; }
.switch { appearance: none; width: 52px; height: 30px; border-radius: 20px; background: #d9c8d1; flex: none; position: relative; transition: background .2s; }
.switch:before { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 4px; left: 4px; box-shadow: 0 1px 4px #0002; transition: transform .2s; }
.switch:checked { background: #a64f75; }
.switch:checked:before { transform: translateX(22px); }
.hint-list { margin: 24px 0 0; padding-left: 20px; color: #806e7d; font-size: 13px; line-height: 1.9; }
.field-label { display: block; margin: 34px 0 10px; font-size: 13px; font-weight: 700; }
.detail-input, .result-input { width: 100%; resize: vertical; border: 1px solid #e4d3dc; border-radius: 15px; background: #fff; color: #432f43; padding: 17px; font-size: 14px; line-height: 1.75; }
.detail-input { min-height: 170px; }
.detail-input::placeholder { color: #a593a1; }
.result-input { min-height: 50dvh; }
.review-list { display: grid; gap: 10px; margin: 28px 0 0; }
.review-group { background: #fff; border: 1px solid #eddee5; border-radius: 13px; padding: 15px 17px; }
.review-group strong { display: block; font-size: 12px; color: #8f7889; margin-bottom: 7px; }
.review-words { font-size: 15px; color: #623e57; line-height: 1.5; }
.review-meta { margin: 20px 0 0; color: #8d7887; font-size: 12px; line-height: 1.7; }
.message { min-height: 19px; margin: 16px 0 0; color: #7a5a70; font-size: 12px; line-height: 1.6; }
.message.error { color: #b34c60; }
.loading-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 230px; margin-top: 30px; border: 1px solid #eddee5; border-radius: 20px; background: #fff; }
.loading-spinner { width: 46px; height: 46px; border: 4px solid #f0dce5; border-top-color: #a64f75; border-radius: 50%; animation: spin .85s linear infinite; }
.loading-status { margin: 0; color: #795c72; font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-actions { display: flex; gap: 12px; margin: 18px 0 0; }
.result-actions > * { flex: 1; }
@media (max-width: 600px) {
  .masthead { height: 58px; padding: 0 18px; }
  .model-status { font-size: 10px; max-width: 150px; }
  .flow { min-height: calc(100dvh - 58px); padding: 18px 18px calc(26px + env(safe-area-inset-bottom)); }
  .eyebrow { margin-top: 30px; }
  .hero-title { font-size: 36px; }
  .lead { font-size: 14px; }
  .welcome-steps { margin-top: 24px; padding: 18px 16px 18px 38px; font-size: 13px; }
  .soft-panel { padding: 15px; margin-top: 22px; }
  .gender-panel { align-items: flex-start; flex-direction: column; }
  .control-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .segmented { justify-content: flex-start; }
  .segment { min-height: 40px; }
  .keyword-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
  .keyword-option { min-height: 56px; font-size: 15px; }
  .stage-actions { position: sticky; bottom: 0; background: linear-gradient(to bottom, #fbf5f700, #fbf5f7 16px); padding: 24px 0 env(safe-area-inset-bottom); margin-top: auto; }
  .switch-panel { padding: 18px; }
  .result-input { min-height: 48dvh; }
}
@media (max-width: 370px) { .segment { padding: 8px; } .stage-actions { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
