/* 试卷内容公共展示样式：试卷详情页和试卷编辑器共用 */

.paper-sheet {
  position: relative;
  width: 860px;
  min-height: 1180px;
  margin: 0 auto;
  padding: 42px 0 56px;
  --paper-body-x-padding: 46px;
  --paper-layout-min-height: 1082px;
  background: #fff;
  color: #111827;
  border-radius: 16px;
  border: 1px solid #edf1f7;
  box-shadow: none;
}

.paper-sheet.paper-sheet-b5 {
  width: 760px;
  min-height: 1050px;
  padding: 38px 0 50px;
  --paper-body-x-padding: 42px;
  --paper-layout-min-height: 962px;
}

.paper-layout {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: var(--paper-layout-min-height);
}

.paper-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 var(--paper-body-x-padding);
}

.paper-sheet.has-special-seal .paper-body {
  padding-left: var(--seal-content-gap, 42px);
}

.paper-sheet.with-seal {
  padding-left: 78px;
}

.seal-line {
  display: none;
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 38px;
  border-left: 1px dashed #94a3b8;
}

.paper-sheet.with-seal .seal-line {
  display: block;
}

.seal-line span {
  position: absolute;
  left: -23px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  letter-spacing: 5px;
  color: #64748b;
  font-size: 12px;
}

.special-seal-line {
  position: relative;
  flex: 0 0 var(--seal-width, 56px);
  width: var(--seal-width, 56px);
  min-height: 100%;
  z-index: 16;
  border-right: 1px dashed #111827;
}

.special-seal-rule {
  display: none;
}

.seal-virtual-page {
  position: absolute;
  right: -16px;
  width: 32px;
  pointer-events: none;
}

.seal-virtual-char {
  position: absolute;
  left: 50%;
  display: inline-block;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  color: #111827;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.seal-student-info {
  position: absolute;
  right: 30px;
  left: auto;
  top: 0;
  width: auto;
  min-width: 150px;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 6px;
  transform: translate(50%, -50%) rotate(-90deg);
  transform-origin: center;
  color: #111827;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  white-space: nowrap;
  outline: none;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.text-block {
  position: relative;
}

.custom-text-block {
  color: #334155;
  line-height: 1.75;
}

.paper-title {
  margin: 0;
  text-align: center;
  font-size: 25px;
  line-height: 1.45;
  font-weight: 900;
}

.paper-subtitle {
  margin-top: 6px;
  text-align: center;
  color: #475569;
  line-height: 1.7;
}

.paper-meta-line {
  margin: 13px auto 0;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  text-align: center;
  line-height: 1.8;
  font-size: 13px;
}

.student-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 18px;
  margin-top: 11px;
  font-size: 13px;
  line-height: 1.8;
}

.score-table {
  width: 285px;
  margin: 12px auto 0;
  border-collapse: collapse;
  font-size: 12px;
  color: #334155;
}

.score-table td {
  height: 28px;
  border: 1px solid #d6dde8;
  text-align: center;
}

.notice-box {
  margin-top: 18px;
  padding: 0 2px;
  border-radius: 8px;
  border-left: 0;
  background: transparent;
  color: #334155;
  line-height: 1.75;
  font-size: 13px;
}

.paper-section {
  margin-top: 34px;
}

.paper-section-head {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-bottom: 14px;
}

.paper-section-title {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 900;
}

.paper-section-desc {
  color: #333;
  font-size: 13px;
}

.paper-question {
  position: relative;
  margin-top: 14px;
  padding: 13px 14px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.paper-question-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.question-content {
  color: #1f2937;
  line-height: 1.9;
  font-size: 14px;
}

.question-no {
  font-weight: 900;
}

.question-score {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 3px;
  border-radius: 0;
  color: #111827;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
  margin-left: 4px;
}

.question-figure {
  width: 170px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  background: #fff;
  flex: 0 0 auto;
}

.question-figure svg {
  width: 145px;
  height: 86px;
  display: block;
  font-family: "Times New Roman", serif;
  font-size: 12px;
}

.paper-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
  color: #334155;
}

.answer-area {
  display: none;
  margin-top: 12px;
  border-radius: 0;
  border: 1px dashed #d1d5db;
  background: repeating-linear-gradient(to bottom, transparent, transparent 31px, #e5e7eb 32px);
}

.answer-area.show {
  display: block;
}

.paper-answer-section {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid #111827;
  color: #111827;
}

.paper-answer-editable-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.answer-text-block {
  min-height: 22px;
}

.paper-answer-head {
  text-align: center;
  margin-bottom: 20px;
}

.paper-answer-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 900;
}

.paper-answer-desc {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.paper-answer-group {
  margin-top: 18px;
}

.paper-answer-group-title {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 900;
}

.paper-answer-item {
  padding: 3px 0;
  border-bottom: 0;
  font-size: 13px;
  line-height: 1.8;
}

.paper-answer-line,
.paper-analysis-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}

.paper-analysis-line {
  margin-top: 1px;
  padding-left: 0;
  color: #333;
}

.paper-answer-no,
.paper-answer-label {
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .paper-sheet {
    width: 760px;
  }
}
