/* ── group_fee_attendance_inverse2_5（団体料金と別料金から参加人数を求めよう、単元仕様書 v1.2）── */
/* 画面：問題文の下に料金の表、A群・B群は数を入れる1欄と欄の外の単位・案内・数のキー、C群は4択と案内（§5-3・§7 画面表示）。 */
.gfa-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.gfa-table-wrap{max-width:100%;margin:2px 0 0}
.gfa-table{border-collapse:collapse;font-size:16px;line-height:1.35;background:#fff;color:#111827}
.gfa-table th,.gfa-table td{border:2px solid #475569;padding:4px 10px;vertical-align:middle;white-space:nowrap}
.gfa-table .gfa-row-label{background:#f1f5f9;font-weight:700;text-align:left}
.gfa-table td{text-align:right}
/* ？のますは太字と点線の下線で示す（色だけにたよらない）。 */
.gfa-table .gfa-cell-q{font-weight:800;color:#9a3412;background:#fff7ed;text-decoration:underline dotted 2px;text-underline-offset:3px}
.gfa-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.gfa-input-wrap{display:inline-flex;align-items:center;gap:4px}
.gfa-input{width:6.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}
.gfa-input:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.gfa-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
/* 採点後：正しいときは緑の実線、まちがえたときは赤の点線の太い枠（色だけにせず線の形でも区別する）。 */
.gfa-input.gfa-ok,.gfa-input.gfa-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.gfa-input.gfa-ng,.gfa-input.gfa-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.gfa-unit{font-weight:700;font-size:1.15rem;white-space:nowrap}
/* C群の4択：1つずつ行に置く（式・説明の途中で改行しない）。選ぶだけでは採点しない。 */
.gfa-choices{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:8px 0 2px;width:min(100%,420px)}
.gfa-choice{min-height:48px;padding:6px 10px;border:3px solid #64748b;border-radius:10px;background:#fff;font-family:inherit;font-size:17px;display:flex;align-items:center;gap:10px;cursor:pointer;color:#111;text-align:left}
.gfa-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.gfa-choice-letter{flex:none;font-weight:800;min-width:1.4em;text-align:center}
.gfa-choice-text{flex:1;min-width:0}
.gfa-choice.gfa-selected{border-color:#1d4ed8;background:#dbeafe;box-shadow:0 0 0 2px #1d4ed8 inset}
.gfa-choice:disabled{cursor:default;opacity:1;color:#111}
.gfa-choice.gfa-ok{border:3px solid #15803d;background:#dcfce7}
.gfa-choice.gfa-ng{border:3px dashed #b91c1c;background:#fff1f2}
.gfa-choice.gfa-right{border:3px solid #15803d}
.gfa-choice.gfa-right::after{content:'✓';font-weight:700;color:#15803d;margin-left:auto}
.gfa-guide{margin:4px 0 0;font-size:15px;text-align:center;line-height:1.4}
.gfa-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.gfa-msg:empty{min-height:0;margin:0}
/* キーはほかの数の問いと同じ共通テンキーの配置（main.css の .numpad・.num-btn：3列、1〜9、最下段に0（2列分）と⌫）。ここでは幅と上の余白だけを変える（2026-11-18 オーナー指摘「テンキーのレイアウトが他と異なります」）。 */
/* 共通テンキーは renderQuestion が max-width:240px を直接指定するので、狭い画面でも同じ幅にそろえる。 */
.gfa-keypad{width:100%;max-width:240px;margin-top:10px}
.gfa-keypad[hidden]{display:none}
/* キーは操作の部品なので、共通テンキーと同じ UI の字体（--font-ui）にする（デザイン層仕様書 §1-2「UI 字体は非波及」。学習の字体だと 0 に斜線が入り、共通テンキーと字の形が違って見える）。 */
.gfa-key{min-height:44px;font-family:var(--font-ui)}
.feedback.has-text.gfa-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.gfa-answer{margin:4px 0;font-weight:700;overflow-wrap:anywhere}
.gfa-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.gfa-example-q{margin:4px 0}
.gfa-example-answer{margin:6px 0;font-size:14px;color:#334155}
/* 日本語は文字の間で折り返す。数と式は .gfa-nb で折らない（§7）。 */
#page-quiz.active:has(.gfa-main) #question-text,#page-quiz.active:has(.gfa-main) #hint-area .kp-body,#page-quiz.active:has(.gfa-main) #feedback,.gfa-expl-text,.gfa-answer,.gfa-guide,.gfa-msg,.gfa-choice-text{word-break:normal;overflow-wrap:break-word;line-break:strict}
.gfa-nb{white-space:nowrap}
#page-quiz.active:has(.gfa-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.gfa-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.gfa-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.gfa-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
/* 360 CSS px の幅でも表の列が欠けないように、せまい画面では文字と余白を小さくする（ページ全体の横スクロール0。§7）。 */
@media (max-width:420px){
  .gfa-table{font-size:15px}
  .gfa-table th,.gfa-table td{padding:3px 6px}
  .gfa-choice{font-size:16px;padding:5px 8px;gap:8px}
}
/* 品質検査466：320 CSS px（小さいスマホ）の英語でも右の列が欠けないように、さらに文字と余白を小さくする。 */
@media (max-width:340px){
  .gfa-table{font-size:14px}
  .gfa-table th,.gfa-table td{padding:3px 4px}
}

/* 印刷：A4縦・1ページ（§7。用紙の余白 上下5mm・左右6mm、本文198×287mm。題名と記入欄、共通の問い、2列×5段で1問44.5mm、答え2行）。 */
.gfa-pr-page{width:190mm;height:277mm;box-sizing:border-box;display:flex;flex-direction:column;padding:0;margin:0 auto 8mm;overflow:hidden;background:#fff;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.gfa-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19.5mm}
.gfa-pr-title{box-sizing:border-box;margin:0;height:9mm;font-size:15pt;font-weight:700;line-height:8mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.gfa-pr-page[lang="en"] .gfa-pr-title{font-size:14pt}
.gfa-pr-fields{display:flex;gap:6mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12pt;line-height:6mm;white-space:nowrap}
.gfa-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.gfa-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.gfa-pr-field-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:2px solid #555}
.gfa-field-name{flex:1;min-width:0}
.gfa-field-name .gfa-pr-field-line{flex:1;width:auto;min-width:40mm}
.gfa-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.gfa-pr-common{flex:none;box-sizing:border-box;width:187mm;margin:1mm 0 0;height:27mm;font-size:12.5pt;line-height:5.2mm;overflow:hidden;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.gfa-pr-problems{display:flex;gap:3mm;flex:none;width:187mm;height:214.5mm}
.gfa-pr-col{flex:none;width:92mm;display:flex;flex-direction:column}
.gfa-pr-cell{box-sizing:border-box;height:auto;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:flex-start;padding:1mm 0 0;border-bottom:0.2mm solid transparent;overflow:hidden;font-size:12.5pt}
.gfa-pr-top{display:flex;align-items:flex-start;gap:2mm}
.gfa-pr-num{flex:none;width:9.2mm;font-weight:700;line-height:5mm;white-space:nowrap}
.gfa-pr-page[lang="en"] .gfa-pr-num{width:auto;min-width:6.2mm}
.gfa-pr-page[lang="en"] .gfa-pr-top{gap:1.5mm}
.gfa-pr-page[lang="en"] .gfa-pr-table th,.gfa-pr-page[lang="en"] .gfa-pr-table td{padding:0 1.2mm}
/* 印刷の料金の表は12.5pt（各問の問題文の役をするため。BC-01・OD-GFA-11）。線は2px（約0.53mm）。C群は総額の行を置かない（BC-22）。 */
.gfa-pr-table{border-collapse:collapse;font-size:12.5pt;line-height:5mm}
.gfa-pr-table th,.gfa-pr-table td{border:2px solid #333;padding:0 1.5mm;vertical-align:middle;white-space:nowrap;font-weight:400}
.gfa-pr-table .gfa-pr-label{text-align:left}
.gfa-pr-table td{text-align:right}
.gfa-pr-table .gfa-cell-q{font-weight:700}
.gfa-pr-blank{margin:0.8mm 0 0 11.2mm;line-height:6mm;white-space:nowrap;display:flex;align-items:flex-end}
.gfa-pr-page[lang="en"] .gfa-pr-blank{margin-left:7.7mm}
.gfa-pr-blank-box{display:inline-block;height:6mm}
.gfa-pr-blank-people{width:16mm}
.gfa-pr-blank-yen{width:24mm}
.gfa-pr-choices{margin:0.6mm 0 0 8mm;display:flex;flex-direction:column}
.gfa-pr-page[lang="en"] .gfa-pr-choices{margin-left:7.7mm}
.gfa-pr-choice{line-height:4.9mm;white-space:nowrap}
.gfa-pr-answers{flex:none;box-sizing:border-box;width:187mm;height:15mm}
.gfa-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}
.gfa-pr-ans-grid{display:grid;grid-template-columns:auto 1fr;column-gap:2mm;align-items:end}
.gfa-pr-ans-title{font-weight:700;font-size:12.5pt;line-height:5mm;white-space:nowrap}
.gfa-pr-ans-row{display:flex;font-size:10pt;line-height:5mm;white-space:nowrap}
.gfa-pr-ans{flex:none;width:33mm;overflow:hidden}
.gfa-app-pdf-page .gfa-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="group_fee_attendance_inverse2_5"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="group_fee_attendance_inverse2_5"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="group_fee_attendance_inverse2_5"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白を白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="group_fee_attendance_inverse2_5"] .gfa-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="group_fee_attendance_inverse2_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="group_fee_attendance_inverse2_5"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="group_fee_attendance_inverse2_5"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="group_fee_attendance_inverse2_5"] .gfa-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
