/* ===== 美说阶段性学习报告 · A4 专业印刷版画布样式 (v3.2 设计师底图精准套印 + 五号字体优化) =====
 * 精确 A4 比例：1080px × 1528px（对应 300 DPI 打印尺寸 2480 × 3508 px）
 * 字体换算：A4 宽度 210mm = 8.27in → 1pt ≈ 1.815px，标准五号字 (10.5pt) ≈ 19px，小五号 (9pt) ≈ 16.3px
 */

.a4-sheet {
  position: relative;
  width: 1080px;
  height: 1528px;
  padding: 28px 40px 28px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #fffefb;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: #1f2937;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  user-select: none;
  overflow: hidden;
  border-radius: 6px;
}

/* 默认洁净印刷版外框（仅在未使用自定义设计师底图时显示） */
.a4-sheet:not(.has-custom-bg)::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px solid #d6cfc2;
  border-radius: 4px;
  pointer-events: none;
}
.a4-sheet:not(.has-custom-bg)::after {
  content: "";
  position: absolute;
  inset: 19px;
  border: 0.75px solid #e7e2d8;
  border-radius: 2px;
  pointer-events: none;
}

/* 独立控制 Logo 与大标题显隐（不删除 HTML 结构，随时可通过开关组合显示） */
.a4-sheet.hide-logo .a4-brand-group {
  display: none;
}
.a4-sheet.hide-doc-title .a4-doc-title {
  display: none;
}
.a4-sheet.hide-logo.hide-doc-title .a4-header-top {
  display: none;
}
.a4-sheet.hide-logo:not(.hide-doc-title) .a4-header-top {
  justify-content: center;
}
.a4-sheet:not(.has-custom-bg).hide-logo.hide-doc-title .a4-header {
  height: 66px;
  justify-content: center;
}
.a4-sheet:not(.has-custom-bg).hide-logo.hide-doc-title .a4-header-meta {
  padding-top: 0;
  border-top: none;
}

/* 通用模块容器（默认洁净印刷版） */
.a4-mod {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 1px solid #e4dfd5;
  border-radius: 8px;
  padding: 12px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.a4-mod-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ece7dd;
  flex-shrink: 0;
}

.a4-mod-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #134e4a;
  letter-spacing: 0.6px;
}

.a4-mod-bar {
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: #0f766e;
  flex-shrink: 0;
}

.a4-mod-sub {
  font-size: 14px;
  color: #78716c;
  letter-spacing: 0.4px;
}

/* ==================== 模块一：顶部抬头区 ==================== */
.a4-header {
  position: relative;
  z-index: 2;
  height: 128px;
  flex-shrink: 0;
  padding: 10px 22px 12px 22px;
  border-radius: 8px;
  border: 1px solid #e4dfd5;
  border-top: 4px solid #0f766e;
  background: #faf8f4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.a4-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a4-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.a4-brand-logo-img {
  height: 44px;
  max-width: 156px;
  object-fit: contain;
  display: block;
}

.a4-brand-seal {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid #0f766e;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 20px;
  font-weight: 700;
  background: #ffffff;
}

.a4-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #1c1917;
  letter-spacing: 1.5px;
}

.a4-doc-title {
  font-size: 23px;
  font-weight: 700;
  color: #134e4a;
  letter-spacing: 1.8px;
}

.a4-header-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 88px;
  padding-top: 9px;
  border-top: 1px solid #e5e0d6;
}

.a4-meta-divider {
  width: 1px;
  height: 20px;
  background: rgba(120, 113, 108, 0.30);
  align-self: center;
}

.a4-meta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.a4-meta-label {
  font-size: 17px;
  font-weight: 600;
  color: #57534e;
  white-space: nowrap;
}

.a4-meta-value {
  font-size: 21px;
  font-weight: 700;
  color: #1c1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a4-meta-value.student-name {
  font-size: 25px;
  color: #0f766e;
  letter-spacing: 1.2px;
}

/* ==================== 模块二：本学期成长勋章墙 ==================== */
.a4-mod-medals {
  height: 158px;
  flex-shrink: 0;
  padding: 10px 18px 10px 18px;
}

.a4-medals-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 78px;
}

.a4-medals-row.count-2 {
  gap: 150px;
}

.a4-medal-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 210px;
}

.a4-medal-emblem {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.a4-medal-emblem.has-img {
  width: 92px;
  height: 92px;
  border-radius: 0;
  background: transparent;
  border: none;
  overflow: visible;
}

.a4-medal-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(154, 118, 48, 0.20));
}

.a4-medal-emblem.fallback-ring {
  background: #faf6ee;
  border: 1.8px solid #c59b4f;
  box-shadow: inset 0 0 0 3px #ffffff, inset 0 0 0 4.5px #e5d2ab;
  color: #9a6d1f;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 27px;
  font-weight: 700;
}

.a4-medal-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #57534e;
  letter-spacing: 0.8px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.a4-medal-empty {
  font-size: 17px;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

/* ==================== 模块三：本阶段能力成长雷达图 ==================== */
.a4-mod-radar {
  height: 292px;
  flex-shrink: 0;
}

.a4-radar-body {
  flex: 1;
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 0;
}

.a4-radar-chart-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.a4-radar-svg {
  width: 416px;
  height: 248px;
  overflow: visible;
}

.a4-radar-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding-right: 4px;
}

.a4-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 94px;
  align-items: center;
  gap: 12px;
}

.a4-bar-label {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
}

.a4-bar-track {
  height: 11px;
  background: #edeae4;
  border-radius: 6px;
  overflow: hidden;
}

.a4-bar-fill {
  height: 100%;
  border-radius: 6px;
}

.a4-bar-state {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ==================== 模块四：作品口语、语音面貌与专业诊断 ==================== */
.a4-mod-core {
  height: 574px;
  flex-shrink: 0;
  gap: 12px;
}

.a4-core-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  height: 196px;
  flex-shrink: 0;
}

.a4-subbox {
  border: 1px solid #eae5dc;
  border-radius: 6px;
  background: #fcfbf9;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}

.a4-subbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.a4-subbox-title {
  font-size: 17.5px;
  font-weight: 700;
  color: #134e4a;
}

.a4-subbox-note {
  font-size: 13.5px;
  color: #78716c;
}

.a4-knowledge-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
}

.a4-knowledge-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
}

.a4-works-section-label {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f766e;
  background: #e6f4f1;
  border: 1px solid #c3e4dd;
  border-radius: 6px;
  padding: 4px 2px;
  box-sizing: border-box;
}

.a4-works-section-label.oral {
  color: #334155;
  background: #eef2f7;
  border-color: #d6dfe9;
}

.a4-works-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
  align-content: center;
}

.a4-work-item {
  font-size: 17px;
  font-weight: 600;
  color: #1c1917;
  background: #ffffff;
  border: 1px solid #e5e0d6;
  border-radius: 5px;
  padding: 4px 8px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a4-oral-list {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 7px;
  align-content: center;
}

.a4-oral-item {
  font-size: 16.5px;
  font-weight: 500;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #d9e2ec;
  border-radius: 5px;
  padding: 3px 10px;
  line-height: 1.32;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a4-phonetics-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  justify-content: center;
  min-height: 0;
}

.a4-phonetic-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 7px;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
}

.a4-phonetic-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.38;
  color: #1f2937;
}

.a4-phonetic-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b45309;
  margin-top: 9px;
  flex-shrink: 0;
}

/* 模块四下半部：两大突出优点 (50%) + 1个提升点与陪练妙招 (50%) */
.a4-core-bottom {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-height: 0;
}

.a4-strength-col {
  border: 1px solid #dbeae7;
  border-radius: 6px;
  background: #f9fcfb;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  box-sizing: border-box;
}

.a4-strength-item {
  flex: 1;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #e2eeec;
  border-left: 4px solid #0f766e;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.a4-item-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.a4-item-num {
  font-size: 14px;
  font-weight: 700;
  color: #0f766e;
  background: #e6f4f1;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.a4-item-heading {
  font-size: 18.5px;
  font-weight: 700;
  color: #1c1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a4-item-text {
  flex: 1;
  min-height: 0;
  font-size: 18px;
  line-height: 1.46;
  color: #1f2937;
  word-break: break-word;
  overflow: hidden;
}

.a4-improve-col {
  border: 1px solid #efe1cc;
  border-radius: 6px;
  background: #fffdf9;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  box-sizing: border-box;
}

.a4-improve-box {
  flex: 0.85;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #f0e3ce;
  border-left: 4px solid #b45309;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.a4-improve-num {
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.a4-practice-box {
  flex: 1.25;
  min-height: 0;
  background: #faf6ee;
  border: 1px dashed #d6b67c;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.a4-practice-label {
  font-size: 17.5px;
  font-weight: 700;
  color: #92400e;
  flex-shrink: 0;
}

.a4-practice-text {
  flex: 1;
  min-height: 0;
  font-size: 18px;
  line-height: 1.46;
  color: #292524;
  word-break: break-word;
  overflow: hidden;
}

/* ==================== 模块五：老师暖心寄语 & 下学期方向 + 独立落款 ==================== */
.a4-mod-footer {
  height: 266px;
  flex-shrink: 0;
  padding: 12px 18px;
}

.a4-footer-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 188px;
  gap: 18px;
  min-height: 0;
}

.a4-footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.a4-summary-block {
  flex: 1.15;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.a4-goals-block {
  flex: 0.95;
  min-height: 0;
  padding-top: 7px;
  border-top: 1px dashed #d9d2c5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.a4-footer-label {
  font-size: 16.5px;
  font-weight: 700;
  color: #134e4a;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.a4-footer-label::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: #0f766e;
}

.a4-footer-label.goals::before {
  background: #b45309;
}

.a4-footer-label.goals {
  color: #92400e;
}

.a4-footer-prose {
  flex: 1;
  min-height: 0;
  font-size: 18px;
  line-height: 1.48;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}

/* 独立右下部落款区（物理隔离，绝不重叠，无机构二维码） */
.a4-sign-box {
  border-left: 1px solid #e2dcd0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 6px;
}

.a4-sign-line {
  width: 48px;
  height: 2.5px;
  background: #c59b4f;
  margin-bottom: 4px;
}

.a4-sign-role {
  font-size: 15px;
  color: #57534e;
  letter-spacing: 1px;
}

.a4-sign-teacher {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 28px;
  font-weight: 700;
  color: #1c1917;
  letter-spacing: 2px;
  line-height: 1.15;
}

.a4-sign-time {
  font-size: 17px;
  color: #44403c;
  letter-spacing: 0.6px;
}

.a4-sign-org {
  font-size: 14.5px;
  color: #78716c;
  margin-top: 2px;
}

.a4-placeholder {
  color: #9ca3af;
  font-style: normal;
  font-size: 16px;
}

/* =====================================================================
 * 设计师 A4 底图精准套印模式 (.a4-sheet.has-custom-bg)
 * 1:1 严格对齐底图白卡、绿条标题与竖向虚线，透明容器绝不遮挡底图文字与装饰
 * ===================================================================== */
.a4-sheet.has-custom-bg {
  display: block;
  padding: 0;
}

/* 1. 顶部抬头区：Logo 与大标题双隐藏时仅保留下方居中「姓名 + 级别」信息条；任一开启则展开展示 */
.a4-sheet.has-custom-bg .a4-header {
  position: absolute;
  top: 28px;
  left: 58px;
  width: 964px;
  height: 150px;
  padding: 10px 22px 12px 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(180, 170, 154, 0.42);
  border-top: 4px solid #0f766e;
  border-radius: 10px;
}
.a4-sheet.has-custom-bg.hide-logo.hide-doc-title .a4-header {
  top: 125px;
  left: 58px;
  width: 964px;
  height: 54px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(114, 203, 35, 0.34);
  border-top: 1px solid rgba(114, 203, 35, 0.34);
  border-radius: 12px;
  justify-content: center;
}
.a4-sheet.has-custom-bg.hide-logo.hide-doc-title .a4-header-meta {
  padding-top: 0;
  border-top: none;
}

/* 2. 勋章墙：精准落位在底图「本学期成长勋章墙」绿条(y=225)下方白卡内，突出大尺寸立体勋章 */
.a4-sheet.has-custom-bg .a4-mod-medals {
  position: absolute;
  top: 224px;
  left: 58px;
  width: 964px;
  height: 138px;
  padding: 2px 16px;
  background: transparent;
  border: none;
}
.a4-sheet.has-custom-bg .a4-mod-medals .a4-mod-head {
  display: none;
}
.a4-sheet.has-custom-bg .a4-medal-emblem.has-img {
  width: 114px;
  height: 114px;
}
.a4-sheet.has-custom-bg .a4-medals-row {
  gap: 86px;
}
.a4-sheet.has-custom-bg .a4-medals-row.count-2 {
  gap: 170px;
}

/* 3. 能力成长雷达图：精准落位在底图「能力成长雷达图」绿条(y=398)下方白卡内 */
.a4-sheet.has-custom-bg .a4-mod-radar {
  position: absolute;
  top: 400px;
  left: 58px;
  width: 964px;
  height: 266px;
  padding: 4px 14px;
  background: transparent;
  border: none;
}
.a4-sheet.has-custom-bg .a4-mod-radar .a4-mod-head {
  display: none;
}
.a4-sheet.has-custom-bg .a4-radar-svg {
  width: 422px;
  height: 256px;
}

/* 4. 模块四：外框透明释放，上下两个独立白卡各自精准对齐底图绿条与绿色竖向虚线 */
.a4-sheet.has-custom-bg .a4-mod-core {
  position: static;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
}

/* 4-上：知识学习 (x=66..670) | 绿色虚线(x=685) | 语音面貌 (x=700..1022) */
.a4-sheet.has-custom-bg .a4-core-top {
  position: absolute;
  top: 724px;
  left: 66px;
  width: 956px;
  height: 156px;
  grid-template-columns: 604px 322px;
  gap: 30px;
  z-index: 2;
}
.a4-sheet.has-custom-bg .a4-subbox {
  background: transparent;
  border: none;
  padding: 4px 6px;
}
.a4-sheet.has-custom-bg .a4-subbox .a4-subbox-head {
  display: none;
}
.a4-sheet.has-custom-bg .a4-work-item {
  background: rgba(255, 255, 255, 0.88);
  border-color: #dce6e0;
}
.a4-sheet.has-custom-bg .a4-oral-item {
  background: rgba(241, 247, 250, 0.90);
  border-color: #d3e1ea;
}

/* 4-下：高光时刻 (x=66..528) | 绿色虚线(x=542) | 提升妙招 (x=558..1022) */
.a4-sheet.has-custom-bg .a4-core-bottom {
  position: absolute;
  top: 944px;
  left: 66px;
  width: 956px;
  height: 278px;
  grid-template-columns: 462px 464px;
  gap: 30px;
  z-index: 2;
}
.a4-sheet.has-custom-bg .a4-strength-col,
.a4-sheet.has-custom-bg .a4-improve-col {
  background: transparent;
  border: none;
  padding: 2px 4px;
  gap: 9px;
}
.a4-sheet.has-custom-bg .a4-strength-col .a4-subbox-head,
.a4-sheet.has-custom-bg .a4-improve-col .a4-subbox-head {
  display: none;
}
.a4-sheet.has-custom-bg .a4-strength-item {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(206, 232, 224, 0.90);
}
.a4-sheet.has-custom-bg .a4-improve-box {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(240, 225, 198, 0.92);
}
.a4-sheet.has-custom-bg .a4-practice-box {
  background: rgba(250, 246, 236, 0.80);
  border-color: #d6b67c;
}

/* 5. 暖心寄语：精准落位在底图「暖心寄语」绿条(y=1275)下方白卡内 */
.a4-sheet.has-custom-bg .a4-mod-footer {
  position: absolute;
  top: 1278px;
  left: 66px;
  width: 956px;
  height: 196px;
  padding: 4px 8px;
  background: transparent;
  border: none;
}
.a4-sheet.has-custom-bg .a4-summary-block .a4-footer-label {
  display: none;
}
.a4-sheet.has-custom-bg .a4-footer-grid {
  grid-template-columns: 1fr 180px;
  gap: 18px;
}
.a4-sheet.has-custom-bg .a4-sign-box {
  border-left-color: rgba(154, 185, 130, 0.45);
}
