/* ── division_check_equation3_4（わり算をたしかめの式で調べよう、単元仕様書 v1.4）── */
/* 画面：問題文の下に、役わりのラベルつきのわり算の式、式の代替文、選択肢①〜④（§5-3・§7 画面表示）。PCでは式を1行、320 CSS px幅では4つの数のまとまりを上から積む。 */
.dce-main{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px 0 6px;max-width:100%}
.dce-relation{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:center;gap:4px 8px;max-width:100%;padding:6px 10px;border:2px solid #64748b;border-radius:12px;background:#f8fafc;box-sizing:border-box}
.dce-num{display:flex;flex-direction:column;align-items:center;min-width:3.2em}
.dce-num-value{font-size:1.6rem;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums;color:#111827}
.dce-num-box{display:inline-block;min-width:1.2em;text-align:center}
.dce-num-label{font-size:.9rem;font-weight:700;color:#334155;border-top:2px solid #94a3b8;padding-top:1px;white-space:nowrap}
.dce-op{font-size:1.4rem;font-weight:800;line-height:1.3;padding-top:2px;color:#111827;white-space:nowrap}
.dce-alt{margin:0;font-size:.95rem;line-height:1.45;color:#1f2937;text-align:center;max-width:32em}
.dce-response{margin:0;font-weight:700;text-align:center}
.dce-choices{display:grid;grid-template-columns:1fr;gap:8px;min-width:12em;max-width:100%}
.dce-choice{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-height:48px;padding:6px 14px;border:2px solid #94a3b8;border-radius:12px;background:#fff;color:#111827;font-size:1.15rem;font-weight:700;font-family:inherit;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums;line-height:1.35}
.dce-choices-C .dce-choice{font-size:1.05rem}
.dce-choice:hover:not(:disabled){border-color:#1d4ed8;background:#eff6ff}
.dce-choice:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.dce-choice:disabled{cursor:default;opacity:1;color:#111827}
.dce-choice.dce-choice-correct{border:3px solid #15803d;background:#dcfce7}
.dce-choice.dce-choice-wrong{border:3px dashed #b91c1c;background:#fff1f2}
.dce-choice.dce-choice-selected{box-shadow:0 0 0 2px #111827 inset}
.dce-choice-tag{font-weight:900;min-width:1.1em}
.feedback.has-text.dce-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.dce-answer-line{margin:4px 0 2px;font-weight:700}
/* 2つのたしかめ：PCでは左右、320 CSS px幅では上から。成り立つかどうかを文と記号（○・×）で示し、色だけに頼らない。 */
.dce-checks{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;margin:4px 0}
.dce-check{display:flex;gap:6px;align-items:flex-start;margin:0;padding:6px 8px;border-radius:10px;border:2px solid #94a3b8;background:#fff;line-height:1.45;text-align:left}
.dce-check-ok{border-color:#15803d;background:#f0fdf4}
.dce-check-ng{border:2px dashed #b91c1c;background:#fff1f2}
.dce-check-mark{font-weight:900;flex:none}
.dce-expl-text{margin:2px 0 6px}
#page-quiz.active:has(.dce-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.dce-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.dce-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.dce-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
@media (max-width:560px){
  .dce-relation{flex-direction:column;align-items:center;flex-wrap:nowrap;gap:2px}
  .dce-num{flex-direction:row;gap:8px;align-items:baseline}
  .dce-num-label{border-top:0;border-left:2px solid #94a3b8;padding:0 0 0 6px}
  .dce-op{padding:0}
  .dce-checks{grid-template-columns:1fr}
  .dce-choices{width:100%}
}

/* 印刷：A4縦・1列・1ページ（§7。用紙の余白10mm、本文190×277mm）。 */
.dce-print-page{width:190mm;height:277mm;box-sizing:border-box;display:flex;flex-direction:column;padding:0;margin:0 auto 8mm;overflow:hidden;background:#fff;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
/* 共通の領域（77mm）：題名の枠、「月 日」「年 組」「名前」の記入欄、実線、共通の案内、数の名前の行、C群の選択肢の一覧（点数の欄は置かない）。 */
.dce-print-head{display:flex;flex-direction:column;height:77mm;flex:none;box-sizing:border-box;font-size:12.5pt}
.dce-print-title{box-sizing:border-box;margin:0;height:9mm;font-size:14pt;font-weight:700;line-height:7.8mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.dce-print-fields{display:flex;gap:9mm;align-items:flex-end;height:7mm;margin-top:1.5mm;font-size:12.5pt;line-height:7mm;white-space:nowrap}
.dce-print-group{display:inline-flex;align-items:flex-end;gap:4mm;flex:none}
.dce-print-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.dce-print-field-line{display:inline-block;box-sizing:border-box;width:13mm;height:5.5mm;border-bottom:1pt solid #555}
.dce-field-name{flex:1;min-width:0}
.dce-field-name .dce-print-field-line{flex:1;width:auto;min-width:40mm}
.dce-print-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1.2mm 0 1.2mm}
.dce-print-instruction{margin:0;max-height:18mm;line-height:6mm;overflow:hidden;padding-right:6mm}
.dce-print-legend{margin:0;height:6mm;line-height:6mm;white-space:nowrap}
.dce-print-clist{margin:0;padding:0 0 0 2mm;list-style:none;line-height:6mm}
.dce-print-clist li{margin:0;padding-left:5.5mm;text-indent:-5.5mm}
/* 問題：1問17mm×10段。各問の中は、1行目（番号9mm・わり算の式74mm・問題文72mm・答えを書く欄20mm）と、2行目（選択肢4つ、各44mm。C群は空ける）。 */
.dce-print-problems{display:grid;grid-template-rows:repeat(10,17mm);flex:none;height:170mm}
.dce-print-cell{display:flex;flex-direction:column;height:17mm;overflow:hidden;box-sizing:border-box;padding-top:1.5mm;font-size:12.5pt}
.dce-print-top{display:grid;grid-template-columns:9mm 74mm 72mm 20mm;height:6mm;line-height:6mm;white-space:nowrap}
.dce-print-number{font-weight:700}
.dce-print-rel{font-weight:700;overflow:hidden}
.dce-print-prompt{overflow:hidden}
.dce-print-answer{display:flex;align-items:center;justify-content:flex-end}
.dce-print-box{display:inline-flex;align-items:center;white-space:pre;height:6mm;line-height:6mm}
.dce-print-box-space{display:inline-block;min-width:9mm;height:6mm;white-space:pre}
.dce-print-choices{display:grid;grid-template-columns:repeat(4,44mm);margin-left:9mm;height:6mm;line-height:6mm;white-space:nowrap}
.dce-print-choice{overflow:hidden}
.dce-print-answers{flex:none;box-sizing:border-box;font-size:12.5pt}
.dce-print-dashed{box-sizing:content-box;display:block;height:0;margin:0.8mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.dce-print-answers-title{margin:0;height:6mm;line-height:6mm;font-weight:700}
.dce-print-answers-row{display:flex;align-items:center;height:6mm;line-height:6mm;white-space:nowrap}
.dce-print-ans{display:inline-block;width:18mm;flex:none}
.dce-app-pdf-page .dce-print-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="division_check_equation3_4"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="division_check_equation3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="division_check_equation3_4"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白10mmを白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="division_check_equation3_4"] .dce-print-page{box-shadow:0 0 0 10mm #fff,0 0 4px 10mm rgba(0,0,0,.12);margin-bottom:calc(8mm + 10mm)}
@media print{
  #page-print #pr-sheet[data-unit="division_check_equation3_4"]{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;transform:none!important;box-shadow:none!important}
  #page-print #pr-sheet[data-unit="division_check_equation3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="division_check_equation3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="division_check_equation3_4"] .dce-print-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
