/* ── frame_path_area_difference3_4（がくぶちや道はばの面積を差で求めよう、単元仕様書 v1.5）── */
/* 画面：問題文の下に、図・図の注意・網かけの説明・代替文、数を入れる1欄と単位cm²、案内、数のキー（§5-3・§7 画面表示）。 */
.fpad-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.fpad-figure{margin:2px 0 0;max-width:100%;display:flex;justify-content:center}
.fpad-svg{display:block;width:min(100%,400px);max-width:100%;height:auto}
.fpad-note{margin:2px 0 0;font-size:16px;font-weight:700;color:#7c2d12;text-align:center;line-height:1.4}
.fpad-legend,.fpad-alt{margin:2px 0 0;font-size:16px;color:#334155;text-align:center;line-height:1.4}
.fpad-alt{font-size:16px;color:#475569}
.fpad-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.fpad-label{font-size:16px;font-weight:700;line-height:1.3}
.fpad-input-wrap{display:inline-flex;align-items:center;gap:4px}
.fpad-input{width:5.2em;min-height:44px;font-size:1.3rem;padding:2px 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;box-sizing:border-box}
.fpad-input:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.fpad-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
/* 採点後：正しいときは緑の実線、まちがえたときは赤の点線の太い枠（色だけにせず線の形でも区別する）。 */
.fpad-input.fpad-ok,.fpad-input.fpad-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.fpad-input.fpad-ng,.fpad-input.fpad-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.fpad-unit{font-weight:700;font-size:1.15rem;white-space:nowrap}
.fpad-guide{margin:4px 0 0;font-size:16px;text-align:center;line-height:1.4}
.fpad-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.fpad-msg:empty{min-height:0;margin:0}
.fpad-keypad{display:grid;grid-template-columns:repeat(3,minmax(44px,64px));gap:6px;justify-content:center;margin:6px auto 0}
.fpad-keypad[hidden]{display:none}
.fpad-key{min-height:44px;min-width:44px;font-size:1.3rem}
.feedback.has-text.fpad-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.fpad-answer{margin:4px 0;font-weight:700;overflow-wrap:anywhere}
.fpad-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.fpad-example-figure{margin:6px 0}
.fpad-example-fig{font-size:16px;color:#475569;margin:2px 0 6px}
#page-quiz.active:has(.fpad-main) #question-text,#page-quiz.active:has(.fpad-main) #hint-area .kp-body,#page-quiz.active:has(.fpad-main) #feedback,.fpad-expl-text,.fpad-answer,.fpad-note,.fpad-legend,.fpad-alt,.fpad-guide,.fpad-msg{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.fpad-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.fpad-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.fpad-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.fpad-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;font-size:16px}

/* 印刷：A4縦・1ページ（§7。用紙の余白 全辺10mm、本文190×277mm。題名と記入欄、共通の案内4行、2列×5段で1問39mm、答え）。 */
.fpad-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}
.fpad-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:186mm;height:17.3mm}
.fpad-pr-title{box-sizing:border-box;margin:0;height:7mm;font-size:14.1pt;font-weight:700;line-height:6mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.fpad-pr-page[lang="en"] .fpad-pr-title{font-size:14.1pt}
.fpad-pr-fields{display:flex;gap:0;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12.1pt;line-height:6mm;white-space:nowrap}
.fpad-pr-field-separator{white-space:pre;flex:none}
.fpad-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.fpad-pr-field-line{display:inline-block;box-sizing:border-box;width:14.3mm;height:6.6mm;border-bottom:2px solid #555}
.fpad-field-name{flex:1;min-width:0}
.fpad-field-name .fpad-pr-field-line{flex:1;width:auto;min-width:40mm}
.fpad-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:2px solid #333;margin:1.4mm 0 0}
/* 下側3.5mmは必要間隔2mm＋自由余り1.5mm。head内の自由分と合わせ、上部43mm内に1.7mm以上を残す。 */
.fpad-pr-common{flex:none;box-sizing:border-box;width:186mm;margin:1mm 0 3.5mm;height:21.2mm;font-size:12.6pt;line-height:5.3mm;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
.fpad-pr-problems{display:flex;gap:6mm;flex:none;width:186mm;height:195mm}
.fpad-pr-col{flex:none;width:90mm;display:flex;flex-direction:column}
.fpad-pr-cell{box-sizing:border-box;height:39mm;display:flex;align-items:flex-start;padding:2mm 0 0;border-bottom:0.2mm solid transparent;overflow:hidden}
.fpad-pr-num{flex:none;width:8mm;font-size:12.6pt;font-weight:700;line-height:5mm}
.fpad-pr-fig{flex:none;display:block;width:52mm;height:34mm}
.fpad-pr-fig .fpad-svg-print{display:block;width:52mm;height:34mm}
/* 答えの枠は図の枠の下端にそろえる（上の帯5mm＋図の枠24mm）。 */
.fpad-pr-box{flex:none;box-sizing:border-box;width:12.2mm;height:7.2mm;margin:21.8mm 0 0 2mm;border:0.35mm solid #333;background:#fff}
.fpad-pr-unit{flex:none;width:6mm;margin:24mm 0 0 1mm;font-size:10.1pt;line-height:5mm;white-space:nowrap}
.fpad-pr-answers{flex:none;box-sizing:border-box;width:186mm;height:33.5mm}
.fpad-pr-dashed{box-sizing:content-box;display:block;height:0;margin:1.5mm 0 1.5mm;padding:0;border:0;border-top:2pt dashed #aaa}
.fpad-pr-answers-title{font-weight:700;font-size:12.6pt;line-height:6mm;height:6mm}
.fpad-pr-answers-grid{display:flex;gap:6mm}
.fpad-pr-ans-col{flex:none;width:90mm}
.fpad-pr-ans{height:4.5mm;line-height:4.5mm;font-size:10.1pt;white-space:nowrap;overflow:hidden}
.fpad-app-pdf-page .fpad-pr-page{box-shadow:none;margin:0}

#page-print:has(#pr-sheet[data-unit="frame_path_area_difference3_4"]){width:100%;max-width:100%;box-sizing:border-box;overflow-x:auto}
#pr-sheet[data-unit="frame_path_area_difference3_4"]{box-sizing:border-box;width:210mm;max-width:none;padding:10mm;margin:12px auto;background:#fff;box-shadow:0 0 4px #aaa}
#pr-sheet[data-unit="frame_path_area_difference3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="frame_path_area_difference3_4"]>#pr-problems{display:block}
@media print{
  #page-print #pr-sheet[data-unit="frame_path_area_difference3_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="frame_path_area_difference3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="frame_path_area_difference3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="frame_path_area_difference3_4"] .fpad-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
