@charset "UTF-8";
:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2329;
  background: #f5f6f7;
  font-synthesis: none;
  --blue: #3370ff;
  --line: #dee0e3;
  --muted: #646a73;
  --red: #d83931;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 32px 20px; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #92b2ff;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 48px 28px;
  background: #fff;
  border-top: 4px solid var(--blue);
  border-radius: 6px;
  outline: none;
}
h1 { margin: 0 0 16px; font-size: 26px; line-height: 1.5; font-weight: 600; }
.page-intro { padding-bottom: 24px; border-bottom: 1px solid #eff0f1; margin-bottom: 28px; }
.page-intro p, .result-description { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.page-intro .form-note { font-size: 12px; color: #8f959e; margin-top: 14px; }
.required { color: var(--red); font-size: 13px; margin-left: 5px; }
.form-note .required { margin-left: 0; }
.question-card { margin-bottom: 32px; }
.question-head { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 13px; }
.question-number { flex-shrink: 0; font-size: 15px; line-height: 1.8; font-weight: 500; }
.question-heading { flex: 1; min-width: 0; }
.question-heading h2 { margin: 0; font-size: 15px; line-height: 1.8; font-weight: 500; }
.question-kind { margin-left: 8px; font-size: 12px; font-weight: 400; color: #8f959e; white-space: nowrap; }
.question-hint { margin: 5px 0 0; font-size: 12px; line-height: 1.8; color: #8f959e; white-space: pre-line; }
.privacy-details { font-size: 12px; color: var(--muted); line-height: 1.8; }
.privacy-details > summary { color: var(--blue); cursor: pointer; width: fit-content; }
.privacy-content { padding-top: 10px; }
.privacy-content h3 { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.privacy-content p { margin: 6px 0; }
.privacy-content ul { padding-left: 18px; margin: 8px 0; }
.draft-notice { margin-top: 12px; color: #8f959e; font-size: 12px; line-height: 1.8; }
.consent-option { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 13px; line-height: 1.8; cursor: pointer; }
.consent-option input { flex-shrink: 0; width: 16px; height: 16px; margin: 4px 0 0; accent-color: var(--blue); }
.option-grid { display: grid; gap: 3px; }
.option-label { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; line-height: 1.6; cursor: pointer; width: fit-content; max-width: 100%; }
.option-label input { margin: 0; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--blue); }
.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.text-input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2329;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.text-input:hover, select:hover, textarea:hover { border-color: #b4b8be; }
.text-input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; }
.text-input::placeholder, textarea::placeholder { color: #b4b8be; font-size: 13px; }
.text-input[readonly] { background: #f5f6f7; color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.region-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-caption { color: #8f959e; font-size: 11px; line-height: 1.8; margin: 8px 0 0; }
.subfield { margin-top: 14px; }
.date-picker { display: flex; align-items: stretch; width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.date-picker:hover { border-color: #b4b8be; }
.date-picker:focus-within { border-color: var(--blue); }
.date-part { flex: 1 1 0; min-width: 0; display: flex; }
.date-part + .date-part { border-left: 1px solid #eff0f1; }
.date-part select { width: 100%; min-width: 0; padding: 10px 10px; border: 0; border-radius: 0; background: transparent; color: #1f2329; font-size: 14px; line-height: 1.6; cursor: pointer; }
.date-part select:focus, .date-part select:focus-visible { outline: none; }
.date-part select.is-empty { color: #8f959e; }
.age-field { max-width: 250px; }
.age-field-wrap { position: relative; }
.age-field-wrap input { padding-right: 36px; }
.age-field-wrap > span { position: absolute; right: 12px; top: 12px; color: #8f959e; font-size: 12px; }
.matrix { display: grid; gap: 10px; }
.matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; gap: 8px; align-items: center; font-size: 14px; }
.child-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 30px; gap: 10px; align-items: center; margin-bottom: 10px; }
.child-index { color: #8f959e; font-size: 13px; }
.icon-button { width: 30px; height: 34px; border: 0; border-radius: 4px; color: var(--muted); background: #f5f6f7; font-size: 20px; }
.add-button { border: 0; color: var(--blue); background: transparent; font-size: 13px; padding: 8px 0; }
.rank-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rank-number { width: 22px; flex-shrink: 0; color: #8f959e; font-size: 13px; }
.selection-count { margin-left: 10px; color: #8f959e; font-size: 12px; font-weight: 400; white-space: nowrap; }
.error-message { margin: 9px 0 0; color: var(--red); font-size: 12px; line-height: 1.8; }
.has-error .text-input, .has-error select, .has-error textarea { border-color: #f2a29e; }
.has-error .date-picker { border-color: #f2a29e; }
.has-error .question-number { color: var(--red); }
.form-actions { padding-top: 8px; display: flex; justify-content: center; }
.submit-error { margin: 12px 0 0; padding: 12px 16px; background: #fef0f0; border-radius: 4px; color: var(--red); font-size: 13px; line-height: 1.8; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; border-radius: 4px; padding: 9px 22px; font-size: 14px; line-height: 1.5; }
.button-primary { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.button-primary:hover { background: #245bdb; border-color: #245bdb; }
.button-outline { border: 1px solid var(--line); background: #fff; color: #1f2329; }
.button-outline:hover { background: #f5f6f7; }
.button-quiet { border: 0; background: transparent; color: var(--blue); padding-left: 0; padding-right: 0; }
#submit-button { min-width: 148px; }
.bottom-note { font-size: 11px; color: #8f959e; line-height: 1.8; margin: 18px 0 0; text-align: center; }
#result-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 136px); text-align: center; }
.success-mark { margin-bottom: 26px; }
#result-view h1 { margin: 0 0 10px; font-size: 24px; }
#result-view .result-description { margin: 0 0 30px; }
.result-again { min-width: 140px; }
.local-notice { margin: 24px 0; padding: 16px; background: #f0f4ff; border-radius: 4px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.local-notice strong { font-weight: 500; color: #245bdb; }
.local-notice p { margin: 6px 0 0; }
.result-stats { display: flex; flex-wrap: wrap; gap: 32px; margin: 24px 0; }
.result-stats strong { display: block; font-size: 18px; font-weight: 500; }
.result-stats span { display: block; font-size: 12px; margin-top: 5px; color: #8f959e; }
.result-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.answer-preview { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.answer-preview summary { font-size: 14px; cursor: pointer; }
.answer-preview dt { font-size: 12px; color: var(--muted); margin-top: 20px; line-height: 1.8; }
.answer-preview dd { font-size: 14px; line-height: 1.8; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reset-button { margin-top: 20px; }
.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; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 90vw; padding: 12px 18px; background: #1f2329; color: #fff; border-radius: 4px; font-size: 13px; line-height: 1.8; z-index: 10; }
@media (max-width: 600px) {
  body { padding: 0; background: #fff; }
  main { padding: 24px 20px; border-top-width: 3px; border-radius: 0; }
  h1 { font-size: 22px; }
  .page-intro p { font-size: 13px; }
  .page-intro { margin-bottom: 24px; padding-bottom: 20px; }
  .question-card { margin-bottom: 28px; }
  .question-heading h2, .question-number { font-size: 14px; }
  .region-fields, .field-row { grid-template-columns: 1fr; }
  .date-picker { max-width: none; }
  .date-part select { padding: 10px 8px; font-size: 15px; }
  .text-input, select, textarea { font-size: 16px; }
  .matrix-row { grid-template-columns: minmax(0, 1fr) 68px 68px; }
  .child-row { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 6px; }
  .child-row select, .child-row input { padding: 10px 8px; font-size: 14px; }
  .icon-button { width: 28px; }
  .bottom-note { font-size: 10px; }
  .result-stats { gap: 24px; }
  #result-view { min-height: calc(100vh - 48px); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  body { padding: 0; background: #fff; }
  main { max-width: none; padding: 0; border: 0; }
  #survey-view, .result-actions, .reset-button, .local-notice { display: none !important; }
  .answer-preview dt { break-after: avoid; }
  .answer-preview dd { break-inside: avoid; }
}
