/* ===== 问卷页样式（复刻原站结构，蓝色主题）===== */

.form-card { padding: 22px 14px 22px; }

.page-title { margin-top: 4px; }
.page-subtitle { margin-bottom: 16px; }

/* ===== 题目区块 ===== */
.q-wrap {
  padding: 0 2px;
  margin-bottom: 13px;
}

.label-line {
  display: flex;
  align-items: flex-start;
}

.label {
  width: 128px;
  flex: none;
  font-size: 16px;
  color: var(--text-main);
  line-height: 40px;
  padding-top: 0;
}

#q5 .label { line-height: 40px; }

.require {
  color: var(--require);
  margin-right: 6px;
}

/* 输入域（占 label 右侧） */
.input-area, .radio-area {
  flex: 1;
  min-width: 0;
}

/* ===== 输入框 ===== */
.q-input {
  display: block;
  width: 100%;
  height: 40px;
  line-height: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 11px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  vertical-align: middle;
}
.q-input::placeholder { color: rgba(0,0,0,.25); }
.q-input:focus { border-color: var(--brand); }

/* ===== 单选 ===== */
.radio-area.col { display: flex; flex-direction: column; }

.radio-line {
  display: flex;
  align-items: center;
  min-height: 38px;
  cursor: pointer;
}

.radio {
  flex: none;
  width: 19.5px;
  height: 19.5px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: border-color .15s;
}

.radio .pointer {
  display: none;
  width: 10px;
  height: 10px;
  background: var(--brand);
  border-radius: 50%;
}

.radio-line.selected .radio { border-color: var(--brand); }
.radio-line.selected .radio .pointer { display: block; }
.radio-line.selected .radio-text { color: var(--brand); }

.radio-text {
  font-size: 16px;
  color: var(--text-desc);
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}

/* ===== 下拉选择 ===== */
.select-box {
  position: relative;
  width: 100%;
  height: 40px;
  line-height: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 30px 0 11px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.select-box.chosen .select-text { color: var(--text-main); }

.select-text {
  font-size: 15px;
  color: rgba(0,0,0,.25);
}

.down-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(0,0,0,.3);
  border-bottom: 2px solid rgba(0,0,0,.3);
  transform-origin: center;
  rotate: 45deg;
  pointer-events: none;
}

/* 选项组较长（如第4题）时，题干与选项组整体垂直居中 */
#q4 .label-line { align-items: center; }
#q4 .label { line-height: 1.6; padding-top: 0; }

/* ===== 校验错误提示 ===== */
.valid-msg {
  height: 22px;
  font-size: 14px;
  color: var(--require);
  line-height: 22px;
  padding-left: 128px;
  visibility: hidden;
}
.valid-msg.show { visibility: visible; }

/* ===== 必看提示 ===== */
.must-see {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  padding: 10px 12px;
  background: var(--brand-light);
  border-radius: 6px;
  margin-top: 4px;
}

/* 底部固定提交栏预留空间 */
.page { padding-bottom: 92px; }

/* ===== 底部提交按钮 ===== */
.submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 -1px 16px rgba(0,0,0,.04);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}

.submit-btn {
  width: calc(100% - 36px);
  max-width: 714px;
  height: 47px;
  line-height: 47px;
  margin: 0 auto;
  background: var(--brand);
  border-radius: var(--btn-radius);
  font-size: 17px;
  font-weight: 500;
  font-family: PingFangSC-Medium, "PingFang SC", sans-serif;
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
}
.submit-btn:active { background: var(--brand-deep); }

/* ===== 第5题底部选择面板 ===== */
.shadow {
  display: none;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0,0,0,.4);
  z-index: 100;
  flex-direction: column;
  justify-content: flex-end;
}
.shadow.show { display: flex; }

.select-panel {
  width: 100%;
  max-height: 50%;
  overflow-y: auto;
  border-radius: 8px 8px 0 0;
  background: #fff;
  padding-bottom: 17px;
}

.select-panel .panel-li {
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  cursor: pointer;
}
.select-panel .panel-li.selected { color: var(--brand); font-weight: 500; }

/* ===== 提交中遮罩 ===== */
.loading-mask {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.loading-mask.show { display: flex; }

.loading-box {
  background: rgba(0,0,0,.75);
  border-radius: 10px;
  padding: 24px 30px;
  text-align: center;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { color: #fff; font-size: 14px; }
