/* ── remainder_ratio_chain3_5（残りを基準に全体を求めよう、単元仕様書 v1.2）── */
/* 画面：問題文、二だんの帯図、A群・B群は答えの欄と単位と共通のテンキー、C群は4択（番号1〜4）、案内。回答後は正しい答えと解説（§5-3・§7）。 */
#question-text .rrch-q{display:block;overflow-wrap:anywhere}
.rrch-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:6px}
.rrch-field{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:1.2rem}
.rrch-input{width:6em;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}
.rrch-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.rrch-input.rrch-ok,.rrch-input.rrch-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.rrch-input.rrch-ng,.rrch-input.rrch-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.rrch-choices{display:flex;flex-direction:column;gap:8px;width:min(100%,480px);margin:2px auto}
.rrch-choice{position:relative;box-sizing:border-box;min-height:48px;padding:6px 10px 6px 34px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.05rem;font-weight:800;text-align:left;cursor:pointer;overflow-wrap:anywhere}
.rrch-check{position:absolute;top:50%;left:10px;transform:translateY(-50%);font-size:18px;font-weight:900;color:#1d4ed8}
.rrch-choice.rrch-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.rrch-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.rrch-choice:disabled{cursor:default;opacity:1}
.rrch-choice.rrch-ok,.rrch-choice.rrch-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.rrch-choice.rrch-ng,.rrch-choice.rrch-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.rrch-choice.rrch-right,.rrch-choice.rrch-right:disabled{border:3px dashed #15803d;background:#fff;color:#14532d}
.rrch-ok .rrch-check,.rrch-right .rrch-check{color:#15803d}
.rrch-ng .rrch-check{color:#b91c1c}
.rrch-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center}
.rrch-guide[hidden]{display:none}
.rrch-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.4;max-width:560px}
.rrch-msg:empty{min-height:0;margin:0}
.rrch-main .ufk-keypad{margin-top:4px}
.feedback.has-text.rrch-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.rrch-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.rrch-expl-text{margin:4px 0 6px;overflow-wrap:anywhere;word-break:normal;line-break:strict}
.rrch-score{margin:6px 0 2px;font-weight:800;color:#1e3a8a}
.rrch-example .rrch-ex-q{margin:6px 0 2px;font-weight:700}
.rrch-example .rrch-ex-a{margin:0 0 8px}
#page-quiz.active:has(.rrch-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.rrch-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.rrch-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.rrch-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.rrch-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz.active:has(.rrch-main) #tts-btn{min-width:44px;min-height:44px}
#page-quiz:has(#question-text[data-unit="remainder_ratio_chain3_5"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="remainder_ratio_chain3_5"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}


.rrch-figwrap{max-width:100%;overflow-x:auto}
.rrch-fig{display:block;max-width:100%;height:auto;font-family:inherit}
.rrch-fig text{fill:#111827}
/* 分数：文字は直線の形（1/3）で持ち、見た目だけを分子・横線・分母の3段にする（§7） */
.rrch-frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;line-height:1.05;margin:0 .1em;font-size:.85em;position:relative}
.rrch-frac::before{content:attr(data-n);display:block;padding:0 .15em;border-bottom:.09em solid currentColor}
.rrch-frac::after{content:attr(data-d);display:block;padding:0 .15em}
.rrch-nw{white-space:nowrap}
.rrch-expl-line{margin:2px 0}
.rrch-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.rrch-choice{word-break:keep-all;line-break:strict}
.rrch-expl-text,.rrch-correct{line-height:1.9}
#question-text .rrch-q{line-height:2}
.rrch-cno{display:inline-flex;align-items:center;justify-content:center;min-width:1.35em;height:1.35em;border:1.5px solid currentColor;border-radius:50%;font-weight:800;font-size:.85em;line-height:1;margin-right:.1em;vertical-align:middle}
/* 印刷：A4縦・2列・1ページ（§7）。題名の枠と記入欄、共通の問い、2列×5段（1行目、帯図、C群は選択肢2行2列）、破線、答え（2行）。 */
.rrch-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}
.rrch-pr-headrow{display:flex;flex-direction:column;gap:0;flex:none}
.rrch-pr-headrow .pp-fields{height:7mm;margin:1mm 0 0}
.rrch-pr-headrow .pp-field-line{height:6mm}
.rrch-pr-headrow hr.pp-fields-solid{margin:1mm 0 0!important;border:0;border-top:1.5pt solid #333}
.rrch-pr-title{box-sizing:border-box;margin:0;height:8mm;width:100%;padding:0 2mm;font-size:14pt;font-weight:700;line-height:7.4mm;white-space:nowrap;text-align:center;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact;flex:none}
.rrch-pr-inst{flex:none;box-sizing:border-box;margin:1mm 0 1mm;font-size:12.5pt;line-height:5mm}
.rrch-pr-problems{flex:none;display:grid;grid-template-columns:92mm 92mm;column-gap:3mm}
.rrch-pr-col{display:flex;flex-direction:column}
.rrch-pr-cell{box-sizing:border-box;height:36mm;border-top:2px solid transparent;padding:1mm 0 0;overflow:hidden;display:flex;flex-direction:column;gap:0.8mm;align-items:flex-start}
.rrch-pr-col .rrch-pr-cell:last-child{border-bottom:2px solid transparent}
/* C群（式の4択つき）は高い領域にする。右の列は B群2問（36mm）＋C群3問（50.8mm）＝224.4mm で、左の列（36mm×5）より高いが用紙に収まる */
.rrch-pr-cell[data-rrch-group="C"]{height:50.8mm}
.rrch-pr-line{font-size:12.5pt;font-weight:700;line-height:7mm;margin-bottom:-0.4mm;white-space:nowrap}
.rrch-pbox{display:inline-block;box-sizing:border-box;width:20mm;height:7mm;border:2px solid #000;vertical-align:middle;margin:0 1mm}
.rrch-pr-fig{display:block;flex:none;width:88mm;height:auto;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.rrch-pr-choices{display:grid;grid-template-columns:auto auto;column-gap:5mm;row-gap:0.5mm}
.rrch-pr-choice{font-size:12.5pt;line-height:5.7mm;white-space:nowrap}
.rrch-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5mm}
.rrch-pr-dashed{box-sizing:content-box;display:block;height:0;margin:1.5mm 0 0.6mm;padding:0;border:0;border-top:2pt dashed #aaa}
.rrch-pr-ansbody{display:grid;grid-template-columns:auto 1fr;column-gap:3mm;align-items:start}
.rrch-pr-ansrow{display:grid;grid-template-columns:repeat(5,1fr);column-gap:1mm}
.rrch-pr-anshead{font-weight:700;font-size:12.5pt;line-height:6mm;white-space:nowrap}
.rrch-pr-ans{font-size:10pt;line-height:5mm;white-space:nowrap}
.rrch-app-pdf-page .rrch-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="remainder_ratio_chain3_5"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="remainder_ratio_chain3_5"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="remainder_ratio_chain3_5"]>#pr-problems{display:block}
#pr-sheet[data-unit="remainder_ratio_chain3_5"] .rrch-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="remainder_ratio_chain3_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="remainder_ratio_chain3_5"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="remainder_ratio_chain3_5"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="remainder_ratio_chain3_5"] .rrch-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
