/* ── race_rank_change3_1（おいこした あとの じゅんばんを もとめよう、単元仕様書 v1.3）── */
/* 画面：問題文（はじめの順序・追い越し文・問い）を1行ずつ、その下に順位レーン、4択、こたえる！（§7 画面表示）。 */
.question-text.rrc-question{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
.rrc-line{display:block}
.rrc-ask{margin-top:4px;font-weight:700}
.rrc-main{display:flex;flex-direction:column;align-items:center;gap:8px;margin:4px 0 6px;max-width:100%}
.rrc-lanes{display:grid;grid-template-columns:auto auto;row-gap:4px;column-gap:10px;align-items:center;padding:8px 14px;border:2px solid #cbd5e1;border-radius:12px;background:#f8fafc}
.rrc-lane{display:contents}
.rrc-rank{font-weight:700;font-size:1.05rem;color:#334155;text-align:right;min-width:2.6em}
.rrc-runner{display:inline-flex;align-items:center;gap:2px;white-space:nowrap;font-weight:700}
.rrc-lanes .rrc-runner{min-width:3.2em;padding:2px 10px;border:2px solid #1d4ed8;border-radius:999px;background:#eff6ff;font-size:1.2rem;justify-content:center}
.rrc-name{white-space:nowrap}
.rrc-arrow{margin:0 2px;color:#475569;font-weight:700}
.rrc-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-width:560px}
.rrc-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:48px;padding:6px 10px;border:2px solid #94a3b8;border-radius:12px;background:#fff;color:#111827;font-size:1.1rem;font-weight:700;font-family:inherit;cursor:pointer}
.rrc-choice:hover:not(:disabled){border-color:#1d4ed8;background:#eff6ff}
.rrc-choice:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.rrc-choice:disabled{cursor:default;opacity:1;color:#111827}
.rrc-choice.rrc-choice-correct{border:3px solid #15803d;background:#dcfce7}
.rrc-choice.rrc-choice-wrong{border:3px dashed #b91c1c;background:#fff1f2}
.rrc-choice.rrc-choice-selected{box-shadow:0 0 0 2px #111827 inset}
.rrc-choice.rrc-choice-selected:not(:disabled){border-color:#1d4ed8;background:#dbeafe;box-shadow:0 0 0 2px #1d4ed8 inset}
.rrc-choice-tag{font-weight:900;min-width:1.1em}
.rrc-choice-text{display:inline-flex;align-items:center;flex-wrap:nowrap;white-space:nowrap;min-width:0}
.rrc-response{margin:0;color:#475569;font-weight:700;text-align:center}
.feedback.has-text.rrc-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.feedback.has-text.rrc-feedback-empty{color:#b45309}
.rrc-answer-line{margin:4px 0 2px;font-weight:700;overflow-wrap:anywhere}
.rrc-expl-text{margin:2px 0 6px;overflow-wrap:anywhere}
.rrc-example{margin:6px 0 10px;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.rrc-example-answer{margin:0;overflow-wrap:anywhere}
#page-quiz.active:has(.rrc-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.rrc-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.rrc-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.rrc-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;overflow-wrap:anywhere}
@media (max-width:599px){
  .rrc-choices{grid-template-columns:minmax(0,1fr)}
  .rrc-choice{font-size:1.05rem}
}

/* 印刷：A4横・1ページ（§7。用紙の余白 上下5mm・左右6mm、本文285×200mm、2列×5段）。 */
.rrc-pr-page{width:277mm;height:190mm;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}
.rrc-pr-head{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:277mm;height:14.8mm}
.rrc-pr-title{box-sizing:border-box;margin:0;height:7mm;font-size:14pt;font-weight:700;line-height:6.2mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.rrc-pr-fields{display:flex;gap:8mm;align-items:flex-end;height:6.4mm;margin-top:0.2mm;font-size:12pt;line-height:5.4mm;white-space:nowrap}
.rrc-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.rrc-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.rrc-pr-field-line{display:inline-block;box-sizing:border-box;width:14.5mm;height:6.2mm;border-bottom:1pt solid #555}
.rrc-field-name{flex:1;min-width:0}
.rrc-field-name .rrc-pr-field-line{flex:1;width:auto;min-width:60mm}
.rrc-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:0.6mm 0 0}
.rrc-pr-common{flex:none;margin:0;height:5.4mm;line-height:5.4mm;font-size:12.5pt;font-weight:700}
.rrc-pr-problems{display:grid;grid-template-columns:136.5mm 136.5mm;column-gap:4mm;flex:none;height:147mm}
.rrc-pr-col{display:flex;flex-direction:column}
/* 1段29.4mm＝枠線0.6＋順位レーンと文章19.0（4行×4.75）＋4択9.8（§7）。 */
.rrc-pr-cell{box-sizing:border-box;height:29.4mm;margin-bottom:0;padding:0 0.6mm;border:0.3mm solid transparent;border-radius:1mm;overflow:hidden;display:flex;flex-direction:column}
.rrc-pr-top{display:flex;gap:1.5mm;height:19mm;flex:none}
.rrc-pr-lanes{flex:none;width:22mm;display:grid;grid-template-columns:9.5mm 1fr;column-gap:0.5mm;grid-auto-rows:4.75mm;align-items:center;font-size:12pt}
.rrc-pr-lane{display:contents}
.rrc-pr-rank{font-weight:700;font-size:13pt;white-space:nowrap}
.rrc-pr-runner{display:inline-flex;align-items:center;gap:0.3mm;white-space:nowrap;font-weight:700}
.rrc-pr-lanes .rrc-pr-runner{font-size:13pt}
.rrc-pr-text{flex:1;min-width:0;display:flex;flex-direction:column}
.rrc-pr-start{margin:0;height:4.75mm;line-height:4.75mm;font-size:12.5pt;white-space:nowrap;overflow:hidden}
.rrc-pr-pass-row{display:flex;align-items:center;gap:2mm;height:4.75mm}
.rrc-pr-pass{flex:none;font-size:12.5pt;line-height:4.75mm;white-space:nowrap}
.rrc-pr-record{flex:none;display:inline-block;box-sizing:border-box;width:40mm;height:4.4mm;border:0.3mm solid #555;margin-left:auto}
.rrc-pr-choices{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:4.75mm 4.75mm;row-gap:0.3mm;column-gap:2mm;flex:none;height:9.8mm;padding-bottom:0}
.rrc-pr-choice{display:flex;align-items:center;justify-content:center;font-size:12.5pt;line-height:1;white-space:nowrap;border:0;border-radius:0.8mm;background:#ececec;print-color-adjust:exact;-webkit-print-color-adjust:exact;margin:0;box-sizing:border-box}
.rrc-pr-arrow{margin:0 0.6mm}
.rrc-pr-choice .rrc-pr-runner,.rrc-pr-ans .rrc-pr-runner,.rrc-pr-ans-final .rrc-pr-runner{line-height:1}
/* v1.3：4択と解答行のさいごの順序は、文字が線に触れないよう、線の枠ではなく うすい灰色の背景で示す（本番前検査 r2 の RRC-IR2-M1）。
   走者を どうぶつの名前にしたため、4択と解答行の名前は太字にしない（英語の Monkey などで行が枠からはみ出さないように）。順位レーンの名前は太字のまま。 */
.rrc-pr-choice .rrc-pr-runner,.rrc-pr-ans .rrc-pr-runner{font-weight:400}
/* v1.3：英語は名前が長い（Monkey）ため、順位レーンを27.5mmにする（日本語は22mmのまま）。 */
.rrc-pr-page[lang="en"] .rrc-pr-lanes{width:27.5mm}
/* v1.3：解答行の各部分は縮めない（はみ出しを隠さない）。英語は順序の間を1.5mm（細い縦線で区切る）、問題番号の幅を9mmにする。 */
.rrc-pr-ans>*{flex:none}
.rrc-pr-page[lang="en"] .rrc-pr-ans-gap{box-sizing:content-box;width:0.6mm;height:3.6mm;margin-left:0.65mm;border-left:0.25mm solid #888}
/* v1.3：日本語の解答行は、ひらがなの名前どうしが続いて見えないよう、名前の間を2mmにする。 */
.rrc-pr-page[lang="ja"] .rrc-pr-ans-order{gap:2mm}
.rrc-pr-page[lang="en"] .rrc-pr-ans-no{min-width:9.6mm}
.rrc-pr-answers{flex:none;box-sizing:border-box;height:auto;display:grid;grid-template-columns:auto 1fr;column-gap:2mm;align-items:start}
.rrc-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0.3mm 0 0.3mm;padding:0;border:0;border-top:2pt dashed #aaa}
.rrc-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:4.6mm;height:4.6mm}
.rrc-pr-ans-cols{display:grid;grid-template-columns:1fr 1fr;column-gap:3mm}
.rrc-pr-ans-col{display:flex;flex-direction:column}
.rrc-pr-ans{font-size:10pt;line-height:1;height:4mm;white-space:nowrap;display:flex;align-items:center}
.rrc-pr-ans-no{font-weight:700;min-width:10.5mm}
.rrc-pr-ans-order{display:inline-flex;gap:1mm;align-items:center}
.rrc-pr-ans-final{box-sizing:border-box;border:0;border-radius:0.6mm;background:#dcdcdc;print-color-adjust:exact;-webkit-print-color-adjust:exact;padding:0 0.8mm;line-height:3.7mm;height:4.3mm;display:inline-flex;align-items:center}
.rrc-pr-ans-gap{display:inline-block;width:3mm}
.rrc-app-pdf-page .rrc-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="race_rank_change3_1"]{width:277mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="race_rank_change3_1"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="race_rank_change3_1"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白を白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="race_rank_change3_1"] .rrc-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="race_rank_change3_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="race_rank_change3_1"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="race_rank_change3_1"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="race_rank_change3_1"] .rrc-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
/* v1.7（共通仕様書 v3.2 §3-6・余白10mm）：解答の見出しは解答の列の左に置き、答えの文は10ptで1行にする（解答は答え合わせ用の文で、問題文ではない）。 */
.rrc-pr-answers>.rrc-pr-dashed{grid-column:1 / -1}
.rrc-pr-answers>.rrc-pr-answers-title{grid-column:1}
.rrc-pr-answers>.rrc-pr-ans-cols{grid-column:2}
.rrc-pr-ans .rrc-pr-runner,.rrc-pr-ans .rrc-pr-ans-no{font-size:10pt}
