/* ── folded_shape_perimeter_area3_5（折り返した図形の周りと面積を求めよう、単元仕様書 v1.3）── */
/* 画面：問題文、折る前と折ったあとの図、図の下の注意、回答欄（A群は分子・分母の2つのらんと分数の線、B〜D群は数のらんと単位）、案内、共通のテンキー（§5-3・§7）。 */
#question-text .fspa-q{display:block}
.fspa-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:4px}
.fspa-figwrap{width:100%;max-width:820px}
.fspa-fig{display:block;width:100%;height:auto}
.fspa-fig-stack{max-width:340px;margin:0 auto}
.fspa-note{margin:0;font-size:16px;color:#475569;text-align:center;max-width:560px;line-height:1.45}
.fspa-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center}
.fspa-guide[hidden]{display:none}
.fspa-row-input{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin-top:2px}
.fspa-fracin{display:inline-grid;grid-template-columns:max-content auto;column-gap:8px;row-gap:3px;align-items:center;justify-items:center}
.fspa-fl-t{justify-self:end;font-size:1rem;font-weight:700;color:#334155}
.fspa-bar{display:block;width:6.6em;border-top:3px solid #111827}
.fspa-nl{display:flex;flex-direction:column;align-items:center;gap:3px}
.fspa-nl-t{font-size:1rem;font-weight:700;color:#334155;text-align:center}
.fspa-nl-row{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.fspa-unit{font-size:1.2rem;font-weight:700}
.fspa-input{width:6em;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}
.fspa-input.ufk-input-active{outline:3px solid #f59e0b;outline-offset:1px}
.fspa-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.fspa-input.fspa-ok,.fspa-input.fspa-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.fspa-input.fspa-ng,.fspa-input.fspa-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.fspa-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.4;max-width:560px}
.fspa-msg:empty{min-height:0;margin:0}
.fspa-main .ufk-keypad{margin-top:4px}
.feedback.has-text.fspa-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
/* 分数は分子・分数の線・分母の3段（§5-3）。分数のすぐ前の数と記号、すぐ後ろの（倍）・句読点と同じ行に置く。 */
.fspa-frac{display:inline-block;text-align:center;vertical-align:middle;margin:0 .1em;line-height:1.05;font-size:.92em}
.fspa-frac .fspa-num{display:block;padding:0 .18em;border-bottom:.09em solid currentColor}
.fspa-frac .fspa-den{display:block;padding:0 .18em}
.fspa-nb{white-space:nowrap}
.fspa-correct{margin:4px 0;font-weight:800;line-height:2.2}
.fspa-expl-text{margin:4px 0 6px;overflow-wrap:anywhere;line-height:2.3}
.fspa-ex-q,.fspa-ex-a{margin:6px 0 8px}
/* 例題の図は、学習内容の例題の箱の中に収まる、はばのせまい上下の置き方で描く（箱の線と重ならない。図の文字を14 CSS px以上に保つ。r4 中-1）。 */
.fspa-ex-fig{max-width:240px;margin:0 auto}
.fspa-ex-fig .fspa-fig{width:100%;max-width:none}
#result-list .fspa-frac,.result-item .fspa-frac{font-size:.9em}
#page-quiz.active:has(.fspa-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.fspa-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.fspa-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.fspa-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.fspa-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="folded_shape_perimeter_area3_5"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="folded_shape_perimeter_area3_5"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}

/* 印刷：A4横・2列・1ページ（§7、v1.3）。題名の枠と記入らん（共通仕様 CP-08a・CP-08b）18mm、共通の案内と問いの行4行（12.5pt・行送り5.3mm）、
   問題の2列×5段（1問134×21mm：番号と記号13mm・図58mm［左の帯9mm・折る前の図の枠22×12mm・やじるし5mm・折ったあとの図の枠22×12mm、上の帯4mm］・
   ラベルの帯38mm・答えの枠と単位17mm）と、下段の答えの行（見出し22mm・1件25mm、10pt）。 */
.fspa-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:'BIZ UDPGothic','Atkinson Hyperlegible','Yu Gothic','Meiryo',sans-serif}
.fspa-pr-headblock{display:block;flex:none}
/* 題名は共通仕様 CP-08a の枠・うすい黄色・中央ぞろえ。記入らんと実線は共通の .pp-fields（CP-08b）。 */
.fspa-pr-title{box-sizing:border-box;margin:0;height:7.5mm;font-size:14pt;font-weight:700;line-height:calc(7.5mm - 3pt);white-space:nowrap;text-align:center;border:1.5pt solid #666;background:#ffffcc;-webkit-print-color-adjust:exact;print-color-adjust:exact;overflow:hidden}
.fspa-pr-headblock .pp-fields.pp-fields-compact{height:7.5mm;margin-top:1mm}
.fspa-pr-headblock hr.pp-fields-solid{box-sizing:content-box;height:0;margin:1mm 0 1mm!important;padding:0;border:0!important;border-top:1.5pt solid #333!important}
.fspa-pr-common{flex:none;box-sizing:border-box;width:273mm;margin:0 0 2mm}
.fspa-pr-inst,.fspa-pr-qline{margin:0;font-size:12.5pt;line-height:5.3mm;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.fspa-pr-body{flex:1 1 auto;min-height:105mm;display:grid;grid-template-columns:134mm 134mm;column-gap:5mm;width:273mm}
.fspa-pr-col{display:grid;grid-template-rows:repeat(5,minmax(21mm,1fr))}
.fspa-pr-cell{box-sizing:border-box;width:134mm;min-height:21mm;overflow:hidden;display:grid;grid-template-columns:13mm 58.6mm 40mm 19mm;column-gap:0;align-items:center}
.fspa-pr-nm{display:flex;align-items:baseline;gap:1mm;margin-top:4mm;font-size:12.5pt;line-height:5mm;white-space:nowrap}
.fspa-pr-num{font-weight:700}
.fspa-pr-mark{font-weight:700}
.fspa-pr-fig{display:block;width:58.6mm;height:16.6mm}
.fspa-pr-labs{box-sizing:border-box;display:flex;flex-direction:column;margin-top:4mm;padding-left:2mm;font-size:9pt;line-height:4mm;white-space:nowrap;font-family:Arial,'Helvetica Neue',Helvetica,'Liberation Sans','BIZ UDPGothic',sans-serif}
.fspa-pr-ansbox{box-sizing:border-box;display:flex;align-items:center;gap:1mm;margin-top:4mm;padding-left:2mm}
.fspa-pr-box{box-sizing:border-box;flex:none;width:9mm;height:7mm;border:0.6mm solid #333}
.fspa-pr-unit{font-size:10pt;line-height:7mm;white-space:nowrap;letter-spacing:-0.02em}
.fspa-pr-fbox{display:inline-flex;flex-direction:column;align-items:center}
.fspa-pr-fb{box-sizing:border-box;display:block;width:9mm;height:5mm;border:0.6mm solid #333}
.fspa-pr-fline{display:block;width:11mm;margin:0.8mm 0;border-top:0.6mm solid #000}
.fspa-pr-answers{flex:none;display:flex;align-items:center;width:274mm;height:8.5mm;margin-top:1mm;margin-bottom:5.5mm;font-size:10pt;line-height:4mm;white-space:nowrap;border-top:2pt dashed #aaa;padding-top:1mm}
.fspa-pr-anshead{flex:none;width:22mm;font-size:12.5pt;font-weight:700}
.fspa-pr-ans{flex:none;width:25mm;overflow:hidden}
.fspa-pr-ans .fspa-frac{font-size:1em;line-height:3.6mm}
/* 印刷の分数の線は完成PDFで0.3mm以上（ブラウザは線の太さを整数のpxに切り下げるため、0.6mm＝2.27pxを指定して2px＝0.53mmにする）。 */
.fspa-pr-page .fspa-frac .fspa-num{border-bottom:0.6mm solid #000}
.fspa-app-pdf-page .fspa-pr-page{box-shadow:none;margin:0}

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