/* ── fraction_component_inverse2_5（分子と分母の変化から未知成分を逆算しよう、単元仕様書 v1.2）── */
/* 画面：問題文の下に、カードのならび（A群・B群）または二つの式（C群）、和の式（B群）、答えの欄、回答案内、テンキー、「こたえる！」（§7 画面表示）。
   分数は分子・横線・分母の3段。ラベル・カード・上下の対応線・等号・示す分数は、どれも同じ高さの3段の箱にして、分子どうし・分母どうしの段をそろえる。 */
.fci-main{margin:6px auto 4px;max-width:100%}
.fci-figure{display:flex;flex-direction:column;align-items:center;margin:4px auto;max-width:100%}
.fci-cards{display:grid;grid-template-columns:repeat(6,auto);grid-template-rows:auto auto;align-items:end;justify-content:center;column-gap:6px;row-gap:2px}
.fci-cap{display:block;min-height:1.3em;line-height:1.3em;font-size:.85rem;font-weight:700;text-align:center;white-space:nowrap;color:#1e3a8a}
.fci-frac{--fci-row:1.45em;display:inline-grid;grid-template-rows:var(--fci-row) 2px var(--fci-row);align-items:center;justify-items:center;box-sizing:border-box;padding:3px 6px;border:2px solid transparent;font-size:1.2rem;font-weight:700;line-height:var(--fci-row);white-space:nowrap;vertical-align:middle}
.fci-fn,.fci-fd{display:block;min-width:1.2em;padding:0 2px;text-align:center}
.fci-fbar{display:block;width:100%;height:0;border-top:2px solid #111827}
.fci-fbar-none{border-top-color:transparent}
.fci-card{border-color:#1e3a8a;border-width:1.5px;border-radius:6px;background:#eff6ff}
.fci-card-after{background:#fffbeb;border-color:#b45309}
.fci-labels{padding-left:0;padding-right:0;font-size:.8rem;color:#374151}
.fci-labels .fci-fn,.fci-labels .fci-fd{padding:0;text-align:right;justify-self:end}
.fci-link{padding-left:0;padding-right:0;width:28px}
.fci-link .fci-fn,.fci-link .fci-fd{width:100%;min-width:0;padding:0;display:flex;align-items:center}
.fci-link-line{display:block;width:100%;height:0;border-top:2px solid #6b7280}
.fci-sign{display:inline-block;font-size:1.2rem;font-weight:700;align-self:center;padding:0 2px}
.fci-cards>.fci-sign{align-self:end;line-height:calc(1.45em * 2 + 2px + 10px)}
.fci-cond{margin:6px 0 0;font-size:1.2rem;font-weight:700;text-align:center}
.fci-c-line{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:4px;row-gap:4px}
.fci-eq,.fci-eq-wrap{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}
.fci-fields{display:flex;justify-content:center;align-items:center;gap:8px;margin:6px auto 2px;font-size:1.2rem;font-weight:700}
.fci-input{width:4.5em;max-width:60vw;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}
.fci-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.fci-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.fci-input.fci-input-ok{border:3px solid #15803d;background:#dcfce7}
.fci-input.fci-input-ng{border:3px dashed #b91c1c;background:#fff1f2}
.fci-guide{margin:6px auto 4px;font-weight:700;text-align:center;max-width:32em}
.fci-msg{margin:2px auto 0;color:#b91c1c;font-weight:700;font-size:.95rem;text-align:center;max-width:32em}
.fci-msg:empty{display:none}
.feedback.has-text.fci-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.fci-correct{margin:2px 0 6px;font-weight:700}
.fci-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
/* 文の中の分数（問題文・解説・例題）も3段で示す。 */
.fci-ifrac{display:inline-block;vertical-align:middle;margin:0 .1em}
.fci-ifrac-v{display:inline-flex;flex-direction:column;align-items:center;line-height:1.05;font-size:.92em}
.fci-ifn{display:block;padding:0 .15em;border-bottom:.1em solid currentColor}
.fci-ifd{display:block;padding:0 .15em}
.fci-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#question-text .fci-ifrac{margin:.1em .12em}
.fci-lesson-ex{display:block;margin-top:6px}
.fci-lesson-q{display:block;font-weight:700;overflow-wrap:anywhere}
.fci-lesson-a{display:block;overflow-wrap:anywhere}
#page-quiz.active:has(.fci-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.fci-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.fci-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.fci-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;overflow-wrap:anywhere}
/* 360 CSS px 前後でも、カードのならびと上下の対応線を1行に保つ（§7。少しだけ字と間を小さくする）。 */
@media (max-width:400px){
  .fci-cards{column-gap:3px}
  .fci-frac{font-size:1.05rem;padding:3px 4px}
  .fci-labels{font-size:.72rem}
  .fci-link{width:16px}
  .fci-cap{font-size:.75rem}
}

/* 印刷：A4縦・2列×5段・1ページ（§7。用紙の余白10mm、本文190×277mm、各列91mm・列の間4mm、各問の領域42mm：
   番号と答えのわくの行7mm、間2mm、カードの見出し4mm、3段の分数の行13mm、間2mm、和の行5mm、余り9mm。答えは2行に5件ずつ）。 */
.fci-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}
.fci-pr-head{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm}
.fci-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}
.fci-pr-head hr.pp-fields-solid{margin:1mm 0!important}
.fci-pr-inst{flex:none;box-sizing:border-box;margin:0;height:15.9mm;font-size:12.6pt;line-height:5.3mm;overflow:hidden}
.fci-pr-problems{display:grid;grid-template-columns:91mm 91mm;column-gap:4mm;flex:none;margin-top:5mm}
.fci-pr-col{display:grid;grid-template-rows:repeat(5,42mm)}
.fci-pr-cell{box-sizing:border-box;height:42mm;overflow:hidden;display:flex;flex-direction:column;align-items:stretch}
.fci-pr-row1{display:flex;justify-content:space-between;align-items:center;height:7mm;flex:none;font-size:12.6pt;font-weight:700;white-space:nowrap}
.fci-pr-ansslot{display:flex;align-items:center;gap:1mm;margin-right:2mm}
.fci-pr-box{display:inline-block;box-sizing:border-box;width:18mm;height:7mm;border:0.35mm solid #000}
.fci-pr-fig{margin-top:2mm;flex:none}
.fci-pr-cell .fci-figure{align-items:flex-start;margin:0}
.fci-pr-cell .fci-cards{justify-content:start;column-gap:1.5mm;row-gap:0}
.fci-pr-cell .fci-cap{min-height:4mm;height:4mm;line-height:4mm;font-size:9pt;color:#000}
.fci-pr-cell .fci-frac{--fci-row:4.5mm;grid-template-rows:4.5mm 1mm 4.5mm;height:13mm;padding:1.25mm 1mm;border-width:0.25mm;font-size:12.6pt;line-height:4.5mm}
.fci-pr-cell .fci-fbar{border-top:0.35mm solid #000}
.fci-pr-cell .fci-fbar-none{border-top-color:transparent}
.fci-pr-cell .fci-card,.fci-pr-cell .fci-card-after{border:0.35mm solid #000;border-radius:0;background:#fff}
.fci-pr-cell .fci-labels{padding-left:0;padding-right:0;font-size:12.6pt;color:#000}
.fci-pr-cell .fci-link{width:5mm;padding-left:0;padding-right:0}
.fci-pr-cell .fci-link-line{border-top:0.35mm solid #000}
.fci-pr-cell .fci-sign{font-size:12.6pt}
.fci-pr-cell .fci-cards>.fci-sign{line-height:13mm;height:13mm}
.fci-pr-cell .fci-cond{margin:2mm 0 0;height:5mm;line-height:5mm;font-size:12.6pt}
.fci-pr-cell .fci-figure-C{margin-top:4mm}
.fci-pr-cell .fci-c-line{flex-wrap:nowrap;justify-content:flex-start;column-gap:1.5mm}
.fci-pr-answers{flex:none;box-sizing:border-box;margin-top:2mm}
.fci-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.5mm;padding:0;border:0;border-top:2pt dashed #aaa}
.fci-pr-answers-title{font-weight:700;font-size:12.6pt;height:5.3mm;line-height:5.3mm}
.fci-pr-ans-row{display:grid;grid-template-columns:repeat(5,36mm);column-gap:1.5mm}
.fci-pr-ans{margin:0;font-size:10.2pt;line-height:4.5mm;height:4.5mm;white-space:nowrap;overflow:hidden}
.fci-app-pdf-page .fci-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="fraction_component_inverse2_5"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="fraction_component_inverse2_5"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="fraction_component_inverse2_5"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白10mmを白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="fraction_component_inverse2_5"] .fci-pr-page{box-shadow:0 0 0 10mm #fff,0 0 4px 10mm rgba(0,0,0,.12);margin-bottom:calc(8mm + 10mm)}
/* 印刷の紙面は、画面の幅によらず同じ寸法にする（狭い画面の字の縮小を紙面に持ちこまない）。 */
@media (max-width:400px){
  .fci-pr-cell .fci-cards{column-gap:1.5mm}
  .fci-pr-cell .fci-frac{font-size:12.6pt;padding:1.25mm 1mm}
  .fci-pr-cell .fci-labels{font-size:12.6pt;padding-left:0;padding-right:0}
  .fci-pr-cell .fci-link{width:5mm}
  .fci-pr-cell .fci-cap{font-size:9pt}
}
@media print{
  #page-print #pr-sheet[data-unit="fraction_component_inverse2_5"]{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="fraction_component_inverse2_5"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="fraction_component_inverse2_5"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="fraction_component_inverse2_5"] .fci-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
