/* 小字帖 · 纸张 / 格子 / 打印样式
   屏幕上与打印时共用，尺寸全部用 mm / 相对单位，保证 A4 输出精确。 */

/* ---------- 纸张 ---------- */
.paper {
  --cell: 18mm;
  --cols: 10;
  --gap: 2mm;
  --grid-line: #dda68e;
  --grid-border: #c97157;
  --grid-width: 1px;
  --glyph-color: #1f1f1f;
  --glyph-opacity: .18;
  --glyph-scale: .78;
  --glyph-font: "KaiTi", "STKaiti", "Kaiti SC", "楷体", "SimSun", serif;
  --py-color: #333;
  --py-font: "Times New Roman", "Songti SC", "SimSun", serif;
  width: var(--paper-w);
  min-height: var(--paper-h);
  padding: var(--paper-pad);
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 3px 18px rgba(50, 44, 34, .14);
  border: 1px solid #eae6dc;
  border-radius: 2px;
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.paper-body { flex: 1; }
.paper-head { flex: none; }
.paper-title { text-align: center; font: 700 var(--title-size, 20pt)/1.5 var(--glyph-font); letter-spacing: 3px; margin: 0 0 3mm; }
.paper-sub { text-align: center; font-size: 9pt; color: #666; margin: 0 0 4mm; letter-spacing: 1px; }
.paper-meta { display: flex; gap: 8mm; justify-content: center; font-size: 9.5pt; color: #555; margin-bottom: 5mm; }
.paper-meta span { border-bottom: 1px solid #aaa; min-width: 26mm; padding: 0 2mm 1px; text-align: center; }
.paper-foot { flex: none; margin-top: 4mm; padding-top: 2mm; border-top: 1px dashed #ddd; display: flex; justify-content: space-between; font-size: 8pt; color: #999; }
.paper-note { font-size: 9pt; color: #666; line-height: 1.8; margin: 0 0 4mm; }
.paper-section-title { font: 600 12pt/1.5 var(--glyph-font); margin: 4mm 0 2mm; padding-left: 2.5mm; border-left: 3px solid var(--accent); }

/* ---------- 通用格子行 ---------- */
.grid-row {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  gap: var(--gap);
  justify-content: start;
  margin-bottom: var(--gap);
  break-inside: avoid;
}
.grid-row.center { justify-content: center; }
.cell-stack { display: flex; flex-direction: column; align-items: center; width: var(--cell); }
.cell-stack > .py-top {
  height: calc(var(--cell) * .28);
  line-height: calc(var(--cell) * .28);
  font: var(--py-size, 9pt)/1 var(--py-font);
  color: var(--py-color);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0;
}
.cell-stack > .cell-note { font-size: 7.2pt; color: #777; line-height: 1.4; text-align: center; margin-top: .6mm; white-space: nowrap; }

/* ---------- 格子本体 ---------- */
.cell {
  position: relative;
  width: var(--cell);
  height: var(--cell);
  flex: none;
  border: var(--grid-width) solid var(--grid-border);
  overflow: hidden;
}
.cell .gl { position: absolute; display: none; pointer-events: none; }
.gl-h { left: 0; top: 50%; width: 100%; border-top: var(--grid-width) dashed var(--grid-line); }
.gl-v { top: 0; left: 50%; height: 100%; border-left: var(--grid-width) dashed var(--grid-line); }
.gl-h1 { left: 0; top: 33.333%; width: 100%; border-top: var(--grid-width) dashed var(--grid-line); }
.gl-h2 { left: 0; top: 66.666%; width: 100%; border-top: var(--grid-width) dashed var(--grid-line); }
.gl-v1 { top: 0; left: 33.333%; height: 100%; border-left: var(--grid-width) dashed var(--grid-line); }
.gl-v2 { top: 0; left: 66.666%; height: 100%; border-left: var(--grid-width) dashed var(--grid-line); }
.gl-d1, .gl-d2 { left: 50%; top: 50%; width: 141.4%; border-top: var(--grid-width) dashed var(--grid-line); }
.gl-d1 { transform: translate(-50%, -50%) rotate(45deg); }
.gl-d2 { transform: translate(-50%, -50%) rotate(-45deg); }
.gl-inner { inset: 14%; border: var(--grid-width) dashed var(--grid-line); }
.cell.g-tian > .gl-h, .cell.g-tian > .gl-v,
.cell.g-mi > .gl-h, .cell.g-mi > .gl-v, .cell.g-mi > .gl-d1, .cell.g-mi > .gl-d2,
.cell.g-jiu > .gl-h1, .cell.g-jiu > .gl-h2, .cell.g-jiu > .gl-v1, .cell.g-jiu > .gl-v2,
.cell.g-hui > .gl-inner, .cell.g-hui > .gl-h, .cell.g-hui > .gl-v,
.cell.g-fang > .gl-h, .cell.g-fang > .gl-v { display: block; }
.cell.g-none { border-color: transparent; }
.cell.g-dotted { border-style: dashed; }

/* ---------- 字形 ---------- */
.cell > .glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 400 calc(var(--cell) * var(--glyph-scale)) / 1 var(--glyph-font);
  color: var(--glyph-color);
  opacity: var(--glyph-opacity);
  white-space: nowrap;
  letter-spacing: 0;
}
.cell > .glyph.solid { opacity: 1; }
.cell > .glyph.red { color: #c0392b; }
.cell > .glyph-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.glyph-svg path { fill: var(--glyph-color); opacity: var(--glyph-opacity); }
.glyph-svg path.solid { opacity: 1; }
.glyph-svg path.done { fill: #b9b9b9; opacity: .55; }
.glyph-svg path.current { fill: var(--accent); opacity: 1; }
.glyph-svg path.red { fill: #c0392b; opacity: 1; }
.cell .idx { position: absolute; left: 1mm; top: .5mm; font-size: 6.5pt; color: #bbb; }

/* ---------- 笔顺分解 ---------- */
.stroke-steps { display: flex; flex-wrap: wrap; gap: 2mm; align-items: flex-end; break-inside: avoid; }
.stroke-step { display: flex; flex-direction: column; align-items: center; gap: 1mm; }
.stroke-step .cap { font-size: 7pt; color: #888; }
.stroke-step .cell { --cell: var(--step-cell, 12mm); }

/* ---------- 文章注音（自定义 ruby，可控且可点击改音） ---------- */
.ruby-text {
  font: 400 var(--text-size, 16pt) / var(--text-lh, 2.5) var(--glyph-font);
  letter-spacing: var(--text-spacing, 1px);
  text-align: var(--text-align, justify);
  word-break: break-all;
}
.ruby-text .zh-char { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; }
.ruby-text .zh-py {
  font: var(--py-size, 9pt)/1.25 var(--py-font);
  color: var(--py-color);
  height: 1.6em;
  padding-bottom: .8mm;
  white-space: nowrap;
  letter-spacing: 0;
}
.ruby-text .zh-zi { line-height: 1.05; white-space: pre; }
.ruby-text .zh-plain { display: inline-block; }
.ruby-text .zh-space { display: inline-block; width: .5em; }
.ruby-text.no-py .zh-py { visibility: hidden; }
.ruby-text .py-click { cursor: pointer; border-bottom: 1px dotted transparent; border-radius: 2px; }
.ruby-text .py-click:hover { border-bottom-color: var(--accent); background: var(--accent-soft); }
.ruby-text .line { margin-bottom: var(--para-gap, 3mm); }
.ruby-text .indent { text-indent: 2em; }

/* ---------- 四线三格 ---------- */
.py4 { position: relative; width: var(--py4-w, 34mm); height: var(--py4-h, 12mm); }
.py4 > i { position: absolute; left: 0; right: 0; border-top: 1px solid #cf8f7b; }
.py4 > i:nth-child(1) { top: 0; }
.py4 > i:nth-child(2) { top: 33.333%; border-top-style: dashed; border-color: #dfb6a7; }
.py4 > i:nth-child(3) { top: 66.666%; border-top-style: dashed; border-color: #dfb6a7; }
.py4 > i:nth-child(4) { top: 100%; }
.py4 > .py4-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: var(--py4-size, 15pt)/1 var(--py-font);
  color: var(--py-color); padding-bottom: 1mm;
}
.py4 > .py4-text.trace { opacity: .22; }
.py4-row { display: flex; align-items: flex-end; gap: 2mm; flex-wrap: wrap; break-inside: avoid; }
.py4-item { display: flex; flex-direction: column; align-items: center; gap: 1mm; }
.py4-item .cap { font-size: 7pt; color: #888; }

/* ---------- 表格 / 卡片 / 裁剪线 ---------- */
.sheet-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet-table th, .sheet-table td { border: 1px solid #9a9a9a; text-align: center; vertical-align: middle; padding: 2mm 1mm; font-size: var(--table-size, 11pt); }
.sheet-table th { background: #f6f2ea; font-weight: 600; }
.sheet-table td.empty { color: #ccc; }
.sheet-table tr { break-inside: avoid; }
.cut-grid { display: grid; grid-template-columns: repeat(var(--cut-cols, 3), 1fr); gap: 0; }
.cut-item { border: 1px dashed #bbb; min-height: var(--cut-h, 34mm); padding: 3mm; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; break-inside: avoid; }
.cut-item .cut-scissor { position: absolute; top: 1mm; right: 2mm; font-size: 7pt; color: #ccc; }
.card-name { font: 700 var(--card-size, 26pt)/1.3 var(--glyph-font); letter-spacing: 3px; }
.card-sub { font-size: 9pt; color: #666; margin-top: 2mm; }
.word-card { border: 1px dashed #aaa; border-radius: 2mm; padding: 3mm; break-inside: avoid; text-align: center; }
.word-card .big { font: 700 var(--card-big, 30pt)/1.2 var(--glyph-font); letter-spacing: 2px; }
.word-card .py { font: 12pt/1.4 var(--py-font); color: #555; }
.word-card .meta { font-size: 8.5pt; color: #666; line-height: 1.7; margin-top: 1.5mm; }
.word-card .mini-grid { display: flex; gap: 1.5mm; justify-content: center; margin-top: 2mm; }
.answer-line { border-bottom: 1px solid #bbb; display: inline-block; min-width: 18mm; }
.expr { font: 400 var(--expr-size, 14pt)/1 var(--font-ui); letter-spacing: .5px; white-space: nowrap; }
.q-list { display: grid; grid-template-columns: repeat(var(--q-cols, 3), 1fr); gap: var(--q-gap, 6mm) 4mm; break-inside: avoid; }
.q-list .q { display: flex; align-items: baseline; gap: 2mm; font-size: var(--expr-size, 14pt); white-space: nowrap; }
.q-list .q .no { font-size: 9pt; color: #999; min-width: 7mm; }

/* ---------- 部首 / 笔顺演示（屏幕） ---------- */
.stage-grid { pointer-events: none; }
.demo-stage .hw-target { position: absolute; inset: 0; }

/* ---------- 通用矢量字形容器 ---------- */
svg.glyph-svg { display: block; width: 100%; height: 100%; }
.cell > svg.glyph-svg, .bchar > svg.glyph-svg, .cq-big > svg.glyph-svg,
.card-glyph-svg > svg.glyph-svg, .mini-step > svg.glyph-svg { position: absolute; inset: 0; }

/* ---------- 注音补充 ---------- */
.ruby-text.py-below .zh-char { flex-direction: column-reverse; }
.ruby-text.py-below .zh-py { padding-bottom: 0; padding-top: .8mm; }
.ruby-text .zh-plain { line-height: 1.05; }
.ruby-text .line { min-height: 1em; }
/* 固定每个注音单元的宽度 = 汉字宽，避免 inline-flex 被子元素撑宽后整行自动折行 */
.ruby-text .zh-char {
  width: calc(var(--zw, 1em) * 1.08);
  min-width: calc(var(--zw, 1em) * 1.08);
  max-width: calc(var(--zw, 1em) * 1.08);
  margin-right: .4mm;
}
.ruby-text .zh-py { width: 100%; text-align: center; }
.ruby-text .zh-zi { width: 100%; text-align: center; }

/* ---------- 文章注音：等宽字格铺满整行 ----------
   每个字（含拼音）占一个等宽格，格宽 = 纸面可用宽度 / 每行字数，
   因此非末行会精确铺满纸宽，右侧不留白；末行按实际字数自然收尾。
   标点不再单独占格，而是绝对定位到前一个汉字的右下角。 */
.zh-article .line {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: var(--line-justify, flex-start);
  min-height: calc(var(--text-size, 16pt) * var(--text-lh, 2.6));
  text-align: left;
  word-break: normal;
  white-space: nowrap;
}
.zh-article .line.blank { min-height: calc(var(--text-size, 16pt) * .9); }
.zh-article .line.para-end { margin-bottom: calc(var(--para-gap, 2mm) + 1.5mm); }
.zh-article .zh-char {
  flex: 0 0 var(--unit-w, 10mm);
  width: var(--unit-w, 10mm);
  min-width: var(--unit-w, 10mm);
  max-width: var(--unit-w, 10mm);
  margin-right: 0;
}
.zh-article .zh-char.blank { visibility: hidden; }
.zh-article .zh-zi { position: relative; }
/* 全角标点的墨迹在自身 em 框的左下，若把框右边缘贴齐字格右边缘，
   墨迹会落回汉字笔画里。这里从字格右边缘起算，向左回推一小段，
   让墨迹落在「汉字右缘 → 下一字格左缘」的空白带。
   位移与上移量都以正文字号（pt）为基准，因此单独调整标点大小时位置不会漂移。 */
.zh-article .zh-punct {
  position: absolute;
  left: 100%;
  bottom: var(--punct-rise, 2pt);
  transform: translateX(var(--punct-shift, -4.5pt));
  font-size: var(--punct-size, .85em);
  line-height: 1;
  font-style: normal;
  white-space: nowrap;
  color: inherit;
}
/* 字形落点分类：引号括号靠上、省略号破折号居中、成对标点收紧 */
.zh-article .zh-punct.p-top { bottom: auto; top: -1pt; }
.zh-article .zh-punct.p-mid { bottom: calc(var(--punct-rise, 2pt) + 4.5pt); }
.zh-article .zh-punct.p-multi {
  font-size: calc(var(--punct-size, .85em) * var(--punct-scale, .82));
  letter-spacing: -.04em;
}
.zh-article .zh-punct.p-long { letter-spacing: -.1em; }
.zh-article .zh-sym .zh-zi { font-size: .86em; }
.zh-article.py-below .zh-char { flex-direction: column-reverse; }
.zh-article.py-below .zh-py { padding-bottom: 0; padding-top: .8mm; }

/* ---------- 笔顺练习 ---------- */
.bishun-grid { display: grid; grid-template-columns: repeat(var(--bcols, 2), 1fr); gap: 5mm; }
.bishun-block { break-inside: avoid; padding-bottom: 3mm; margin-bottom: 4mm; border-bottom: 1px dashed #e2ded4; }
.bishun-head { display: flex; align-items: center; gap: 3mm; margin-bottom: 2mm; }
.bchar { position: relative; width: 14mm; height: 14mm; flex: none; border: 1px solid #e8d9c9; }
.bmeta .bpy { font: 13pt/1.3 var(--py-font); }
.bmeta .binfo { font-size: 8.5pt; color: #666; }
.bishun-label { font-size: 8pt; color: #888; margin: 2mm 0 1mm; }
.bishun-trace { display: flex; gap: 2mm; flex-wrap: wrap; }
.stroke-steps .cell { --cell: var(--step-cell, 12mm); }

/* ---------- 看拼音写汉字 ---------- */
.moxie-row { display: grid; grid-template-columns: repeat(var(--mcols, 2), 1fr); gap: 5mm 4mm; margin-bottom: 5mm; break-inside: avoid; }
.moxie-item { display: flex; align-items: flex-start; gap: 1.5mm; }
.moxie-item .qno { font-size: 9pt; color: #999; padding-top: 7mm; flex: none; }
.moxie-stack { display: flex; flex-direction: column; align-items: center; }
.moxie-py { font: var(--py-size, 10pt)/1.35 var(--py-font); text-align: center; color: #333; margin-bottom: 1mm; white-space: nowrap; }
.moxie-cells { display: flex; gap: 1.5mm; align-items: flex-end; justify-content: center; }
.moxie-word { font: 700 20pt/1.4 var(--glyph-font); text-align: center; letter-spacing: 2px; margin-bottom: 2mm; }
.moxie-item .py4 { --py4-size: 13pt; }

/* ---------- 答案页 ---------- */
.answer-sheet { display: flex; flex-direction: column; gap: 1.2mm; font-size: 10pt; }
.ans-item { display: flex; gap: 2mm; align-items: baseline; border-bottom: 1px dotted #e6e2d8; padding: 1mm 0; }
.ans-no { color: #999; min-width: 9mm; font-size: 9pt; }
.ans-word { font: 11pt var(--glyph-font); min-width: 28mm; }
.ans-py { color: #666; font-size: 9pt; }
.ans-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm 4mm; }

/* ---------- 生字卡片 / 姓名贴 ---------- */
.cut-item .big { font: 700 var(--card-big, 30pt)/1.2 var(--glyph-font); letter-spacing: 2px; }
.cut-item .py { font: 12pt/1.4 var(--py-font); color: #555; }
.cut-item .meta { font-size: 8.5pt; color: #666; line-height: 1.6; margin-top: 1.5mm; }
.cut-item .card-name { font: 700 var(--card-size, 26pt)/1.3 var(--glyph-font); letter-spacing: 3px; }
.cut-item .card-sub { font-size: 8.5pt; color: #666; margin-top: 1.5mm; }
.card-glyph-svg { position: relative; width: 22mm; height: 22mm; margin: 1mm 0; }
.cut-item .mini-grid { display: flex; gap: 1mm; justify-content: center; flex-wrap: wrap; align-items: center; }
.mini-step { position: relative; width: 6mm; height: 6mm; }
.mini-grid .cell { --cell: 10mm; }

/* ---------- 拼音四线格 ---------- */
.py4-row { margin-bottom: 3mm; }
.py4-item .cap { font-size: 7.5pt; color: #888; height: 3mm; }
.tones-row { border: 1px dashed #e6e0d4; padding: 2mm; margin-bottom: 5mm; }

/* ---------- 课程表 ---------- */
.schedule-table .col-period { width: 17mm; }
.schedule-table .col-time { width: 20mm; }
.schedule-table td[contenteditable] { height: 15mm; outline: none; cursor: text; }
.schedule-table td[contenteditable]:focus { background: #fdf3ec; box-shadow: inset 0 0 0 2px var(--accent); }
.schedule-table .time-cell { font-size: 8.5pt; color: #888; }

/* ---------- 古诗词卡 ---------- */
.poem-card { break-inside: avoid; border: 1px dashed #dcd6ca; border-radius: 2mm; padding: 4mm; margin-bottom: 6mm; }
.poem-card-head { text-align: center; margin-bottom: 3mm; }
.poem-name { font: 700 15pt/1.4 var(--glyph-font); letter-spacing: 2px; }
.poem-author { font-size: 9pt; color: #777; }
.poem-lines .line { text-align: center; margin-bottom: 1.5mm; }

/* ---------- 形近字辨析 ---------- */
.similar-row { display: grid; grid-template-columns: repeat(var(--sim-cols, 2), 1fr); gap: 5mm 4mm; margin-bottom: 4mm; break-inside: avoid; }
.similar-q { display: flex; gap: 1.5mm; align-items: flex-start; }
.similar-q .no { font-size: 9pt; color: #999; padding-top: 1mm; flex: none; }
.similar-word { font: 14pt/1.5 var(--glyph-font); white-space: nowrap; }
.similar-opts { font-size: 9pt; color: #555; white-space: nowrap; margin-top: .5mm; }

/* ---------- 汉字学习单 ---------- */
.cq-block { break-inside: avoid; margin-bottom: 6mm; padding-bottom: 4mm; border-bottom: 1px dashed #e2ded4; }
.cq-head { display: flex; gap: 5mm; align-items: center; margin-bottom: 2mm; }
.cq-big { position: relative; width: 24mm; height: 24mm; flex: none; border: 1px solid #e8d9c9; font: 700 40px/24mm var(--glyph-font); text-align: center; }
.cq-py { font: 15pt/1.4 var(--py-font); }
.cq-line { font-size: 9.5pt; color: #555; line-height: 1.8; }
.cq-explain { color: #777; }

/* ---------- 字号兜底：拆开 font 简写 ----------
   部分浏览器会丢弃含 calc() 或多个 var() 的 font 简写，导致范字只剩继承的 14px。
   这里用独立属性重新声明，保证打印尺寸稳定。 */
.paper-title { font-family: var(--glyph-font); font-size: var(--title-size, 20pt); font-weight: 700; line-height: 1.5; }
.paper-section-title { font-family: var(--glyph-font); font-size: 12pt; font-weight: 600; line-height: 1.5; }
.cell > .glyph {
  font-family: var(--glyph-font);
  font-size: calc(var(--cell) * var(--glyph-scale));
  font-weight: 400;
  line-height: 1;
}
.cell-stack > .py-top { font-family: var(--py-font); font-size: var(--py-size, 9pt); line-height: calc(var(--cell) * .28); }
.ruby-text { font-family: var(--glyph-font); font-size: var(--text-size, 16pt); font-weight: 400; line-height: var(--text-lh, 2.5); letter-spacing: var(--text-spacing, 1px); }
.ruby-text .zh-py { font-family: var(--py-font); font-size: var(--py-size, 9pt); line-height: 1.25; }
.py4 > .py4-text { font-family: var(--py-font); font-size: var(--py4-size, 15pt); line-height: 1; }
.card-name, .cut-item .card-name { font-family: var(--glyph-font); font-size: var(--card-size, 26pt); font-weight: 700; line-height: 1.3; }
.cut-item .big, .word-card .big { font-family: var(--glyph-font); font-size: var(--card-big, 30pt); font-weight: 700; line-height: 1.2; }
.cut-item .py, .word-card .py { font-family: var(--py-font); font-size: 12pt; line-height: 1.4; }
.moxie-py { font-family: var(--py-font); font-size: var(--py-size, 10pt); line-height: 1.35; }
.moxie-word { font-family: var(--glyph-font); font-size: 20pt; font-weight: 700; line-height: 1.4; }
.ans-word { font-family: var(--glyph-font); font-size: 11pt; }
.bmeta .bpy { font-family: var(--py-font); font-size: 13pt; line-height: 1.3; }
.poem-name { font-family: var(--glyph-font); font-size: 15pt; font-weight: 700; line-height: 1.4; }
.similar-word { font-family: var(--glyph-font); font-size: 14pt; line-height: 1.5; }
.cq-big { font-family: var(--glyph-font); font-size: 40px; font-weight: 700; line-height: 24mm; }
.cq-py { font-family: var(--py-font); font-size: 15pt; line-height: 1.4; }
.expr { font-family: var(--font-ui); font-size: var(--expr-size, 14pt); font-weight: 400; line-height: 1; }

/* ---------- 打印规则 ---------- */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; overflow: visible !important; }
  .no-print, .topbar, .sidebar, .tool-head, .panel, .preview-toolbar, .statusbar,
  .modal-mask, .toast, .home, .demo-card, .py-click-hint { display: none !important; }
  .app-shell, .shell-body, .workspace, .work-grid, .preview-wrap, .preview-viewport, .preview {
    display: block !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: visible !important;
    zoom: 1 !important;
  }
  .preview { gap: 0 !important; }
  .paper {
    width: var(--paper-w) !important;
    min-height: var(--paper-h) !important;
    margin: 0 !important;
    padding: var(--paper-pad) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }
  .paper:last-child { page-break-after: auto; break-after: auto; }
  .grid-row, .q-list, .sheet-table tr, .cut-item, .word-card, .stroke-steps, .py4-row { break-inside: avoid; page-break-inside: avoid; }
  .ruby-text .py-click { border-bottom: 0 !important; }
}
