/* ── alternating_attribute_pattern_1（こうごに かわる ならびを かんせいしよう、単元仕様書 v1.4）── */
/* 画面（§7）：数字入りの単色図形の並び（折り返さず1行、□は破線の枠）、色名・模様・形で見分ける凡例、2つの答えの欄（かず4つ・いろ／かたち2つ、44px以上。v1.4）。 */
.aap-q{display:block;font-weight:700;line-height:1.5;word-break:keep-all;overflow-wrap:anywhere}
.aap-main{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;max-width:600px;margin:0 auto;box-sizing:border-box}
.aap-caption{margin:0;min-height:1.3em;font-size:14px;font-weight:800;color:#7c3aed}
.aap-seqwrap{width:100%}
.aap-seq{display:flex;flex-wrap:nowrap;justify-content:center;gap:3px;width:100%;box-sizing:border-box;padding:6px 4px;border:2px solid #cbd5e1;border-radius:10px;background:#fff}
.aap-item,.aap-blank{flex:1 1 0;min-width:0;max-width:64px;display:flex;justify-content:center}
.aap-tok{display:flex;flex-direction:column;align-items:center;width:100%}
.aap-tok-svg{display:block;width:100%;height:auto;overflow:visible}
.aap-tok-num{font-size:4.6px;font-weight:800;fill:#111;font-family:'Atkinson Hyperlegible',Arial,sans-serif}
/* さんかくの中の2けたの数は、辺に重ならないよう小さくして下へ置く（独立検査r1）。 */
.aap-tok-num.aap-tok-num2{font-size:3.8px!important}
.aap-nb{white-space:nowrap}
.aap-tok-col{font-size:12px;font-weight:700;line-height:1.2;color:#334155;white-space:nowrap}
.aap-blank{align-self:stretch;box-sizing:border-box;border:2px dashed #7c3aed;border-radius:8px;min-height:36px;background:#faf5ff}
.aap-near{outline:3px solid #facc15;outline-offset:1px;border-radius:6px}
.aap-fade-attr .aap-shape{opacity:.18}
.aap-fade-attr .aap-tok-col{opacity:.3}
.aap-fade-num .aap-tok-num{opacity:.15}
.aap-legwrap{width:100%}
.aap-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 10px}
.aap-leg-item{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:700;color:#334155;white-space:nowrap}
.aap-leg-sw{display:inline-block;width:18px}
.aap-choice-head{margin:2px 0 0;font-weight:800;font-size:14px;color:#334155}
.aap-answer{display:flex;flex-direction:column;gap:8px;width:100%;max-width:460px}
.aap-field{display:flex;flex-direction:column;gap:4px}
.aap-field-head{margin:0;font-weight:800;font-size:15px;color:#334155}
.aap-choices{display:grid;gap:8px;width:100%}
.aap-choices-num{grid-template-columns:repeat(4,1fr)}
.aap-choices-attr{grid-template-columns:repeat(2,1fr)}
.aap-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:6px 8px;border:2px solid #94a3b8;border-radius:12px;background:#fff;color:#1e293b;font-size:1rem;font-weight:700;text-align:left;cursor:pointer;line-height:1.3}
.aap-choice-ico{flex:none;width:26px}
.aap-choice-text{min-width:0;word-break:keep-all;overflow-wrap:anywhere}
.aap-choice:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.aap-choice.aap-selected{border:3px solid #2563eb;background:#eff6ff}
.aap-choice.aap-correct{border:3px solid #16a34a;background:#f0fdf4}
.aap-choice.aap-wrong{border:3px solid #dc2626;background:#fef2f2}
.aap-choice:disabled{cursor:default;color:#1e293b;opacity:1}
.aap-msg{min-height:1.4em;margin:0;color:#b91c1c;font-weight:700;text-align:center;word-break:keep-all;overflow-wrap:anywhere}
.feedback.has-text.aap-feedback{display:flex;flex-direction:column;align-items:center;height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45;word-break:keep-all;overflow-wrap:anywhere}
.aap-fb-ans{font-size:.95em;font-weight:800}
.aap-expl-text{margin:4px 0 6px;line-height:1.8;word-break:keep-all;overflow-wrap:anywhere}
.aap-ex{margin:4px 0;word-break:keep-all;overflow-wrap:anywhere}
.aap-ex-fig{display:flex;justify-content:center;gap:6px;max-width:260px;margin:6px auto}
.aap-ex-fig .aap-item{max-width:56px}
#page-quiz.active:has(.aap-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.aap-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.aap-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.aap-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0;text-align:left;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
#page-lesson:has(.aap-ex-fig){word-break:keep-all;overflow-wrap:anywhere}
#page-lesson:has(.aap-ex-fig) p{text-wrap:pretty}
@media (max-width:360px){.aap-seq{gap:2px;padding:4px 2px}.aap-seq[lang=en] .aap-tok-col{letter-spacing:-.03em}.aap-choices{gap:6px}.aap-choice{padding:6px 4px}.aap-tok-col{font-size:12px}}

/* 印刷：A4横・1ページ（§7。v1.5）。使える領域277×190mm（用紙の余白10mm）。題名の枠（紙面の幅いっぱい）と記入らん・実線（CP-08a・CP-08b）、共通の問いと凡例、
   2列×5段（1問27.5mm＝並び14＋間隔1＋答えの欄2行12＋余り0.5、列136mm×2＋列間5mm）、折り線（点線）、こたえ、解答2行。 */
.aap-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:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.aap-pr-top{flex:none}
.aap-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}
.aap-pr-top .pp-fields{height:8mm;margin:1mm 0 0;gap:6mm;font-size:12.5pt!important}
.aap-pr-top .pp-fields-group{gap:4mm}
.aap-pr-top .pp-field{gap:1mm}
.aap-pr-top .pp-field-line{width:16mm;height:6.5mm}
.aap-pr-top .pp-field-name .pp-field-line{min-width:40mm}
.aap-pr-top hr.pp-fields-solid{display:none}
.aap-pr-solid{box-sizing:content-box;height:0;margin:1mm 0 1mm;padding:0;border:0;border-top:1.5pt solid #333}
.aap-pr-instrow{flex:none;display:flex;align-items:center;justify-content:space-between;height:6.5mm;margin:0 0 1mm}
.aap-pr-inst{margin:0;font-size:13pt;font-weight:700;line-height:6.5mm;white-space:nowrap}
.aap-pr-legend{display:flex;align-items:center;gap:3mm}
.aap-pr-leg-item{display:inline-flex;align-items:center;gap:1mm;font-size:9pt;white-space:nowrap}
.aap-pr-leg-sw{display:inline-block;width:5mm}
.aap-pr-problems{flex:none;display:grid;grid-template-columns:136mm 136mm;column-gap:5mm}
.aap-pr-col{display:flex;flex-direction:column}
.aap-pr-cell{box-sizing:border-box;height:27.5mm;display:flex;flex-direction:column}
.aap-pr-row{display:flex;align-items:flex-start;height:14mm}
.aap-pr-num{flex:none;width:9mm;font-size:12.5pt;font-weight:700;line-height:10mm}
.aap-pr-seq{display:flex;gap:0}
.aap-pr-cell .aap-pr-seq>span{flex:none;width:14mm;display:flex;justify-content:center}
.aap-pr-tok{display:flex;flex-direction:column;align-items:center}
.aap-pr-tok .aap-tok-svg{width:11mm;height:10.5mm}
.aap-pr-tok .aap-tok-num{font-size:4.1px}
.aap-pr-tok-col{font-size:9pt;line-height:3.4mm;white-space:nowrap}
.aap-pr-blank{box-sizing:border-box;width:10mm!important;height:10mm;margin:0 2mm;border:0.5mm dashed #333;border-radius:1mm}
.aap-pr-choices{display:flex;flex-direction:column;margin-top:1mm}
.aap-pr-line{display:flex;align-items:center;height:6mm;gap:3mm}
.aap-pr-fhead{flex:none;width:19mm;font-size:12.5pt;font-weight:700;white-space:nowrap}
.aap-pr-choice{display:flex;align-items:center;gap:1.5mm;height:6mm;min-width:22mm;font-size:12.5pt;white-space:nowrap}
.aap-pr-box{flex:none;box-sizing:border-box;width:5mm;height:5mm;border:0.35mm solid #000}
.aap-pr-answers{flex:none;box-sizing:border-box;width:277mm;margin-top:auto;margin-bottom:1mm}
.aap-pr-border{box-sizing:content-box;display:block;height:0;margin:0 0 0.5mm;padding:0;border:0;border-top:2pt dashed #aaa}
.aap-pr-anshead{margin:0;height:6mm;font-size:12.5pt;font-weight:700;line-height:6mm}
.aap-pr-aline{margin:0;height:6.5mm;font-size:12.5pt;line-height:6.5mm;white-space:nowrap;display:grid;grid-template-columns:repeat(5,55.4mm)}
.aap-pr-page[lang=en] .aap-pr-inst,.aap-pr-page[lang=en] .aap-pr-choice,.aap-pr-page[lang=en] .aap-pr-fhead,.aap-pr-page[lang=en] .aap-pr-aline,.aap-pr-page[lang=en] .aap-pr-tok-col,.aap-pr-page[lang=en] .aap-pr-leg-item{font-family:Arial,'Helvetica Neue','Liberation Sans',sans-serif}
.aap-app-pdf-page .aap-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="alternating_attribute_pattern_1"]{width:277mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="alternating_attribute_pattern_1"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="alternating_attribute_pattern_1"]>#pr-problems{display:block}
#pr-sheet[data-unit="alternating_attribute_pattern_1"] .aap-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="alternating_attribute_pattern_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="alternating_attribute_pattern_1"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="alternating_attribute_pattern_1"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="alternating_attribute_pattern_1"] .aap-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
/* 結果の画面の一覧（§5-3、独立検査r6）：答えは問いの下の行に置き、日本語は語の途中で折り返さない。 */
#result-details .result-row-top:has(.aap-history-prompt){flex-wrap:wrap;gap:6px 8px;align-items:flex-start}
#result-details .result-row-top:has(.aap-history-prompt)>.q-text,#result-details .result-row-top:has(.aap-history-prompt)>span:last-child{flex:1 1 100%;min-width:0;word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
#result-details .result-row:has(.aap-history-prompt) .expl-body{word-break:keep-all;overflow-wrap:anywhere}
#result-details .aap-history-prompt .aap-nw,#result-details .result-row-top:has(.aap-history-prompt)>span:last-child>span{white-space:nowrap}
