/* box_surface_route_length3_4 v1.4. Screen and A4 paper rules are unit-scoped.
   A4: 10mm margins; 45.5mm header, 3mm gap, 5×37mm questions, 3mm gap, 35.5mm answers. */


.brl-main{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px auto 2px;max-width:560px;width:100%;box-sizing:border-box}
.brl-fig-wrap{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px}
.brl-fig{display:block;width:300px;max-width:100%;height:auto;color:#000;background:#fff}
.brl-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}
.brl-extra span{display:block}
.brl-guide{margin:4px auto 0;font-weight:700;text-align:center;max-width:32em;overflow-wrap:anywhere}
.brl-field{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;max-width:100%}
.brl-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}
.brl-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.brl-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.brl-input.brl-input-ok{border:3px solid #15803d;background:#dcfce7}
.brl-input.brl-input-ng{border:3px dashed #b91c1c;background:#fff1f2}
.brl-unit{font-size:1.3rem;font-weight:800;white-space:nowrap}
.brl-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.brl-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.brl-correct{margin:2px 0 4px;font-weight:800;overflow-wrap:anywhere}
.brl-expl-text{margin:2px 0 6px;overflow-wrap:anywhere}
.brl-lesson-ex{display:inline-block;margin-top:4px;font-weight:700;overflow-wrap:anywhere}
.brl-hint-text{display:block}
#page-quiz.active:has(.brl-main) #question-text{overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.brl-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.brl-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.brl-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;overflow-wrap:anywhere}
@media (max-width:400px){
  .brl-fig{width:270px}
  .brl-input{font-size:1.15rem}
  .brl-unit{font-size:1.1rem}
}


.brl-pr-page{width:190mm;height:277mm;box-sizing:border-box;display:flex;flex-direction:column;padding:0;margin:0 auto;overflow:hidden;background:#fff;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.brl-pr-head{display:flex;flex-direction:column;height:45.5mm;flex:none;box-sizing:border-box;font-size:12.52pt}
.brl-pr-title{box-sizing:border-box;margin:0;height:10mm;font-size:14.05pt;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}
.brl-pr-head .pp-fields{margin:1mm 0 0;height:6mm;line-height:6mm!important}
.brl-pr-head hr.pp-fields-solid{margin:1mm 0 1mm!important}
.brl-pr-inst{margin:0;height:18.5mm;max-height:18.5mm;line-height:6.16mm;overflow:hidden;overflow-wrap:break-word;word-break:normal;line-break:strict;white-space:pre-wrap}
.brl-pr-problems{display:grid;grid-template-columns:90mm 90mm;column-gap:6mm;flex:none;height:185mm;margin-top:3mm;justify-content:center}
.brl-pr-col{display:grid;grid-template-rows:repeat(5,37mm)}
.brl-pr-cell{display:flex;flex-direction:row;align-items:flex-start;height:37mm;overflow:hidden;box-sizing:border-box;padding:1.5mm 0 0;font-size:12.52pt}
.brl-pr-num{margin:0;width:9mm;flex:none;line-height:6mm;font-weight:700;white-space:nowrap}
.brl-pr-fig{flex:none;width:48mm;height:31.5mm;line-height:0}
.brl-pr-fig .brl-fig{display:block;width:48mm;height:31.5mm;max-width:none;min-width:0;background:transparent}
.brl-pr-side{flex:none;width:28mm;margin-left:2mm;height:31.5mm;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}
.brl-pr-side .brl-extra{min-width:0;max-width:none;width:28mm;padding:.6mm 1mm;border:.35mm solid #000;border-radius:1mm;background:#fff;font-size:9.1pt;line-height:1.25;font-weight:700}
.brl-pr-field{margin:0;white-space:nowrap;font-size:12.52pt;line-height:8mm;display:flex;align-items:center}
.brl-pr-blank{display:inline-block;width:13.2mm;height:8mm;overflow:hidden;white-space:pre;color:transparent;vertical-align:middle}
.brl-pr-unit{white-space:pre}
.brl-pr-answers{flex:none;box-sizing:border-box;margin-top:3mm;height:35.5mm}
.brl-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0;padding:0;border:0;border-top:2pt dashed #aaa}
.brl-pr-answers-title{height:5mm;line-height:5mm;font-weight:700;font-size:12.52pt}
.brl-pr-ans-grid{display:grid;grid-template-columns:90mm 90mm;column-gap:6mm;justify-content:center}
.brl-pr-ans-col{display:grid;grid-template-rows:repeat(5,5.3mm)}
.brl-pr-ans{margin:0;font-size:10.1pt;line-height:4.3mm;max-height:4.3mm;overflow:hidden;overflow-wrap:anywhere}
.brl-app-pdf-page .brl-pr-page{box-shadow:none;margin:0}

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


#page-quiz:has(#question-text[data-unit="box_surface_route_length3_4"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="box_surface_route_length3_4"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}

.brl-alt{font-size:1rem;line-height:1.5;margin:0;overflow-wrap:anywhere}.brl-noscale{font-size:.95rem;margin:0}.brl-fig{width:380px}.brl-pr-fig .brl-fig{width:48mm;height:31.5mm}.brl-pr-page text{font-family:Arial,"Noto Sans CJK JP",sans-serif}.brl-pr-inst{font-size:12.52pt}.brl-pr-side .brl-extra{line-height:3.9mm}.brl-pr-head .pp-fields{font-size:12.52pt}.brl-pr-page .pp-field-line{height:6mm}.brl-pr-ans{white-space:nowrap}.brl-fig text{fill:#000;stroke:#fff;stroke-width:2px;paint-order:stroke}.brl-fig .brl-no{font-family:Arial,"Noto Sans CJK JP",sans-serif}
#page-print:has(#pr-sheet[data-unit="box_surface_route_length3_4"]){overflow-x:auto;padding-left:calc(12px + 10mm);padding-right:calc(12px + 10mm)}#pr-sheet[data-unit="box_surface_route_length3_4"]{margin-left:auto;margin-right:auto;min-width:190mm;transform:none!important}

.brl-pr-side .brl-pr-field{margin-top:auto}
.brl-pr-head .pp-fields{font-size:12.52pt!important}
@media print{
 #page-print:has(#pr-sheet[data-unit="box_surface_route_length3_4"]){padding:0!important;margin:0!important;overflow:visible!important;min-height:0!important}
 #page-print #pr-sheet[data-unit="box_surface_route_length3_4"] .brl-pr-page{height:276.8mm!important}
}
.brl-fig text{font-family:Arial,"Noto Sans CJK JP",sans-serif}

.brl-language{display:none}
.brl-fig .brl-no{font-weight:700}
@media(max-width:640px){#page-quiz:has(#brl-main)>.brl-language{display:flex;justify-content:flex-end;gap:6px;margin:0 0 6px}.brl-language button{min-height:44px;padding:6px 12px;border:2px solid #64748b;border-radius:10px;background:#fff;font:inherit}.brl-language button[aria-pressed="true"]{border-color:#4338ca;background:#eef2ff}}

/* The answered explanation lives outside the shared learning-content wrapper. */
.lang-en .brl-expl-text{font-family:var(--font-learning)}
