:root {
  --orange: #e85d24;
  --orange-dark: #b93d15;
  --green: #356b52;
  --cream: #fff8eb;
  --ink: #28342d;
  --muted: #667069;
  --line: #eadfce;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; }
.member-header { height: 76px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.member-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.member-brand img { width: 42px; height: 42px; object-fit: contain; }
.member-brand strong { display: block; font-size: 20px; }
.member-brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.back-link { color: var(--green); font-weight: 700; text-decoration: none; }
.member-main { min-height: calc(100vh - 76px); padding: 56px 24px; display: grid; place-items: center; }
.auth-layout { width: min(960px, 100%); display: grid; grid-template-columns: 1fr 440px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(80, 61, 39, .12); }
.auth-story { padding: 56px; color: #fff; background: var(--green); }
.auth-story .eyebrow { color: #ffd2ab; font-weight: 800; }
.auth-story h1 { margin: 18px 0; font-size: 42px; line-height: 1.18; }
.auth-story p { font-size: 17px; line-height: 1.8; opacity: .9; }
.auth-story ul { margin: 30px 0 0; padding: 0; list-style: none; }
.auth-story li { margin: 14px 0; }
.auth-story li::before { content: "✓"; margin-right: 10px; color: #ffd2ab; font-weight: 900; }
.auth-panel { padding: 48px; }
.auth-panel h2 { margin: 0 0 8px; font-size: 28px; }
.auth-panel > p { margin: 0 0 28px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-tabs button { padding: 12px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.auth-tabs button.is-active { color: var(--orange-dark); border-bottom-color: var(--orange); }
.auth-form label { display: block; margin: 16px 0 7px; font-weight: 700; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d8cdbd; border-radius: 4px; font: inherit; outline: none; }
.auth-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 93, 36, .12); }
.primary-button, .secondary-button { min-height: 48px; padding: 0 20px; border-radius: 4px; border: 1px solid transparent; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary-button { width: 100%; margin-top: 24px; color: #fff; background: var(--orange); }
.primary-button:hover { background: var(--orange-dark); }
.secondary-button { color: var(--green); background: #fff; border-color: var(--green); }
.form-status { min-height: 24px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.form-status.error { color: #b42318; }
.form-status.success { color: var(--green); }
.account-shell { width: min(980px, 100%); }
.account-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.account-heading h1 { margin: 0 0 8px; font-size: 36px; }
.account-heading p { margin: 0; color: var(--muted); }
.text-button { border: 0; color: var(--orange-dark); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.account-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.account-card { padding: 30px; background: #fff; border: 1px solid var(--line); }
.account-card h2 { margin: 0 0 22px; font-size: 21px; }
.identity { display: flex; align-items: center; gap: 16px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green); font-size: 24px; font-weight: 900; }
.identity strong { display: block; font-size: 21px; }
.identity span { color: var(--muted); }
.member-id { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.membership-state { padding: 22px; background: #fff3e5; border-left: 4px solid var(--orange); }
.membership-state strong { display: block; color: var(--orange-dark); font-size: 24px; }
.membership-state span { display: block; margin-top: 7px; color: var(--muted); }
.account-actions { display: grid; gap: 12px; margin-top: 22px; }
.sso-wait { width: min(520px, 100%); padding: 44px; text-align: center; background: #fff; border: 1px solid var(--line); }
.sso-wait h1 { font-size: 27px; }
.spinner { width: 38px; height: 38px; margin: 0 auto 24px; border: 4px solid #f0dfcb; border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .member-header { height: 66px; padding: 0 16px; }
  .member-main { min-height: calc(100vh - 66px); padding: 24px 16px; }
  .auth-layout, .account-grid { grid-template-columns: 1fr; }
  .auth-story { padding: 30px 26px; }
  .auth-story h1 { font-size: 30px; }
  .auth-story ul { display: none; }
  .auth-panel, .account-card { padding: 26px; }
  .account-heading { align-items: start; }
  .account-heading h1 { font-size: 28px; }
}

[hidden] { display: none !important; }
.member-page { background: #f7f3eb; }
.member-header-actions { display: flex; align-items: center; gap: 22px; }
.member-page .member-main { display: block; min-height: calc(100vh - 76px); padding: 0; }
.member-app { width: min(1280px, 100%); min-height: calc(100vh - 76px); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.member-sidebar { padding: 34px 20px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-identity { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; border-bottom: 1px solid var(--line); }
.sidebar-identity .avatar { flex: 0 0 auto; width: 48px; height: 48px; font-size: 20px; }
.sidebar-identity strong, .sidebar-identity span { display: block; }
.sidebar-identity strong { font-size: 17px; }
.sidebar-identity span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.member-nav { display: grid; gap: 6px; margin-top: 22px; }
.member-nav button { width: 100%; min-height: 64px; padding: 10px 13px; text-align: left; border: 0; border-left: 4px solid transparent; border-radius: 0 4px 4px 0; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.member-nav button:hover { background: #fff8ed; }
.member-nav button.is-active { color: var(--orange-dark); background: #fff1e2; border-left-color: var(--orange); }
.member-nav span, .member-nav small { display: block; }
.member-nav span { font-weight: 800; }
.member-nav small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.member-content { min-width: 0; padding: 46px clamp(24px, 5vw, 68px) 72px; }
.member-section { max-width: 980px; margin: 0 auto; }
.section-kicker { margin: 0 0 8px !important; color: var(--orange-dark) !important; font-size: 13px; font-weight: 900; }
.member-page .account-heading { margin-bottom: 28px; }
.member-page .account-heading h1, .section-heading-member h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.25; }
.section-heading-member { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading-member p { margin: 0; color: var(--muted); line-height: 1.7; }
.section-badge { flex: 0 0 auto; padding: 9px 12px; color: var(--green); background: #eaf3ed; border: 1px solid #cce0d2; font-size: 12px; font-weight: 800; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.member-page .account-card { border-radius: 4px; box-shadow: 0 8px 24px rgba(70, 53, 33, .05); }
.service-overview > strong { display: block; font-size: 20px; line-height: 1.4; }
.service-overview > p { color: var(--muted); line-height: 1.7; }
.primary-button.compact { width: auto; min-height: 42px; margin-top: 10px; padding: 0 18px; }
.feature-entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.feature-entry-grid > button, .feature-entry-grid > a { min-width: 0; min-height: 230px; padding: 24px; text-align: left; text-decoration: none; border: 1px solid var(--line); border-top: 5px solid var(--orange); border-radius: 4px; color: var(--ink); background: #fff; font: inherit; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.feature-entry-grid > :nth-child(2) { border-top-color: var(--green); }
.feature-entry-grid > :nth-child(3) { border-top-color: #d5a329; }
.feature-entry-grid > *:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(70, 53, 33, .1); }
.feature-entry-grid span, .feature-entry-grid strong, .feature-entry-grid em { display: block; }
.feature-entry-grid span { color: var(--orange-dark); font-size: 12px; font-weight: 900; }
.feature-entry-grid strong { margin-top: 20px; font-size: 20px; line-height: 1.4; }
.feature-entry-grid p { min-height: 68px; color: var(--muted); line-height: 1.65; }
.feature-entry-grid em { color: var(--green); font-size: 13px; font-style: normal; font-weight: 800; }
.care-form { display: grid; gap: 18px; }
.assessment-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.assessment-steps button { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #fff; font: inherit; text-align: left; cursor: pointer; }
.assessment-steps button strong, .assessment-steps button span { display: block; }
.assessment-steps button strong { color: var(--orange-dark); font-size: 13px; }
.assessment-steps button span { font-weight: 800; }
.assessment-steps button.is-active { border-color: var(--orange); background: #fff3e8; box-shadow: inset 4px 0 0 var(--orange); }
.assessment-steps button:disabled { opacity: .5; cursor: not-allowed; }
.detail-intro { margin-bottom: 18px; padding: 18px 20px; border-left: 4px solid var(--green); background: #edf5ef; }
.detail-intro strong { color: var(--green); font-size: 18px; }
.detail-intro p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.care-form fieldset { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.care-form legend { padding: 0 8px; color: var(--green); font-size: 18px; font-weight: 900; }
.form-grid-member { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid-member label { display: grid; gap: 8px; color: #3d473f; font-weight: 700; }
.form-grid-member input, .form-grid-member select, .form-grid-member textarea { width: 100%; min-width: 0; padding: 0 13px; border: 1px solid #d8cdbd; border-radius: 4px; color: var(--ink); background: #fff; font: inherit; outline: none; }
.form-grid-member input, .form-grid-member select { height: 48px; }
.form-grid-member textarea { padding-top: 12px; resize: vertical; line-height: 1.6; }
.form-grid-member input:focus, .form-grid-member select:focus, .form-grid-member textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 93, 36, .1); }
.wide-field { grid-column: 1 / -1; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.checkbox-grid label, .consent-check { display: flex; align-items: center; gap: 9px; }
.checkbox-grid label { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: #fffaf3; }
.checkbox-grid input, .consent-check input { width: 18px; height: 18px; accent-color: var(--orange); }
.consent-check { color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-submit { width: fit-content; min-width: 230px; margin-top: 2px; }
.care-result { margin-top: 28px; padding: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 16px 40px rgba(70, 53, 33, .08); }
.result-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.result-heading span { color: var(--muted); font-size: 13px; font-weight: 800; }
.result-heading h2 { margin: 6px 0; font-size: 29px; }
.result-heading p { margin: 0; color: var(--muted); }
.risk-score { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 30px; }
.health-level { padding: 12px 16px; color: #fff; font-size: 15px; }
.risk-low { background: var(--green); }
.risk-medium { background: #d38a19; }
.risk-high, .risk-critical { background: #bd3c2f; }
.score-row, .metric-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.metric-summary { grid-template-columns: repeat(4, 1fr); }
.score-row article, .metric-summary article { padding: 16px; background: #f8f4ec; border-left: 3px solid var(--green); }
.score-row span, .score-row strong, .metric-summary span, .metric-summary strong { display: block; }
.score-row span, .metric-summary span { color: var(--muted); font-size: 12px; }
.score-row strong { margin-top: 7px; font-size: 25px; }
.metric-summary strong { margin-top: 7px; font-size: 15px; line-height: 1.4; }
.result-block { margin-top: 22px; }
.result-block h3 { margin: 0 0 12px; font-size: 18px; }
.result-block ol, .result-block ul { margin: 0; padding-left: 22px; }
.result-block li { margin: 9px 0; line-height: 1.65; }
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.result-tags span { padding: 7px 10px; color: var(--orange-dark); background: #fff0e2; border: 1px solid #f0c9aa; font-size: 13px; font-weight: 800; }
.ai-advice { padding: 18px; border-left: 4px solid var(--green); background: #edf5ef; }
.ai-advice p { margin: 0; line-height: 1.8; }
.medical-note { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.detailed-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding: 18px 20px; border: 1px solid #f0c9aa; background: #fff7ef; }
.detailed-cta strong, .detailed-cta span { display: block; }
.detailed-cta strong { color: var(--orange-dark); }
.detailed-cta span { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.dimension-score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.dimension-score-grid article { padding: 16px; background: #f8f4ec; }
.dimension-score-grid span, .dimension-score-grid strong { display: block; }
.dimension-score-grid span { min-height: 36px; color: var(--muted); font-size: 12px; }
.dimension-score-grid strong { margin: 5px 0 10px; font-size: 25px; }
.dimension-score-grid article > div { height: 5px; overflow: hidden; background: #ded6ca; }
.dimension-score-grid i { display: block; height: 100%; background: var(--green); }
.family-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.family-actions a { min-height: 250px; padding: 30px; text-decoration: none; color: #fff; background: var(--green); }
.family-actions a:last-child { background: var(--orange-dark); }
.family-actions span, .family-actions strong { display: block; }
.family-actions span { opacity: .76; font-weight: 800; }
.family-actions strong { margin-top: 38px; font-size: 25px; }
.family-actions p { line-height: 1.7; opacity: .88; }

@media (max-width: 980px) {
  .member-app { grid-template-columns: 210px minmax(0, 1fr); }
  .member-content { padding: 36px 24px 60px; }
  .feature-entry-grid { grid-template-columns: 1fr 1fr; }
  .feature-entry-grid > :last-child { grid-column: 1 / -1; min-height: 180px; }
  .metric-summary { grid-template-columns: 1fr 1fr; }
  .dimension-score-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .member-page .member-header { height: auto; min-height: 66px; }
  .member-header-actions { gap: 12px; }
  .member-header-actions .back-link { display: none; }
  .member-app { display: block; min-height: auto; }
  .member-sidebar { padding: 14px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-identity { padding: 0 0 12px; }
  .member-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; overflow-x: auto; }
  .member-nav button { min-width: 86px; min-height: 58px; padding: 9px 5px; text-align: center; border-left: 0; border-bottom: 3px solid transparent; border-radius: 0; }
  .member-nav button.is-active { border-bottom-color: var(--orange); }
  .member-nav small { display: none; }
  .member-nav span { font-size: 13px; }
  .member-content { padding: 26px 16px 50px; }
  .member-page .account-heading h1, .section-heading-member h1 { font-size: 27px; }
  .section-heading-member { display: block; }
  .section-badge { display: inline-block; margin-top: 14px; }
  .overview-grid, .feature-entry-grid, .form-grid-member, .family-actions { grid-template-columns: 1fr; }
  .feature-entry-grid > :last-child { grid-column: auto; }
  .feature-entry-grid > button, .feature-entry-grid > a { min-height: 190px; }
  .feature-entry-grid p { min-height: auto; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .wide-field { grid-column: auto; }
  .form-submit { width: 100%; min-width: 0; }
  .care-result { padding: 22px 18px; }
  .result-heading { align-items: flex-start; }
  .risk-score { width: 68px; height: 68px; font-size: 24px; }
  .health-level { padding: 9px 10px; font-size: 12px; }
  .score-row, .metric-summary { grid-template-columns: 1fr 1fr; }
  .score-row article:last-child { grid-column: 1 / -1; }
  .assessment-steps { grid-template-columns: 1fr; }
  .detailed-cta { display: block; }
  .detailed-cta .primary-button { width: 100%; margin-top: 14px; }
}
