/* ── overlapping_squares_area_adjust3_4（重なった正方形の面積を調整しよう、単元仕様書 v1.3）── */
/* 画面：問題文、図、重なりの線の説明と注意、回答欄（数の欄・単位）、案内、共通のテンキー。回答後は正誤・正しい答え・解説（§5-3・§7） */
#question-text .osa-q{display:block;overflow-wrap:normal}
.osa-nb{white-space:nowrap}
.osa-phrase-group{display:inline;min-width:0}
.osa-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
.osa-list-q{display:block}
.osa-field{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.osa-unit{font-size:1.2rem;font-weight:800;color:#111827}
.osa-input{width:4.6em;min-height:48px;font-size:1.35rem;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}
.osa-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.osa-input.osa-ok,.osa-input.osa-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.osa-input.osa-ng,.osa-input.osa-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.osa-input.osa-bad{border:3px dashed #b45309;background:#fffbeb}
.osa-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center;max-width:560px;line-height:1.7}
.osa-guide[hidden]{display:none}
.osa-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.6;max-width:560px}
.osa-msg:empty{min-height:0;margin:0}
.osa-msg-line{display:block}
.osa-main .ufk-keypad{margin-top:4px}
.feedback.has-text.osa-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.osa-correct{margin:4px 0 6px;font-weight:800;font-size:17px;line-height:1.9}
.osa-expl-text{margin:4px 0 8px;line-height:2;overflow-wrap:normal;word-break:normal;line-break:strict}
.osa-example{display:flex;flex-direction:column;align-items:center}
.osa-example .osa-ex-q{margin:6px 0 6px;font-weight:700;line-height:2;align-self:stretch}
.osa-example .osa-ex-a{margin:8px 0 8px;line-height:2;align-self:stretch}
.osa-learning-focus{word-break:normal;line-break:strict}
.osa-user-val{white-space:nowrap}
.osa-user-val.osa-user-long{white-space:normal;overflow-wrap:anywhere;word-break:break-all}
#page-quiz.active:has(.osa-main) #question-text{word-break:normal;overflow-wrap:normal;line-break:strict;font-size:17px;line-height:2}
#page-quiz.active:has(.osa-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.osa-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.osa-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.osa-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="overlapping_squares_area_adjust3_4"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="overlapping_squares_area_adjust3_4"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
/* 結果画面の単元名：狭い幅でも省略せず、文節で折り返す */
.result-unit-badge.osa-badge{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;height:auto;border-radius:14px;line-height:1.5}
.result-unit-badge.osa-badge .rub-name{white-space:normal;overflow:visible;text-overflow:clip}
@media (max-width:400px){
  #page-lesson:has(.osa-example) .lesson-point,#page-lesson:has(.osa-example) .lesson-point *{font-size:15px}
  #page-lesson:has(.osa-example) .lesson-point{padding-left:10px;padding-right:10px;gap:6px}
  #page-lesson:has(.osa-example) .lesson-point .pt-icon{display:none}
  #page-lesson .lesson-example:has(.osa-example){padding-left:8px;padding-right:8px}
  #page-lesson .lesson-example div:has(>.osa-example){padding-left:6px!important;padding-right:6px!important}
  .osa-example .osa-ex-q,.osa-example .osa-ex-a{font-size:14px}
  .osa-guide,.osa-msg{font-size:15px}
  .result-unit-badge.osa-badge,.result-unit-badge.osa-badge .rub-name,.result-unit-badge.osa-badge .osa-phrase{font-size:12px}
}
@media (max-width:340px){
  .osa-example .osa-ex-q,.osa-example .osa-ex-a{font-size:13px}
  #page-lesson:has(.osa-example) :is(h1,h2,h3):has(.osa-phrase){font-size:20px!important}
  #page-lesson .lesson-card:has(.osa-example){padding-left:12px;padding-right:12px}
  #page-lesson .lesson-example:has(.osa-example){padding-left:4px;padding-right:4px}
  #page-lesson .lesson-example div:has(>.osa-example){padding-left:2px!important;padding-right:2px!important}
}

/* 印刷（プリント共通仕様書のひな型P・P-標準：A4縦・2列×5行・1ページ。§7・確定表 OSA-08） */
.osa-pr-page{width:190mm;height:276mm;box-sizing:border-box;color:#000;background:#fff;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;display:flex;flex-direction:column;overflow:hidden}
.osa-pr-headrow{flex:none;display:flex;flex-direction:column;gap:0}
.osa-pr-title{box-sizing:border-box;width:100%;height:9mm;margin:0;padding:0 2mm;border:1.5pt solid #666;background:#ffffcc;font-size:13pt;line-height:calc(9mm - 3pt);text-align:center;font-weight:700;white-space:nowrap;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.osa-pr-headrow .pp-fields{margin:1mm 0 0}
.osa-pr-headrow .pp-field-name .pp-field-line{min-width:40mm}
.osa-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:1.5mm 0 1.5mm!important}
.osa-pr-problems{flex:1 1 0;min-height:0;display:flex;gap:4mm;justify-content:center}
.osa-pr-col{width:93mm;display:flex;flex-direction:column;gap:1mm;min-height:0}
.osa-pr-ansrow{flex:none;display:flex;align-items:center;justify-content:flex-end;height:8.6mm;font-size:12.5pt;line-height:8.6mm;white-space:nowrap}
.osa-pr-lead{flex:none;font-size:12.5pt;white-space:pre}
.osa-pr-paren{font-size:14pt;font-weight:400}
.osa-pr-blank{flex:none;display:inline-block;width:12.4mm;height:8.2mm}
.osa-pr-paren+.osa-pr-lead{margin-left:0.4mm}
.osa-pr-lead+.osa-pr-paren{margin-left:1.2mm}
.osa-pr-lead-en+.osa-pr-paren{margin-left:.3em}
.osa-pr-paren+.osa-pr-lead-en{margin-left:.25em}
.osa-pr-answers{flex:none;margin-top:1.5mm}
.osa-pr-fold{width:100%;height:0;border-top:2px dotted #333;margin:0 0 1.2mm}
.osa-pr-anshead{font-size:12.5pt;font-weight:700;line-height:6mm}
.osa-pr-acols{display:flex;gap:4mm}
.osa-pr-acol{width:93mm}
.osa-pr-answer{margin:0 0 0.5mm;font-size:10pt;line-height:4.4mm;white-space:nowrap}
#pr-sheet[data-unit="overlapping_squares_area_adjust3_4"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="overlapping_squares_area_adjust3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="overlapping_squares_area_adjust3_4"]>#pr-problems{display:block}
#pr-sheet[data-unit="overlapping_squares_area_adjust3_4"] .osa-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="overlapping_squares_area_adjust3_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="overlapping_squares_area_adjust3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="overlapping_squares_area_adjust3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="overlapping_squares_area_adjust3_4"] .osa-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.osa-app-pdf-page .osa-pr-page{box-shadow:none;margin:0}

/* ── 画面：重なりの線の説明と注意 ── */
.osa-def{margin:0;font-size:14px;color:#475569;line-height:1.7;text-align:center;max-width:560px}
.osa-def-line{display:block}
.osa-expl-s{display:inline}
/* ── 図：正方形のまわりは太い実線、2まいが重なった部分はななめの線、3まいが重なった部分は交わるななめの線。長さの数は図の上に重ねた文字 ── */
.osa-fig{color:#111827;font-weight:800;flex:none;display:block;max-width:100%}
.osa-fig-in{position:relative;width:100%;display:block}
.osa-svg{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible}
.osa-fl{position:absolute;transform:translate(-50%,-50%);font-size:14px;line-height:1.2;white-space:nowrap}
.osa-fl.osa-fl-r{transform:translate(-100%,-50%)}
.osa-fl.osa-fl-l{transform:translate(0,-50%)}
.osa-ex-fig{display:flex;justify-content:center;margin:4px 0;align-self:stretch}
.osa-list-fig{display:block;margin:6px 0 2px}
.osa-list-fig .osa-fig{display:block}
.osa-list-fig .osa-fig-in{display:block}
.osa-fig-list .osa-fl{font-size:12px}
@media (max-width:400px){
  .osa-def{font-size:13px}
}
/* ── 紙面：共通の案内、各問（左に番号と図、右に計算を書く空きと答えを書く行） ── */
.osa-pr-common{flex:none;display:flex;flex-direction:column;gap:1mm;margin:0 0 1.2mm;padding:0 1mm}
.osa-pr-inst{flex:none;font-size:12.5pt;line-height:5.4mm;margin:0;overflow-wrap:normal;word-break:normal}
.osa-pr-cell{box-sizing:border-box;width:93mm;flex:1 1 0;min-height:0;padding:0 0.5mm;overflow:hidden;break-inside:avoid;display:flex;flex-direction:row;align-items:stretch}
.osa-pr-no{flex:none;width:9.6mm;font-size:12.5pt;line-height:5.4mm;font-weight:700;white-space:nowrap}
.osa-pr-figbox{flex:none;width:56mm;display:flex;align-items:center;justify-content:flex-start;min-height:0}
.osa-pr-right{flex:1 1 0;min-width:0;display:flex;flex-direction:column;min-height:0}
.osa-pr-work{flex:1 1 0;min-height:20mm}
.osa-pr-right .osa-pr-ansrow{flex:none}
.osa-fig.osa-fig-print{font-weight:700;color:#000;flex:none}
.osa-fig-print .osa-fl{font-size:9pt;color:#000}
