/* 数学站附加样式（继承 ../style.css 主样式） */

.topbar-math {
  background: linear-gradient(135deg, #c45a1f, #e07b3a);
}

/* 题型 chip */
.type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.type-chip {
  border: 1.5px solid #d0d4da;
  background: #fff;
  border-radius: 16px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  color: #444;
  transition: all 0.12s;
}
.type-chip:hover { border-color: #e07b3a; }
.type-chip.selected {
  background: #e07b3a;
  border-color: #e07b3a;
  color: #fff;
}

/* 试卷预览 */
.paper {
  background: #fff;
  padding: 2rem;
  margin-top: 1rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-family: "Times New Roman", "Songti SC", "STSong", serif;
  color: #1a1a1a;
}
.paper-title {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.paper-header {
  display: flex;
  justify-content: space-around;
  font-size: 0.95rem;
  border-bottom: 1px solid #999;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.q-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.6rem;
  row-gap: 1rem;
}
.q-item {
  display: flex;
  break-inside: avoid;
}
.q-num {
  flex: 0 0 1.6rem;
  font-weight: 600;
}
.q-body {
  flex: 1;
}
.q-text {
  font-size: 1rem;
  line-height: 1.5;
}
.answer-line {
  border-bottom: 1px solid #999;
  height: 1.6rem;
  margin-top: 0.4rem;
}
.vertical-pad {
  height: 6rem;
  border-bottom: 1px solid #ccc;
  margin-top: 0.3rem;
}

/* 答案页 */
.answer-paper {
  page-break-before: always;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ans-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 0.4rem;
  font-size: 0.92rem;
}
.ans-item {
  break-inside: avoid;
  padding: 0.2rem 0;
  border-bottom: 1px dotted #ddd;
}
.ans-num { font-weight: 600; margin-right: 0.4rem; }
.ans-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  background: #f0f3f7;
  color: #6a7585;
  font-size: 0.76rem;
  border-radius: 3px;
}

/* 打印 */
@media print {
  body * { visibility: hidden; }
  .paper, .paper *, .answer-paper, .answer-paper * { visibility: visible; }
  .paper { position: absolute; top: 0; left: 0; width: 100%; box-shadow: none; padding: 1.2cm; }
  .answer-paper {
    position: relative;
    padding: 1.2cm;
    box-shadow: none;
    page-break-before: always;
  }
  @page { size: A4; margin: 0; }
}

#aiPanel { margin-top: 0.6rem; padding: 0.6rem; background: #fff7ec; border-radius: 6px; border: 1px solid #f5d4a5; }
#aiPanel a { color: #c45a1f; text-decoration: underline; }
