:root {
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172033;
  background: #f4f6fa;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f4f6fa; }
.shell { width: min(980px, calc(100% - 28px)); margin: 36px auto 72px; }
.card { background: #fff; border: 1px solid #e4e8f0; border-radius: 18px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 12px 34px rgba(20,31,55,.07); }
.page { display: none; }
.page.active { display: block; }
h1,h2,h3 { line-height: 1.25; color: #111827; }
h1 { font-size: clamp(28px, 4vw, 42px); margin: 6px 0 18px; }
h2 { font-size: clamp(23px, 3vw, 32px); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: #5b6476; text-transform: uppercase; }
.notice { background: #f0f4ff; border: 1px solid #d9e2ff; border-radius: 12px; padding: 14px 16px; margin: 22px 0; }
.notice.soft { background: #f8fafc; border-color: #e6e9ef; }
.notice p { margin: 5px 0 0; }
.reference-wrap, .video-stage { width: 100%; background: #0d1117; border-radius: 14px; overflow: hidden; }
video { width: 100%; display: block; max-height: 560px; background: #000; }
.emotion-legend { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; background: #fff; border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 12px 12px; font-size: 14px; font-weight: 700; text-align: center; }
.emotion-legend span { padding: 6px 2px; background: #f7f8fb; border-radius: 7px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 16px; }
input[type="checkbox"], input[type="radio"] { accent-color: #2563eb; }
button { border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 800; cursor: pointer; }
button.primary { background: #1d4ed8; color: white; }
button.primary:disabled { opacity: .42; cursor: not-allowed; }
.form-stack { display: grid; gap: 22px; }
fieldset { border: 1px solid #e2e6ee; border-radius: 12px; padding: 18px; margin: 0; }
legend { padding: 0 7px; font-weight: 800; }
input[type="text"], input[type="number"], textarea { width: 100%; border: 1px solid #cfd5df; border-radius: 9px; padding: 11px 12px; font: inherit; }
textarea { resize: vertical; }
.age-row { display: flex; align-items: center; gap: 10px; max-width: 220px; }
.radio-list { display: grid; gap: 10px; }
.radio-list.inline { display: flex; flex-wrap: wrap; gap: 24px; }
.radio-list label, .scale-option { cursor: pointer; }
.scale-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale-option { border: 1px solid #d8dde7; border-radius: 9px; padding: 10px 7px; text-align: center; min-height: 70px; display: flex; flex-direction: column; justify-content: center; }
.scale-option span { display: block; font-size: 12px; color: #606a7c; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; color: #4b5563; }
.progress-track { height: 8px; background: #e8ecf3; border-radius: 99px; overflow: hidden; margin: 9px 0 26px; }
#progressBar { height: 100%; width: 0; background: #2563eb; transition: width .25s; }
.pair-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; font-size: 18px; font-weight: 900; margin: 12px 0 8px; }
.pair-labels span { background: #eef2ff; padding: 8px; border-radius: 9px; }
.hidden { display: none !important; }
.hint { color: #687386; font-size: 14px; }
.hint.strong { color: #27364e; font-weight: 800; }
.question { border: 1px solid #e2e6ee; border-radius: 12px; padding: 16px; }
.question-title { font-weight: 800; margin-bottom: 10px; }
.seven-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.seven-scale label { border: 1px solid #d7dce6; border-radius: 9px; padding: 8px 4px; text-align: center; cursor: pointer; font-size: 13px; }
.seven-scale input { display: block; margin: 0 auto 5px; }
.scale-anchors { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: #687386; margin-top: 7px; }
.emotion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emotion-grid label { border: 1px solid #d7dce6; border-radius: 9px; padding: 9px; cursor: pointer; }
.actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.qr-preview { margin-top: 14px; border: 1px dashed #cbd2df; border-radius: 12px; padding: 14px; background: #fafbfc; }
.qr-preview img { display: block; max-width: min(360px, 100%); max-height: 420px; margin: auto; object-fit: contain; }
.status { min-height: 24px; font-weight: 700; }
.status.error { color: #b42318; }
.status.ok { color: #087a45; }
.center { text-align: center; }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: #e9f8ef; color: #087a45; font-size: 34px; font-weight: 900; }
@media (max-width: 700px) {
  .emotion-legend { grid-template-columns: repeat(4, 1fr); }
  .scale-grid { grid-template-columns: 1fr; }
  .seven-scale { grid-template-columns: repeat(4, 1fr); }
  .emotion-grid { grid-template-columns: repeat(2, 1fr); }
}
.emotion-reference-image {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 16px auto 10px;
  border-radius: 10px;
}
