/* PaperKit 共享样式 —— 试卷答题页 / 成绩页 / 教师出题器通用（含 pk- 前缀） */

/* ---------- 答题与成绩（学生端 + 教师端结果预览） ---------- */
.pk-sec {
  background: rgba(13, 20, 38, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 20px 20px 16px;
  margin-bottom: 16px;
}
.pk-sec-title {
  font-size: 16px; font-weight: 700; color: #ffffff;
  margin-bottom: 12px; line-height: 1.5;
}
.pk-sec-score { color: #38bdf8; font-size: 14px; font-weight: 700; }
.pk-audio { width: 100%; margin-bottom: 6px; }
.pk-item { padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.10); }
.pk-item:last-child { border-bottom: none; }
.pk-stem { font-size: 15px; color: #e2e8f0; line-height: 1.8; white-space: pre-wrap; }
.pk-zh { font-size: 14px; color: #7dd3fc; line-height: 1.8; }
.pk-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pk-opt {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14.5px; color: #e2e8f0; line-height: 1.7;
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.pk-opt:hover { background: rgba(56, 189, 248, 0.08); }
.pk-opt input { accent-color: #38bdf8; margin-right: 2px; }
.pk-input {
  width: 100%; box-sizing: border-box; margin-top: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px; color: #f8fafc; font-size: 15px;
  padding: 9px 12px; outline: none; font-family: inherit;
}
.pk-input:focus { border-color: rgba(56, 189, 248, 0.65); }
.pk-passage {
  font-size: 14.5px; color: #e2e8f0; line-height: 2;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(56, 189, 248, 0.5);
  border-radius: 8px; padding: 12px 14px; margin: 6px 0 10px;
  white-space: pre-wrap; word-break: break-word;
}
.pk-optlist { margin: 6px 0 10px; }
.pk-opt-item { font-size: 14px; color: #cbd5e1; line-height: 1.9; }
.pk-slots { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 6px; }
.pk-slot { font-size: 14px; color: #cbd5e1; display: inline-flex; align-items: center; gap: 6px; }
.pk-slot select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px; color: #f8fafc; font-size: 14px;
  padding: 5px 8px; outline: none; font-family: inherit;
}
.pk-prompt { font-size: 15px; color: #e2e8f0; line-height: 1.9; white-space: pre-wrap; }
.pk-points { margin: 8px 0; font-size: 14px; color: #cbd5e1; line-height: 1.9; }
.pk-tip { font-size: 12.5px; color: #94a3b8; line-height: 1.8; margin-top: 6px; }
.pk-allright { color: #4ade80; }
.pk-essay {
  width: 100%; box-sizing: border-box; min-height: 160px; resize: vertical;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px; color: #f8fafc; font-size: 15px;
  padding: 12px 14px; outline: none; font-family: inherit;
  line-height: 1.9; margin-top: 8px;
}
.pk-essay:focus { border-color: rgba(56, 189, 248, 0.65); }
.pk-wordcount { text-align: right; font-size: 12.5px; color: #94a3b8; margin-top: 4px; }
.pk-wrong {
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0;
  font-size: 14px; color: #e2e8f0; line-height: 1.9;
}
.pk-wrong-head { font-weight: 600; color: #ffffff; }
.pk-bad { color: #f87171; font-weight: 600; }
.pk-good { color: #4ade80; font-weight: 600; }
/* 完整答题明细（2026-10-16）：逐题行——题号 / 题干 / 对错 / 你的答案 / 正确答案 / 解析 */
.pk-anslist { margin: 8px 0 2px; }
.pk-ansline {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid rgba(248, 113, 113, 0.55);
  border-radius: 8px; padding: 6px 10px; margin: 6px 0;
  font-size: 13.5px; color: #cbd5e1; line-height: 1.7;
}
.pk-ansline.ok { border-left-color: rgba(74, 222, 128, 0.55); }
.pk-ans-no { color: #94a3b8; min-width: 1.4em; }
.pk-ans-stem { color: #e2e8f0; }
.pk-ans-tag {
  font-size: 12px; padding: 0 6px; border-radius: 6px; line-height: 1.6;
}
.pk-ans-tag.ok { color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.pk-ans-tag.bad { color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.pk-ans-user { color: #f87171; }
.pk-ans-user.ok { color: #4ade80; }
.pk-ans-right { color: #4ade80; }
.pk-ans-explain { color: #94a3b8; flex-basis: 100%; font-size: 12.5px; }
.pk-grade {
  margin-top: 8px; font-size: 14px; color: #e2e8f0; line-height: 1.9;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 10px; padding: 10px 12px;
}
.pk-grade-comment { color: #cbd5e1; margin-top: 4px; white-space: pre-wrap; }
.pk-answer-text {
  font-size: 14px; color: #e2e8f0; line-height: 1.9; white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px; padding: 10px 12px; margin-top: 8px;
}
.pk-result-sec { margin-bottom: 14px; }

/* ---------- 单词默写块（混合作业：默写 + 试卷） ---------- */
.pk-dict-item { display: flex; align-items: center; gap: 10px; }
.pk-dict-no { color: #38bdf8; font-weight: 700; font-size: 14px; min-width: 22px; }
.pk-dict-play {
  border: 1px solid rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.12);
  color: #38bdf8; font-size: 13.5px; border-radius: 999px; padding: 7px 14px;
  cursor: pointer; font-family: inherit; transition: all .2s ease; white-space: nowrap;
}
.pk-dict-play:hover { background: rgba(56, 189, 248, 0.22); }
.pk-dict-play:active { transform: scale(0.96); }
.pk-dict-input {
  flex: 1; min-width: 0; box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px; color: #f8fafc; font-size: 15px;
  padding: 9px 12px; outline: none; font-family: inherit;
}
.pk-dict-input:focus { border-color: rgba(56, 189, 248, 0.65); }

/* ---------- 教师出题器 ---------- */
.pk-ed-sec { border: 1px solid rgba(255,255,255,0.18); border-radius: 14px; padding: 14px; margin-bottom: 14px; background: rgba(255,255,255,0.03); }
.pk-ed-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pk-ed-title {
  flex: 1; min-width: 160px; box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px; color: #ffffff; font-size: 15px; font-weight: 700;
  padding: 9px 12px; outline: none; font-family: inherit;
}
.pk-ed-sub { font-size: 12.5px; color: #94a3b8; line-height: 1.8; margin: 6px 0; }
.pk-ed-q {
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; background: rgba(13, 20, 38, 0.5);
}
.pk-ed-qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pk-ed-qno { color: #38bdf8; font-weight: 700; font-size: 14px; }
.pk-ed-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.pk-ed-row .pk-ed-opt {
  flex: 1; box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px; color: #f8fafc; font-size: 14px;
  padding: 7px 10px; outline: none; font-family: inherit;
}
.pk-ed-row .pk-ed-opt:focus { border-color: rgba(56, 189, 248, 0.65); }
.pk-ed-optletter { color: #94a3b8; font-size: 13.5px; padding-top: 8px; width: 16px; }
textarea.pk-ed-area {
  width: 100%; box-sizing: border-box; min-height: 60px; resize: vertical;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px; color: #f8fafc; font-size: 14px;
  padding: 9px 12px; outline: none; font-family: inherit;
  line-height: 1.8;
}
textarea.pk-ed-area:focus { border-color: rgba(56, 189, 248, 0.65); }
/* 富文本输入区（2026-10-18）：题干/文章/作文要求可在光标处插入图表 */
.pk-ed-rich {
  width: 100%; box-sizing: border-box; min-height: 60px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px; color: #f8fafc; font-size: 14px;
  padding: 9px 12px; outline: none; font-family: inherit;
  line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}
.pk-ed-rich:focus { border-color: rgba(56, 189, 248, 0.65); }
.pk-ed-rich:empty::before {
  content: attr(data-ph); color: #64748b; pointer-events: none;
}
.pk-ed-rich .pk-ed-fig {
  display: inline-block; max-width: 100%; height: auto;
  margin: 8px 4px; border-radius: 8px; vertical-align: middle;
  cursor: pointer; border: 2px solid transparent;
}
.pk-ed-rich .pk-ed-fig:hover { border-color: rgba(56, 189, 248, 0.5); }
.pk-ed-rich .pk-ed-fig.sel {
  border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}
.pk-ed-figbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 8px 0; padding: 9px 12px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(13, 20, 38, 0.94);
  border-radius: 10px; font-size: 13px; color: #cbd5e1;
  position: sticky; top: 8px; z-index: 30;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
}
.pk-ed-figbar input[type="range"] { width: 180px; accent-color: #38bdf8; }
.pk-ed-figtool { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 10px; }
/* 学生作答 / 成绩页中的图表 */
.pk-fig {
  display: inline-block; max-width: 100%; height: auto;
  margin: 8px 4px; border-radius: 6px; vertical-align: middle;
}
select.pk-ed-ans {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px; color: #f8fdfc; font-size: 14px;
  padding: 7px 10px; outline: none; font-family: inherit;
}
.pk-ed-btn {
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0; font-size: 13px; border-radius: 9px; padding: 7px 12px;
  cursor: pointer; font-family: inherit; transition: all .2s; white-space: nowrap;
}
.pk-ed-btn:hover { border-color: rgba(56, 189, 248, 0.6); color: #7dd3fc; }
.pk-ed-btn.mini { padding: 4px 9px; font-size: 12.5px; border-radius: 8px; }
.pk-ed-btn.danger { border-color: rgba(248, 113, 113, 0.5); color: #f87171; }
.pk-ed-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.pk-ed-preview { border: 1px dashed rgba(255,255,255,0.2); border-radius: 12px; padding: 12px; margin-top: 8px; }
.pk-ed-errors { color: #f87171; font-size: 13px; line-height: 1.9; margin-top: 6px; }
.pk-ed-audio { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }

/* ---- 移动端：编辑器与预览区不横向溢出（2026-11-04） ---- */
@media (max-width: 560px) {
  .pk-ed-audio .pk-ed-btn { white-space: normal; text-align: left; line-height: 1.5; width: 100%; }
  .pk-ed-row { flex-wrap: wrap; }
  .pk-ed-row > * { min-width: 0; }
  .pk-ed-preview { overflow-x: auto; }
}
