/* ── money_change_initial_inverse_1（おかねの のこりと もとを ぎゃくに かんがえよう、単元仕様書 v1.2）── */
/* 画面：共通の問い・問題文の下に三枠図、入力の案内、しき の欄・＝・こたえ の欄と単位、画面のキー（§7 画面表示）。 */
.mcii-common{margin:0 0 4px;font-weight:700;font-size:15px;color:#1e3a8a;line-height:1.45}
.mcii-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.mcii-fig{box-sizing:border-box;width:min(100%,340px);border:2px solid #475569;border-radius:10px;background:#fff;overflow:hidden;margin:2px 0 6px}
.mcii-fig-top{border-bottom:2px solid #475569}
.mcii-fig-bottom{display:flex}
.mcii-fig-bottom>.mcii-fig-cell{flex:1 1 50%;min-width:0}
.mcii-fig-bottom>.mcii-fig-cell+.mcii-fig-cell{border-left:2px solid #475569}
.mcii-fig-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 6px;min-height:58px;box-sizing:border-box}
.mcii-fig-label{font-size:14px;font-weight:700;line-height:1.3;white-space:nowrap}
.mcii-fig-value{font-size:1.35rem;font-weight:700;line-height:1.4;white-space:nowrap}
/* わからない枠：「？」と太い点線（色だけにせず、線の形と文字でも区別する。§5-5）。 */
.mcii-fig-unknown{background:#fef9c3;outline:3px dashed #b45309;outline-offset:-5px}
.mcii-fig-unknown .mcii-fig-value{font-size:1.6rem;color:#92400e}
.mcii-guide{margin:2px 0 4px;font-weight:700;font-size:15px;text-align:center}
.mcii-fields{display:flex;flex-direction:column;gap:6px;align-items:stretch}
.mcii-row{display:flex;align-items:center;gap:6px;justify-content:flex-start}
.mcii-label{flex:none;min-width:4.5em;font-weight:700;font-size:15px;white-space:nowrap;text-align:right}
.mcii-eq{flex:none;font-size:1.3rem;font-weight:700;margin-left:-4px}
.mcii-input{min-height:44px;font-size:1.35rem;padding:2px 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;box-sizing:border-box}
.mcii-input-expr{width:8.5em}
.mcii-input-answer{width:4em}
.mcii-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.mcii-input.mcii-active{outline:3px solid #f59e0b;outline-offset:1px}
.mcii-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
/* 採点後：正しい欄は緑の実線、まちがえた欄は赤の点線の太い枠（色だけにせず線の形でも区別する）。 */
.mcii-input.mcii-ok,.mcii-input.mcii-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.mcii-input.mcii-ng,.mcii-input.mcii-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.mcii-unit{font-weight:700;font-size:1.1rem}
.mcii-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center}
.mcii-msg:empty{min-height:0;margin:0}
.mcii-keypad{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;width:100%;max-width:300px;margin:12px auto 0}
.mcii-keypad[hidden]{display:none}
.mcii-key{font-family:var(--font-ui)}
.mcii-key-clear{grid-column:span 3;font-size:1rem}
.feedback.has-text.mcii-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.mcii-correct{margin:4px 0;font-weight:700;overflow-wrap:anywhere}
.mcii-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.mcii-example-answer{margin:6px 0 0;font-weight:700}
.lesson-card .mcii-fig{margin:4px 0;width:100%;max-width:340px;flex:none}
/* 学習内容の例題の図：狭い画面では札を折り返し、欄が縮んでも文字を欠けさせない（独立検査 MCII-IR1-02）。 */
.lesson-card .mcii-fig-label,.lesson-card .mcii-fig-value{white-space:normal;text-align:center;overflow-wrap:anywhere}
.lesson-card:has(.mcii-fig){padding-left:8px;padding-right:8px}
.lesson-example:has(.mcii-fig){padding-left:6px;padding-right:6px}
.lesson-example:has(.mcii-fig)>div:has(>.mcii-fig){padding-left:6px!important;padding-right:6px!important}
#page-quiz.active:has(.mcii-main) #question-text,#page-quiz.active:has(.mcii-main) #hint-area .kp-body,#page-quiz.active:has(.mcii-main) #feedback,.mcii-expl-text,.mcii-correct,.mcii-common{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.mcii-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.mcii-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.mcii-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.mcii-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
@media (max-width:360px){
  .mcii-label{min-width:0}
  .mcii-input-expr{width:7.5em}
}

/* 印刷：A4縦・1ページ（§7。用紙の余白 上下5mm・左右6mm、本文198×287mm、2列×5段、1段44mm、図の幅48mm、記入枠の高さ10mm以上）。 */
.mcii-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}
.mcii-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19mm}
.mcii-pr-title{box-sizing:border-box;margin:0;height:9mm;font-size:15pt;font-weight:700;line-height: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}
.mcii-pr-fields{display:flex;gap:6mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12pt;line-height:6mm;white-space:nowrap}
.mcii-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.mcii-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.mcii-pr-field-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:1pt solid #555}
.mcii-field-name{flex:1;min-width:0}
.mcii-field-name .mcii-pr-field-line{flex:1;width:auto;min-width:40mm}
.mcii-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.mcii-pr-common{flex:none;margin:0;height:8mm;line-height:8mm;font-size:13pt;font-weight:700;white-space:nowrap}
.mcii-pr-problems{display:flex;gap:6mm;flex:none;height:210.5mm}
.mcii-pr-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column}
.mcii-pr-cell{box-sizing:border-box;height:42.1mm;display:flex;flex-direction:column;padding:0.6mm 0 0.6mm;border-bottom:0.2mm solid transparent;overflow:hidden}
.mcii-pr-q{flex:none;height:18.6mm;font-size:12.6pt;line-height:6.2mm;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
.mcii-pr-num{font-weight:700;margin-right:1.5mm}
.mcii-pr-band{flex:none;display:flex;align-items:center;gap:2.5mm;height:21.5mm;margin-top:0.8mm}
.mcii-pr-fig{flex:none;box-sizing:border-box;width:48mm;height:21mm;border:0.35mm solid #333;border-radius:1mm;display:flex;flex-direction:column;overflow:hidden}
.mcii-pr-fig-top{flex:1;border-bottom:0.35mm solid #333;display:flex}
.mcii-pr-fig-bottom{flex:1;display:flex}
.mcii-pr-fig-cell{flex:1 1 50%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1}
.mcii-pr-fig-bottom>.mcii-pr-fig-cell+.mcii-pr-fig-cell{border-left:0.35mm solid #333}
.mcii-pr-fig-label{font-size:9pt;white-space:nowrap}
.mcii-pr-fig-value{font-size:11pt;font-weight:700;white-space:nowrap}
.mcii-pr-fig-unknown{position:relative}
/* わからない枠の点線は border で描く（アプリPDFの html2canvas は outline を描かないため）。 */
.mcii-pr-fig-unknown::after{content:'';position:absolute;left:0.2mm;top:0.2mm;right:0.2mm;bottom:0.2mm;border:0.45mm dashed #333;pointer-events:none}
.mcii-pr-writes{flex:1;min-width:0;display:flex;flex-direction:column;gap:1mm}
.mcii-pr-wrow{display:flex;align-items:center;gap:1.2mm;height:10.3mm}
.mcii-pr-wlabel{flex:none;width:11.5mm;font-size:10.5pt;font-weight:700;white-space:nowrap}
.mcii-pr-page[lang="en"] .mcii-pr-wlabel{width:13mm;font-size:9pt;white-space:normal;line-height:1.05}
.mcii-pr-box{display:inline-block;box-sizing:border-box;height:10.3mm;border:0.35mm solid #333;background:#fff}
.mcii-pr-box-expr{flex:1;min-width:20mm}
.mcii-pr-box-answer{width:16mm}
.mcii-pr-unit{font-size:11pt;white-space:nowrap}
.mcii-pr-answers{flex:none;box-sizing:border-box;height:37mm}
.mcii-pr-dashed{box-sizing:content-box;display:block;height:0;margin:1.5mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.mcii-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:5.5mm;height:5.5mm}
.mcii-pr-answers-grid{display:flex;gap:6mm}
.mcii-pr-ans-col{flex:1 1 0;min-width:0}
.mcii-pr-ans{height:5.8mm;line-height:5.8mm;font-size:12.6pt;white-space:nowrap;overflow:hidden}
.mcii-app-pdf-page .mcii-pr-page{box-shadow:none;margin:0}

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