:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: #1d2a31;
  background: #f3f7f8;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f7f8; }
.environment-banner { padding: 6px 12px; color: #fff; background: #7a3e00; text-align: center; font-weight: 700; letter-spacing: .04em; }
.page { width: min(100%, 640px); margin: 0 auto; padding: 24px 16px 48px; }
h1 { margin: 0 0 24px; font-size: 1.75rem; line-height: 1.3; }
h2 { margin: 0 0 16px; font-size: 1.25rem; }
.card, .visit-card { background: #fff; border: 1px solid #dce6e9; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.entry-card { margin-top: 10vh; }
.field { margin-bottom: 20px; }
.field label, .readonly-field span { display: block; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px; font: inherit; border: 1px solid #9dafb6; border-radius: 8px; background: #fff; }
.primary-button, .secondary-button { min-height: 50px; padding: 12px 20px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.primary-button { width: 100%; border: 0; color: #fff; background: #176b72; }
.secondary-button { border: 1px solid #789096; color: #24383e; background: #fff; }
.compact { min-height: 42px; padding: 8px 16px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-header h1 { margin: 0; }
.questionnaire-list { border-top: 1px solid #e6edef; }
.questionnaire-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; color: inherit; text-decoration: none; border-bottom: 1px solid #e6edef; }
.status { font-weight: 700; }
.status-pending { color: #9a5b00; }
.status-completed { color: #237348; }
.status-closed, .muted { color: #65757b; }
.readonly-field { padding: 12px; margin-bottom: 20px; background: #f5f8f9; border-radius: 8px; }
.readonly-field strong { overflow-wrap: anywhere; }
.error { color: #a52727; margin: 6px 0 0; }
.message { padding: 12px; margin-bottom: 16px; background: #fff4d6; border-radius: 8px; }
.success-message { padding: 14px; color: #185d3a; background: #e7f6ed; border-radius: 8px; font-weight: 700; }
.text-link { display: inline-block; margin-top: 20px; color: #176b72; }
.link-button { display: block; margin-top: 24px; text-align: center; text-decoration: none; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #69aab0; outline-offset: 2px; }
.questionnaire-header { margin-bottom: 24px; }
.questionnaire-header h1 { margin-top: 18px; margin-bottom: 10px; }
.question-section { margin-bottom: 22px; padding: 20px; background: #fff; border: 1px solid #dce6e9; border-radius: 12px; }
.question-section > h2 { padding-bottom: 10px; border-bottom: 2px solid #dce6e9; }
.question-block { padding: 20px 0; border-bottom: 1px solid #e5ecee; }
.question-block:last-child { border-bottom: 0; }
.question-block[hidden] { display: none; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 12px; font-size: 1.08rem; font-weight: 700; line-height: 1.55; }
.required-marker { color: #a94442; }
.choice-row { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 8px 0; padding: 10px 12px; border: 1px solid #cad6d9; border-radius: 8px; cursor: pointer; }
.choice-row input { width: 22px; height: 22px; flex: 0 0 auto; }
.answer-input { width: 100%; min-height: 50px; padding: 12px; border: 1px solid #9dafb6; border-radius: 8px; font: inherit; }
.duration-input { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duration-input label { font-weight: 600; }
.duration-input input { display: block; width: 100%; min-height: 50px; margin-top: 7px; padding: 10px; font: inherit; }
.slider-labels { display: flex; justify-content: space-between; margin-bottom: 8px; }.slider-labels output { font-weight: 700; }
.slider-input { width: 100%; min-height: 44px; }
.matrix-row { margin: 14px 0; padding: 14px; background: #f6f9fa; border-radius: 8px; }.matrix-row > strong { display: block; margin-bottom: 10px; }
.question-help { color: #65757b; }.answer-errors { color: #a52727; }.display-text { line-height: 1.7; }
.submit-button { margin-top: 10px; }
.matrix-mobile { min-width: 0; }.matrix-row { overflow-wrap: anywhere; }.matrix-row .choice-row { width: 100%; }
@media (max-width: 420px) { .duration-input { grid-template-columns: 1fr; }.page { padding: 18px 12px 36px; }.card,.visit-card,.question-section { padding: 16px; }.question-block { padding: 16px 0; }.primary-button,.secondary-button { font-size: 1rem; }.submit-button { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); box-shadow: 0 3px 16px rgba(0,0,0,.2); } }

body { line-height: 1.65; background: #f4f8f7; }
h1 { letter-spacing: -.02em; }
.page { padding-top: 28px; }
.card, .visit-card, .question-section { border-color: #e1eae7; border-radius: 18px; }
.entry-card { margin-top: 5vh; padding: 32px 28px; box-shadow: 0 12px 40px #173d3210; }
.entry-card h1 { margin-bottom: 12px; }
.entry-symbol, .success-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 24px; border-radius: 16px; background: #e5f3ee; color: #19735d; font-size: 30px; font-weight: 500; }
.eyebrow { color: #19735d; font-size: .8rem; font-weight: 700; letter-spacing: .13em; margin: 0 0 10px; }
.entry-intro { color: #61736e; margin: 0 0 28px; }
.entry-note { color: #78847f; font-size: .8rem; margin: 22px 0 0; }
.steps { display: flex; justify-content: space-around; color: #687e75; font-size: .75rem; padding: 10px 0; gap: 8px; }
.site-footer { text-align: center; color: #7d8d86; font-size: .75rem; padding: 0 16px max(24px, env(safe-area-inset-bottom)); }
.consent-field { margin: 24px 0; }
.consent-field label { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.consent-field input { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 3px; accent-color: #176b72; }
.privacy-notice { background: #f5f8f7; padding: 14px 16px; border-radius: 10px; font-size: .88rem; overflow-wrap: anywhere; }
.privacy-notice summary { font-weight: 600; cursor: pointer; }
.privacy-notice div { margin-top: 12px; max-height: 360px; overflow: auto; }
.completion-card { margin-top: 6vh; text-align: center; padding: 32px 24px; }
.completion-card .success-icon { margin: 0 auto 20px; border-radius: 50%; width: 68px; height: 68px; }
.fill-progress { position: sticky; top: 0; z-index: 5; background: #f4f8f7f7; padding: 10px 0 12px; margin-bottom: 16px; backdrop-filter: blur(8px); }
.fill-progress > div { display: flex; justify-content: space-between; font-size: .8rem; color: #61736e; }
.fill-progress progress { width: 100%; height: 6px; display: block; margin-top: 7px; border: 0; border-radius: 8px; overflow: hidden; accent-color: #176b72; }
.fill-progress progress::-webkit-progress-bar { background: #dfeae6; }
.fill-progress progress::-webkit-progress-value { background: #176b72; }
.question-block { scroll-margin-top: 95px; }
.question-block.invalid { border-left: 3px solid #b44539; padding-left: 12px; }
.choice-row:has(input:checked) { background: #eaf5f0; border-color: #458b78; }
.choice-row input { accent-color: #176b72; }
button[disabled] { opacity: .65; cursor: wait; }
.errorlist { color: #a52727; padding-left: 20px; }
[hidden] { display: none !important; }
.status { flex-shrink: 0; font-size: .88rem; }
.submit-note { color: #78847f; font-size: .8rem; text-align: center; }
.submit-button { position: static; box-shadow: none; }

.portal-card { margin-top: 8vh; padding: 32px 28px; }
.portal-card h1 { margin-bottom: 10px; }
.portal-actions { display: grid; gap: 14px; margin-top: 28px; }
.portal-button { display: block; padding: 18px; border-radius: 12px; text-decoration: none; }
.portal-button strong, .portal-button span { display: block; }
.portal-button span { margin-top: 4px; font-size: .88rem; }
.portal-button.primary { color: #fff; background: #176b72; }
.portal-button.primary span { color: #d8eeea; }
.portal-button.secondary { color: #24383e; background: #fff; border: 1px solid #9dafb6; }
.portal-button.secondary span { color: #65757b; }

