/* ── box_string_route2_3（箱にまくひもの 通り道と長さ、単元仕様書 v1.2）── */
/* 画面：問題文の下に、箱の図と全体のあまりの札、回答案内、欄と単位（欄の右）、案内、テンキー、「こたえる」ボタンを上から順に置く（§5-3・§7 画面表示）。 */
.bsr-main{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px auto 2px;max-width:560px;width:100%;box-sizing:border-box}
.bsr-fig-wrap{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px}
.bsr-fig{display:block;width:300px;max-width:100%;height:auto;color:#000;background:#fff}
.bsr-extra{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:7em;max-width:11em;padding:4px 8px;border:2px solid #92400e;border-radius:8px;background:#fffbeb;font-weight:700;line-height:1.35;text-align:center;overflow-wrap:anywhere}
.bsr-extra span{display:block}
.bsr-guide{margin:4px auto 0;font-weight:700;text-align:center;max-width:32em;overflow-wrap:anywhere}
.bsr-field{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;max-width:100%}
.bsr-input{width:5em;min-width:72px;min-height:48px;font-size:1.35rem;font-weight:800;padding:2px 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:10px;text-align:center;font-family:inherit;box-sizing:border-box}
.bsr-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.bsr-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.bsr-input.bsr-input-ok{border:3px solid #15803d;background:#dcfce7}
.bsr-input.bsr-input-ng{border:3px dashed #b91c1c;background:#fff1f2}
.bsr-unit{font-size:1.3rem;font-weight:800;white-space:nowrap}
.bsr-msg{margin:0;min-height:1.2em;color:#b91c1c;font-weight:700;font-size:.95rem;text-align:center;max-width:32em;overflow-wrap:anywhere}
.feedback.has-text.bsr-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.bsr-correct{margin:2px 0 4px;font-weight:800;overflow-wrap:anywhere}
.bsr-expl-text{margin:2px 0 6px;overflow-wrap:anywhere}
.bsr-lesson-ex{display:inline-block;margin-top:4px;font-weight:700;overflow-wrap:anywhere}
.bsr-hint-text{display:block}
#page-quiz.active:has(.bsr-main) #question-text{overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.bsr-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.bsr-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.bsr-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;overflow-wrap:anywhere}
@media (max-width:400px){
  .bsr-fig{width:270px}
  .bsr-input{font-size:1.15rem}
  .bsr-unit{font-size:1.1rem}
}

/* 印刷：A4縦・2列×5段・1ページ（§7 v1.2。用紙の余白10mm、本文190×277mm、列90mm・列の間6mm）。
   上部38mm（題名の枠10mm・間1mm・記入欄8mm・間1mm・実線・間1mm・共通の問い3行16.5mm）、間2mm、
   各問34mm×5段＝170mm（セルの中は番号8mm・図48mm×29mm・間2mm・右側28mm）、
   答え：間2mm・破線・見出し6mm・1件2行9mm＋間1mm×5段＝50mm で約58mm。合計約268mm（余り約9mm）。 */
.bsr-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}
.bsr-pr-head{display:flex;flex-direction:column;height:38mm;flex:none;box-sizing:border-box;font-size:12.5pt}
.bsr-pr-title{box-sizing:border-box;margin:0;height:10mm;font-size:14pt;font-weight:700;line-height:8.9mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.bsr-pr-head .pp-fields{margin:1mm 0 0;height:8mm;line-height:8mm!important}
.bsr-pr-head hr.pp-fields-solid{margin:1mm 0 1mm!important}
.bsr-pr-inst{margin:0;height:16.5mm;max-height:16.5mm;line-height:5.5mm;overflow:hidden;overflow-wrap:break-word;word-break:normal;line-break:strict;white-space:pre-wrap}
.bsr-pr-problems{display:grid;grid-template-columns:90mm 90mm;column-gap:6mm;flex:none;height:170mm;margin-top:2mm;justify-content:center}
.bsr-pr-col{display:grid;grid-template-rows:repeat(5,34mm)}
.bsr-pr-cell{display:flex;flex-direction:row;align-items:flex-start;height:34mm;overflow:hidden;box-sizing:border-box;padding:1.5mm 0 0;font-size:12.5pt}
.bsr-pr-num{margin:0;width:8mm;flex:none;line-height:6mm;font-weight:700;white-space:nowrap}
.bsr-pr-fig{flex:none;width:48mm;height:29mm;line-height:0}
.bsr-pr-fig .bsr-fig{display:block;width:48mm;height:29mm;max-width:none;min-width:0;background:transparent}
.bsr-pr-side{flex:none;width:28mm;margin-left:2mm;height:29mm;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}
.bsr-pr-side .bsr-extra{min-width:0;max-width:none;width:28mm;padding:.6mm 1mm;border:.35mm solid #000;border-radius:1mm;background:#fff;font-size:9pt;line-height:1.25;font-weight:700}
.bsr-pr-field{margin:0;white-space:nowrap;font-size:12.5pt;line-height:8mm;display:flex;align-items:center}
.bsr-pr-blank{display:inline-block;width:16mm;height:8mm;overflow:hidden;white-space:pre;color:transparent;vertical-align:middle}
.bsr-pr-unit{white-space:pre}
.bsr-pr-answers{flex:none;box-sizing:border-box;margin-top:2mm}
.bsr-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0;padding:0;border:0;border-top:2pt dashed #aaa}
.bsr-pr-answers-title{height:6mm;line-height:6mm;font-weight:700;font-size:12.5pt}
.bsr-pr-ans-grid{display:grid;grid-template-columns:90mm 90mm;column-gap:6mm;justify-content:center}
.bsr-pr-ans-col{display:grid;grid-template-rows:repeat(5,10mm)}
.bsr-pr-ans{margin:0;font-size:10pt;line-height:4.5mm;max-height:9mm;overflow:hidden;overflow-wrap:anywhere}
.bsr-app-pdf-page .bsr-pr-page{box-shadow:none;margin:0}

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

/* 品質検査：単元専用テンキー(ufk)を共通テンキーと同じ幅240px・UI字体にそろえる（共通部品は変えず、この単元の画面だけに限る）。 */
#page-quiz:has(#question-text[data-unit="box_string_route2_3"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="box_string_route2_3"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
