/* ── fraction_remainder_gap_word3_4（分数の文章題で残りとへだたりを求めよう、単元仕様書 v1.8）── */
/* 画面：問題文、線分図、図の下の説明、答えの欄（分数の文字1つ）と単位、案内と共通のテンキー（数字・斜線・空白）。回答後は正誤・正しい答え・解説。読み上げは対象（§5-3・§7）。 */
#question-text .frg-q{display:block;overflow-wrap:anywhere}
.frg-nb{white-space:nowrap}
.frg-frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;margin:0 .12em;line-height:1.05;font-variant-numeric:tabular-nums}
.frg-frac .frg-num{display:block;padding:0 .2em;border-bottom:.09em solid currentColor;text-align:center;min-width:1em}
.frg-frac .frg-den{display:block;padding:0 .2em;text-align:center;min-width:1em}
.frg-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:6px}
.frg-figure{width:100%;max-width:460px}
.frg-fig{display:block;width:100%;height:auto}
.frg-svg-text{font-weight:800;fill:#111;font-family:inherit}
.frg-alt{margin:0;font-size:14px;line-height:1.9;color:#334155;text-align:center;max-width:520px;overflow-wrap:anywhere}
.frg-field{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:1.15rem}
.frg-input{width:7.5em;min-height:48px;font-size:1.4rem;padding:0 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;font-weight:800;box-sizing:border-box}
.frg-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.frg-input.frg-ok,.frg-input.frg-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.frg-input.frg-ng,.frg-input.frg-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.frg-unit{font-size:18px;font-weight:800}
.frg-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center}
.frg-guide[hidden]{display:none}
.frg-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.5;max-width:560px}
.frg-msg:empty{min-height:0;margin:0}
.frg-main .ufk-keypad{margin-top:4px}
.feedback.has-text.frg-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.frg-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.frg-expl-text{margin:4px 0 6px;line-height:2.1;overflow-wrap:anywhere;word-break:normal;line-break:strict}
.frg-example .frg-ex{margin:6px 0 10px;line-height:2}
#page-quiz.active:has(.frg-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict;font-size:17px;line-height:2}
#page-quiz.active:has(.frg-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.frg-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.frg-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.frg-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="fraction_remainder_gap_word3_4"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="fraction_remainder_gap_word3_4"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}

/* 印刷（A4縦・2列・1ページ。§7） */
.frg-pr-page{width:190mm;box-sizing:border-box;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;display:flex;flex-direction:column}
.frg-pr-headrow{display:flex;flex-direction:column;gap:0}
.frg-pr-title{box-sizing:border-box;font-size:14pt;margin:0;height:7mm;line-height:6mm;text-align:center;font-weight:700;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.frg-pr-headrow .pp-fields{height:6mm;margin:0.5mm 0 0}
.frg-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:0.8mm 0 1.5mm!important;border:0;border-top:1.2pt solid #333}
.frg-pr-inst{font-size:12.5pt;line-height:5.3mm;margin:0 0 1.5mm;padding:0 1mm}
.frg-pr-problems{display:flex;gap:4mm;justify-content:center}
.frg-pr-col{width:91mm;display:flex;flex-direction:column;gap:0}
.frg-pr-cell{box-sizing:border-box;width:91mm;height:42mm;border:0.35mm solid transparent;border-radius:1.5mm;padding:0.8mm 1.6mm;overflow:hidden;break-inside:avoid;display:flex;flex-direction:column}
.frg-pr-q{flex:none;font-size:12.5pt;line-height:5.3mm;max-height:21.6mm;overflow:hidden}
.frg-pr-row{flex:none;display:flex;align-items:center;gap:1.5mm;margin-top:auto;margin-bottom:0.5mm;height:18mm}
.frg-pr-fig{width:46mm;flex:none}
.frg-pr-fig .frg-fig{width:46mm;height:auto}
.frg-pr-ans{display:flex;align-items:center;gap:1mm;font-size:12.5pt;white-space:nowrap}
.frg-pr-anslab{font-size:12.5pt;font-weight:700}
.frg-pr-whole{display:inline-block;width:6mm;height:8mm;border:2px solid #000;box-sizing:border-box}
.frg-pr-frac{display:inline-flex;flex-direction:column;align-items:center;gap:0.5mm}
.frg-pr-box{display:inline-block;width:10mm;height:6mm;border:2px solid #000;box-sizing:border-box}
.frg-pr-bar{display:block;width:12mm;border-top:2px solid #000}
.frg-pr-unit{font-size:12.5pt}
.frg-pr-answers{margin-top:2mm;border-top:0.3mm dashed #666;padding-top:1mm}
.frg-pr-anshead{font-size:12.5pt;font-weight:700;line-height:5.3mm}
.frg-pr-acols{display:flex;gap:4mm}
.frg-pr-acol{width:91mm}
.frg-pr-answer{margin:0;font-size:10pt;line-height:4.5mm}
#pr-sheet[data-unit="fraction_remainder_gap_word3_4"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="fraction_remainder_gap_word3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="fraction_remainder_gap_word3_4"]>#pr-problems{display:block}
#pr-sheet[data-unit="fraction_remainder_gap_word3_4"] .frg-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="fraction_remainder_gap_word3_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="fraction_remainder_gap_word3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="fraction_remainder_gap_word3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="fraction_remainder_gap_word3_4"] .frg-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.frg-app-pdf-page .frg-pr-page{box-shadow:none;margin:0}
