/* ── expression_missing_part_inverse3_3（式のかけた数や記号をぎゃく算しよう、単元仕様書 v1.2）── */
/* 画面：問題文（文、改行して式、改行して答え方の指示）の下に、A群・C群は数の欄とテンキー、B群は記号4つのボタン。どちらも「こたえる！」で採点する（§5-1・§7）。図は使わない。 */
.emi-main{display:none}
.emi-fields{display:flex;justify-content:center;align-items:center;gap:8px;margin:6px auto 2px}
.emi-input{width:6em;max-width:70vw;min-height:44px;font-size:1.4rem;padding:4px 8px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:10px;text-align:center;font-family:inherit;box-sizing:border-box}
.emi-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.emi-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.emi-input.emi-input-ok{border:3px solid #15803d;background:#dcfce7}
.emi-input.emi-input-ng{border:3px dashed #b91c1c;background:#fff1f2}
.emi-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.emi-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:22rem;margin:6px auto 2px}
.emi-choice{display:flex;align-items:center;justify-content:center;gap:4px;min-height:52px;padding:4px 6px;border:2px solid #94a3b8;border-radius:12px;background:#fff;color:#111827;font-size:1.6rem;font-weight:700;font-family:inherit;cursor:pointer;min-width:0}
.emi-choice:hover:not(:disabled){border-color:#1d4ed8;background:#eff6ff}
.emi-choice:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.emi-choice:disabled{cursor:default;opacity:1;color:#111827}
.emi-choice.emi-choice-correct{border:3px solid #15803d;background:#dcfce7}
.emi-choice.emi-choice-wrong{border:3px dashed #b91c1c;background:#fff1f2}
.emi-choice.emi-choice-selected{box-shadow:0 0 0 2px #111827 inset}
.emi-choice.emi-choice-selected:not(:disabled){border-color:#1d4ed8;background:#dbeafe;box-shadow:0 0 0 2px #1d4ed8 inset}
.emi-choice-tag{font-size:1rem;font-weight:900}
.emi-msg{margin:2px auto 0;color:#b91c1c;font-weight:700;font-size:.95rem;text-align:center;max-width:32em}
.emi-msg:empty{display:none}
.feedback.has-text.emi-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.emi-correct{margin:2px 0 6px;font-weight:700}
.emi-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.emi-lesson-ex{display:inline-block;margin-top:4px;font-weight:700;overflow-wrap:anywhere}
.emi-lesson-ref{margin:4px 0 0;font-size:.9em;color:#475569}
/* 問題文は画面の幅で折り返す（320×568で横スクロール0・はみ出し0。§7 画面表示）。 */
#page-quiz.active:has(.emi-main) #question-text{line-break:strict;overflow-wrap:anywhere}
#page-quiz.active:has(.emi-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.emi-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.emi-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.emi-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;white-space:pre-line;overflow-wrap:anywhere}

/* 印刷：A4縦・2列×5段・1ページ（§7。用紙の余白10mm、本文190×277mm、列92mm・列の間6mm。各問の領域はA群・C群34mm、B群42mm：
   枠線は2px（約0.53mm。0.35mmなどの指定は画面の1pxに丸められ、完成PDFで0.3mmを下回るため）。
   番号と式の行9mm、B群だけ選択肢の行8mm、答えを書く行9mm（（　）の中は幅24mm）、計算欄11mm、下の余り5mm。答えの行は10pt・2行まで8mm）。 */
.emi-pr-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}
.emi-pr-head{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:23.5mm}
.emi-pr-title{box-sizing:border-box;margin:0;height:9mm;font-size:14.3pt;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}
.emi-pr-inst{flex:none;box-sizing:border-box;margin:0;height:11mm;font-size:12.5pt;line-height:5.5mm;overflow:hidden}
.emi-pr-problems{display:grid;grid-template-columns:92mm 92mm;column-gap:6mm;flex:none;height:186mm;margin-top:2mm}
.emi-pr-col{display:flex;flex-direction:column}
.emi-pr-cell{box-sizing:border-box;height:34mm;overflow:hidden;display:flex;flex-direction:column;padding:0 3mm 5mm}
.emi-pr-cell.emi-pr-cell-b{height:42mm}
.emi-pr-choices{margin:0;height:8mm;display:flex;align-items:center;gap:3mm;font-size:12.5pt;font-weight:700}
.emi-pr-choice{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:8mm;height:7mm;border:2px solid #888;border-radius:1mm}
.emi-pr-q{margin:0;height:9mm;font-size:12.5pt;line-height:9mm;white-space:nowrap;font-weight:700;overflow:hidden}
.emi-pr-work{box-sizing:border-box;height:11mm;width:86mm;border:2px solid #888;border-radius:1mm;padding:0.5mm 1mm;flex:none}
.emi-pr-work-label{font-size:10pt;line-height:4mm;color:#333}
.emi-pr-ansline{margin:0;height:9mm;font-size:12.5pt;line-height:9mm;white-space:nowrap;display:flex;align-items:center;justify-content:flex-end;padding-right:0}
.emi-pr-anslabel{white-space:pre}
.emi-pr-paren{display:inline-flex;align-items:center;white-space:pre}
.emi-pr-box{display:inline-block;box-sizing:border-box;width:24mm;height:8mm}
.emi-pr-answers{flex:none;box-sizing:border-box;margin-top:2mm}
.emi-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.5mm;padding:0;border:0;border-top:2pt dashed #aaa}
.emi-pr-answers-title{font-weight:700;font-size:12.5pt;height:6mm;line-height:6mm}
.emi-pr-ans-grid{display:grid;grid-template-columns:92mm 92mm;column-gap:6mm}
.emi-pr-ans{box-sizing:border-box;margin:0;height:8mm;padding:0 3mm;font-size:10.2pt;line-height:4mm;overflow:hidden;overflow-wrap:anywhere}
.emi-app-pdf-page .emi-pr-page{box-shadow:none;margin:0}

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