/* ── attribute_filter_count2_1（じょうけんを しぼって かぞえよう、単元仕様書 v1.6）── */
/* 画面：問題文、条件札（Bは2段）、条件チェック欄（ヒント3）、記号表（押すと しるし）、こたえの欄、共通のテンキー、案内。回答後は解説（§5-3・§7）。 */
#question-text .afc-q{display:block;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
.afc-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:10px}
.afc-fig{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:100%}
.afc-cards{display:flex;flex-direction:column;align-items:center;gap:6px}
.afc-cardrow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:center}
.afc-rownum{font-weight:900;font-size:1rem;min-width:1.4em;text-align:center;border:2px solid #475569;border-radius:50%}
.afc-card{box-sizing:border-box;padding:5px 12px;border:3px solid #7c3aed;border-radius:10px;background:#f5f3ff;font-weight:800;font-size:1.05rem;white-space:nowrap}
.afc-card.afc-hl{box-shadow:0 0 0 4px #facc15;background:#fef9c3}
.afc-arrow{font-weight:900;color:#334155}
.afc-checklist{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:center;font-weight:800}
.afc-check{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border:2px dashed #94a3b8;border-radius:8px;background:#fff}
.afc-box{font-size:1.1rem}
.afc-table{display:flex;flex-direction:column;align-items:center;gap:4px;max-width:100%}
.afc-table-head{margin:0;font-weight:800;font-size:.95rem}
.afc-grid{display:grid;grid-template-columns:repeat(5,minmax(48px,80px));gap:8px;max-width:100%}
.afc-sym{position:relative;box-sizing:border-box;min-width:44px;min-height:46px;padding:0;border:2px solid #475569;border-radius:8px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.afc-sym .afc-sym-svg{display:block;width:100%;height:auto}
.afc-num{position:absolute;top:1px;left:4px;font-size:12px;font-weight:800;color:#111827;line-height:1}
.afc-sym.afc-marked{border:3px solid #2563eb;background:#eff6ff}
.afc-sym.afc-thin{outline:2px dashed #a16207;outline-offset:2px}
.afc-mark{position:absolute;top:2px;right:2px;font-size:15px;font-weight:900;color:#1d4ed8;background:#fff;border-radius:50%;line-height:1;padding:1px 2px}
button.afc-sym:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
button.afc-sym:disabled{cursor:default;opacity:1}
.afc-fields{display:flex;justify-content:center}
.afc-field{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:1.1rem}
.afc-label{white-space:nowrap}
.afc-input{width:3.2em;min-height:48px;font-size:1.4rem;padding:0 4px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;font-weight:800;box-sizing:border-box}
.afc-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.afc-input.afc-ok,.afc-input.afc-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.afc-input.afc-ng,.afc-input.afc-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.afc-msg{word-break:keep-all;min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.4;max-width:560px}
.afc-msg:empty{min-height:0;margin:0}
.afc-main .ufk-keypad{margin-top:2px}
.feedback.has-text.afc-feedback{display:block;height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45;word-break:keep-all;overflow-wrap:anywhere}
.afc-answer{margin:4px 0;font-weight:800;word-break:keep-all}
.afc-expl-text{margin:4px 0 6px;line-height:1.8;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
.afc-ex{margin:6px 0 8px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
#page-quiz.active:has(.afc-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.afc-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.afc-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.afc-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
#page-quiz:has(#question-text[data-unit="attribute_filter_count2_1"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="attribute_filter_count2_1"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
@media (max-width:360px){.afc-grid{grid-template-columns:repeat(5,minmax(48px,1fr));gap:4px}.afc-card{padding:4px 8px;font-size:1rem}}

/* 印刷：A4縦・1ページ（§7。v1.4〜v1.6）。題名の枠（紙面の幅いっぱい）と、その下の記入らん・実線（共通仕様 CP-08a・CP-08b。v1.6）、共通の問い1回、2列×5段の各問（番号と条件札、記号表、こたえ欄）、破線、解答2段。 */
.afc-pr-page{width:190mm;height:277mm;box-sizing:border-box;display:flex;flex-direction:column;padding:0.8mm 0 0;margin:0 auto 8mm;overflow:hidden;background:#fff;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.afc-pr-top{flex:none}
.afc-pr-title{box-sizing:border-box;width:100%;margin:0;height:8mm;padding:0 2mm;font-size:13pt;font-weight:700;line-height:calc(8mm - 3pt);white-space:nowrap;text-align:center;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.afc-pr-top .pp-fields{height:8mm;margin:1mm 0 0;gap:5mm;font-size:12pt!important}
.afc-pr-top .pp-fields-group{gap:3mm}
.afc-pr-top .pp-field{gap:1mm}
.afc-pr-top .pp-field-line{width:14.5mm;height:6.5mm}
.afc-pr-top .pp-field-name .pp-field-line{min-width:40mm}
.afc-pr-top hr.pp-fields-solid{display:none}
.afc-pr-solid{box-sizing:content-box;height:0;margin:1mm 0 1mm;padding:0;border:0;border-top:1.5pt solid #333}
.afc-pr-inst{margin:0 0 0.8mm;font-size:13pt;line-height:6.2mm;flex:none}
.afc-pr-problems{flex:none;display:grid;grid-template-columns:93mm 93mm;column-gap:4mm}
.afc-pr-col{display:flex;flex-direction:column;gap:1.2mm}
.afc-pr-cell{box-sizing:border-box;border:2px solid transparent;border-radius:1mm;padding:0.6mm 0.8mm 0.4mm;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.afc-pr-cell-ac{height:42.5mm}
.afc-pr-cell-b{height:51.5mm}
.afc-pr-head{flex:none}
.afc-pr-line{margin:0;height:7.6mm;display:flex;align-items:center;gap:1.4mm;font-size:10.5pt;white-space:nowrap}
.afc-pr-num{font-weight:700;font-size:12pt;min-width:9mm}
.afc-pr-numsp{display:inline-block;min-width:9mm}
.afc-pr-rownum{display:inline-block;box-sizing:border-box;width:5mm;height:5mm;line-height:4.4mm;text-align:center;border:0.35mm solid #475569;border-radius:50%;font-weight:700;font-size:10pt}
.afc-pr-card{box-sizing:border-box;padding:0.6mm 2mm;border:0.4mm solid #7c3aed;border-radius:1.2mm;font-weight:700;font-size:10.5pt;line-height:5mm}
.afc-pr-arrow{font-weight:900;font-size:10.5pt}
.afc-pr-grid{flex:none;display:grid;grid-template-columns:repeat(5,18mm);grid-auto-rows:12mm;width:90mm}
.afc-pr-sym{position:relative;box-sizing:border-box;border:0.25mm solid #475569;width:18mm;height:12mm}
.afc-pr-sym .afc-sym-svg{position:absolute;left:0;top:0;display:block}
.afc-pr-symnum{position:absolute;left:0.6mm;top:0.2mm;font-size:9pt;font-weight:700;line-height:3.6mm;z-index:1}
.afc-pr-entry{margin:0;align-self:flex-end;font-size:12pt;line-height:8.4mm;height:8.6mm;white-space:nowrap;display:flex;align-items:center;gap:1mm}
.afc-pr-frame{display:inline-block;box-sizing:border-box;width:16mm;height:8mm;border:0.4mm solid #000;border-radius:1mm}
.afc-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;margin-bottom:0.6mm}
.afc-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0.5mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.afc-pr-ansrow{display:grid;grid-template-columns:repeat(5,1fr)}
.afc-pr-answer{font-size:12.6pt;line-height:5.8mm;white-space:pre}
.afc-pr-page[lang=en] .afc-pr-inst,.afc-pr-page[lang=en] .afc-pr-answer,.afc-pr-page[lang=en] .afc-pr-line,.afc-pr-page[lang=en] .afc-pr-entry{font-family:Arial,'Helvetica Neue','Liberation Sans',sans-serif}
.afc-app-pdf-page .afc-pr-page{box-shadow:none;margin:0}

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