/* ── large_number_forms2_3（大きな数をいろいろな表し方で読もう、単元仕様書 v1.4）── */
/* 画面：問題文、（B2 はくらいの表、A2 は選択肢）、回答欄、案内、共通のテンキー。回答後は正誤・欄ごとの正誤・正しい答え・解説（§5-3・§7）。 */
#question-text .lnf-q{display:block;overflow-wrap:normal}
.lnf-nb{white-space:nowrap}
.lnf-phrase-group{display:inline;min-width:0}
.lnf-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
/* くらいの表：上の行にくらいの名前、下の行に数字（0のくらいは空らん） */
.lnf-chart-wrap{max-width:100%}
.lnf-chart-title{font-size:14px;font-weight:700;text-align:center;margin-bottom:2px}
.lnf-chart{display:grid;grid-template-columns:repeat(var(--lnf-n),max-content);width:max-content;max-width:100%;margin:0 auto;border:2px solid #334155;border-radius:6px;background:#fff;color:#111827;overflow:hidden}
.lnf-chart-col{display:flex;flex-direction:column;width:44px;border-right:1px solid #64748b;border-bottom:1px solid #64748b;box-sizing:border-box}
/* 英語のくらいの名前は長いので、ハイフンのあとで2行にする。狭い幅では、名前と数字の組のまま2だんにならべる */
.lnf-chart-en .lnf-chart-col{width:66px}
.lnf-chart-en .lnf-chart-name{height:34px;line-height:16px;font-size:12px;white-space:normal;display:flex;align-items:center;justify-content:center;text-align:center}
/* 2だんのとき：ますごとに枠を引き、上のだんは左を空けて、下のだんをいっぱいにする（空のますを作らない。一のくらいが右はしにくる） */
@media (max-width:600px){
  .lnf-chart-en{grid-template-columns:repeat(var(--lnf-half),max-content);border:0;border-radius:0;overflow:visible;background:transparent;padding:0 1px 1px 0}
  .lnf-chart-en .lnf-chart-col{border:1px solid #334155;margin:0 -1px -1px 0;background:#fff}
  .lnf-chart-en .lnf-chart-col:first-child{grid-column-start:var(--lnf-start)}
}
.lnf-chart-name{height:28px;line-height:28px;font-size:13px;font-weight:700;text-align:center;background:#f1f5f9;border-bottom:1px solid #64748b;white-space:nowrap}
.lnf-chart-digit{height:40px;line-height:40px;font-size:1.35rem;font-weight:800;text-align:center}
/* A2：4つの選択肢を上から下へ */
.lnf-choices{display:flex;flex-direction:column;gap:10px;width:100%;max-width:420px}
.lnf-choice{position:relative;box-sizing:border-box;width:100%;min-height:50px;padding:8px 30px 8px 12px;border:2px solid #64748b;border-radius:12px;background:#fff;color:#111827;font-family:inherit;font-size:1.05rem;font-weight:800;cursor:pointer;text-align:left;line-height:1.6}
.lnf-choice .lnf-check{position:absolute;top:50%;right:8px;transform:translateY(-50%);font-size:18px;line-height:1;color:#1d4ed8;visibility:hidden}
.lnf-choice.lnf-sel{border:4px solid #1d4ed8;background:#dbeafe;padding:6px 28px 6px 10px}
.lnf-choice.lnf-sel .lnf-check{visibility:visible}
.lnf-choice:disabled{cursor:default;opacity:1;color:#111827}
.lnf-choice.lnf-hit{border:4px solid #15803d;background:#dcfce7;padding:6px 28px 6px 10px}
.lnf-choice.lnf-hit .lnf-check{visibility:visible;color:#15803d;font-weight:900}
.lnf-choice.lnf-miss{border:4px dashed #b91c1c;background:#fff1f2;padding:6px 28px 6px 10px}
.lnf-choice.lnf-miss .lnf-check{visibility:visible;color:#b91c1c;font-weight:900}
.lnf-field-row{display:flex;align-items:center;gap:8px}
.lnf-input{width:9em;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}
.lnf-input-s{width:4.2em}
.lnf-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.lnf-input.lnf-ok,.lnf-input.lnf-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.lnf-input.lnf-ng,.lnf-input.lnf-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.lnf-fields{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 12px;max-width:100%}
.lnf-field{display:flex;flex-direction:column;align-items:center;gap:2px}
.lnf-field-label{font-size:15px;font-weight:800;white-space:nowrap}
.lnf-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center;max-width:560px;line-height:1.7}
.lnf-guide[hidden]{display:none}
.lnf-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.6;max-width:560px}
.lnf-msg:empty{min-height:0;margin:0}
.lnf-msg-line{display:block}
.lnf-main .ufk-keypad{margin-top:4px}
.feedback.has-text.lnf-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.lnf-part{margin:2px 0;font-weight:800;font-size:16px;line-height:1.7}
.lnf-part-ok{color:#15803d}
.lnf-part-ng{color:#b91c1c}
.lnf-part-ok::before{content:"○ "}
.lnf-part-ng::before{content:"× "}
.lnf-correct{margin:4px 0 6px;font-weight:800;font-size:17px;line-height:1.9}
.lnf-expl-text{margin:4px 0 8px;line-height:2;overflow-wrap:normal;word-break:normal;line-break:strict}
.lnf-list-choices{display:block;margin:4px 0 2px}
.lnf-list-choice{display:block;line-height:1.8}
.lnf-list-chart{display:block;margin:6px 0 2px}
.lnf-chart-list .lnf-chart{margin:0}
.lnf-example .lnf-ex-q{margin:6px 0 4px;font-weight:700;line-height:2}
.lnf-example .lnf-ex-a{margin:4px 0 14px;line-height:2}
.lnf-learning-focus{word-break:normal;line-break:strict}
#page-quiz.active:has(.lnf-main) #question-text{word-break:normal;overflow-wrap:normal;line-break:strict;font-size:17px;line-height:2}
#page-quiz.active:has(.lnf-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.lnf-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.lnf-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.lnf-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="large_number_forms2_3"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="large_number_forms2_3"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
/* 結果画面の単元名：狭い幅でも省略せず、文節で折り返す */
.result-unit-badge.lnf-badge{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;height:auto;border-radius:14px;line-height:1.5}
.result-unit-badge.lnf-badge .rub-name{white-space:normal;overflow:visible;text-overflow:clip}
@media (max-width:400px){
  #page-lesson:has(.lnf-example) .lesson-point,#page-lesson:has(.lnf-example) .lesson-point *{font-size:15px}
  #page-lesson:has(.lnf-example) .lesson-point{padding-left:10px;padding-right:10px;gap:6px}
  #page-lesson:has(.lnf-example) .lesson-point .pt-icon{display:none}
  #page-lesson .lesson-example:has(.lnf-example){padding-left:8px;padding-right:8px}
  #page-lesson .lesson-example div:has(>.lnf-example){padding-left:6px!important;padding-right:6px!important}
  .lnf-example .lnf-ex-q,.lnf-example .lnf-ex-a{font-size:14px}
  .lnf-guide,.lnf-msg{font-size:15px}
  .lnf-chart-ja .lnf-chart-col{width:33px}
  .lnf-chart-name{font-size:12px}
  .lnf-chart-digit{font-size:1.2rem;height:38px;line-height:38px}
  .lnf-choice{font-size:.98rem;padding:8px 26px 8px 8px}
  .lnf-choice.lnf-sel,.lnf-choice.lnf-hit,.lnf-choice.lnf-miss{padding:6px 24px 6px 6px}
  .lnf-input-s{width:3.6em}
  .lnf-fields{gap:8px 8px}
}
@media (max-width:340px){
  .lnf-example .lnf-ex-q,.lnf-example .lnf-ex-a{font-size:13px}
  #page-lesson:has(.lnf-example) :is(h1,h2,h3):has(.lnf-phrase){font-size:22px!important}
  .lnf-chart-ja .lnf-chart-col{width:30px}
  .lnf-chart-en .lnf-chart-col{width:62px}
}

/* 印刷（プリント共通仕様書のひな型P・P-標準：A4縦・2列×5行・1ページ。§7・確定表 LNK-07） */
.lnf-pr-page{width:190mm;box-sizing:border-box;color:#000;background:#fff;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;display:flex;flex-direction:column}
.lnf-pr-headrow{display:flex;flex-direction:column;gap:0}
/* 題名は共通仕様 CP-08a の枠・うすい黄色・中央ぞろえ。記入欄と実線は共通の .pp-fields（CP-08b）。 */
.lnf-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}
.lnf-pr-headrow .pp-fields{margin:1mm 0 0}
.lnf-pr-headrow .pp-field-name .pp-field-line{min-width:40mm}
.lnf-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:1.5mm 0 1.5mm!important}
.lnf-pr-inst{font-size:12.5pt;line-height:6mm;height:6mm;margin:0 0 2mm;padding:0 1mm;white-space:nowrap}
.lnf-pr-problems{display:flex;gap:4mm;justify-content:center}
.lnf-pr-col{width:93mm;display:flex;flex-direction:column;gap:2mm}
.lnf-pr-cell{box-sizing:border-box;width:93mm;height:32mm;padding:0 0.5mm;overflow:hidden;break-inside:avoid;display:flex;flex-direction:column}
/* 行ごとの高さ（左列・右列の同じ行は同じ高さ）：問1・6＝32mm、問2・7＝53mm（英語のくらいの表は2だん）、問3・8＝44mm、問4・9＝36mm、問5・10＝32mm */
.lnf-pr-cell[data-lnf-row="2"]{height:53mm}
.lnf-pr-cell[data-lnf-row="3"]{height:44mm}
.lnf-pr-cell[data-lnf-row="4"]{height:36mm}
.lnf-pr-q{flex:none;margin:0;font-size:12.5pt;line-height:5.6mm;font-weight:400;overflow-wrap:normal;word-break:normal;line-break:strict}
.lnf-pr-num{font-weight:700}
.lnf-pr-a2{flex:none;display:flex;align-items:flex-end;gap:1mm;padding-left:3mm}
.lnf-pr-choices{flex:1 1 auto;min-width:0}
.lnf-pr-choice{font-size:12.5pt;line-height:5.6mm;white-space:nowrap}
.lnf-pr-ansbox{flex:none;display:flex;flex-direction:column;align-items:center;gap:0.5mm;padding-bottom:0.5mm}
.lnf-pr-anslabel{font-size:12.5pt;font-weight:700;line-height:5mm;white-space:nowrap}
.lnf-pr-box{display:inline-block;box-sizing:border-box;height:7.5mm;border:2px solid #333;border-radius:1mm;background:#fff}
.lnf-pr-box-s{width:12.5mm}
.lnf-pr-box-m{width:23mm}
.lnf-pr-chart{flex:none;margin:1mm 0 0 6mm}
.lnf-pr-chart .lnf-chart-title{display:none}
.lnf-pr-chart .lnf-chart{margin:0;border:2px solid #333;border-radius:0}
.lnf-pr-chart .lnf-chart-col{width:10mm;border-right:1px solid #555;border-bottom:1px solid #555}
.lnf-pr-chart .lnf-chart-name{height:4.6mm;line-height:4.6mm;font-size:9pt;background:#fff;border-bottom:1px solid #555}
.lnf-pr-chart .lnf-chart-en{grid-template-columns:repeat(var(--lnf-half),max-content);border:0;overflow:visible;background:transparent;padding:0 1px 1px 0}
.lnf-pr-chart .lnf-chart-en .lnf-chart-col{width:18mm;border:1px solid #333;margin:0 -1px -1px 0;background:#fff}
.lnf-pr-chart .lnf-chart-en .lnf-chart-col:first-child{grid-column-start:var(--lnf-start)}
.lnf-pr-chart .lnf-chart-en .lnf-chart-name{height:7.4mm;line-height:3.6mm;font-size:9pt}
.lnf-pr-chart .lnf-chart-digit{height:6mm;line-height:6mm;font-size:12.5pt;font-weight:700}
.lnf-pr-space{flex:1 1 auto;min-height:0}
.lnf-pr-ansline{flex:none;height:8mm;display:flex;align-items:flex-end;justify-content:flex-end;gap:2mm;padding:0 2mm 1mm 0;box-sizing:border-box}
.lnf-pr-line{display:inline-block;width:40mm;height:0;border-bottom:2px solid #333}
.lnf-pr-fields{flex:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:0.5mm 3mm;padding:0 1mm 0.5mm 0}
.lnf-pr-field{display:inline-flex;align-items:center;gap:1mm;white-space:nowrap}
.lnf-pr-fname{font-size:10pt;font-weight:700}
.lnf-pr-answers{margin-top:3mm}
.lnf-pr-fold{width:100%;height:0;border-top:2px dotted #333;margin:0 0 1.5mm}
.lnf-pr-anshead{font-size:12.5pt;font-weight:700;line-height:6mm}
.lnf-pr-acols{display:flex;gap:4mm}
.lnf-pr-acol{width:93mm}
.lnf-pr-answer{margin:0 0 0.5mm;font-size:10pt;line-height:4.4mm}
#pr-sheet[data-unit="large_number_forms2_3"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="large_number_forms2_3"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="large_number_forms2_3"]>#pr-problems{display:block}
#pr-sheet[data-unit="large_number_forms2_3"] .lnf-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="large_number_forms2_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="large_number_forms2_3"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="large_number_forms2_3"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="large_number_forms2_3"] .lnf-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.lnf-app-pdf-page .lnf-pr-page{box-shadow:none;margin:0}
