/* number_representation_match2_1（単元仕様書 v1.4 §7） */
/* 画面：提示カードと選択肢のカード（44px以上）、C は左右3枚ずつの2列と結んだ線。色に頼らず、カードの種類の名前を添える。 */
.nrm-main{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;box-sizing:border-box;padding:4px 0}
.nrm-q{word-break:keep-all;overflow-wrap:anywhere}
.nrm-card-svg{display:block;width:100%;height:auto}
.nrm-choice .nrm-card-svg>rect:first-child,.nrm-mcard .nrm-card-svg>rect:first-child,.nrm-shown .nrm-card-svg>rect:first-child{stroke:none}
/* カードの数字（独立検査r5）：0 に斜線のない字形を、画面・ブラウザ印刷・アプリのPDFでそろえて使う。 */
.nrm-card-num{font-size:12px;font-weight:700;fill:#111;font-family:Arial,'Helvetica Neue',Helvetica,sans-serif!important}
.nrm-kind{display:block;font-size:12px;font-weight:700;color:#334155;line-height:1.2;text-align:center;word-break:keep-all}
.nrm-shown{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;width:112px;padding:6px;border:3px solid #1e293b;border-radius:12px;background:#fff;box-sizing:border-box}
.nrm-card-fig{display:block;width:100%}
.nrm-choices{display:grid;gap:10px;width:100%;max-width:520px;grid-template-columns:repeat(var(--nrm-n,3),minmax(0,1fr))}
.nrm-choices-A{--nrm-n:3}.nrm-choices-B{--nrm-n:4}
.nrm-choice,.nrm-mcard{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:48px;min-width:44px;padding:6px;border:2px solid #94a3b8;border-radius:12px;background:#fff;cursor:pointer;box-sizing:border-box;font:inherit;color:inherit}
.nrm-choice:focus-visible,.nrm-mcard:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.nrm-selected{border-color:#1d4ed8;border-width:4px;box-shadow:0 0 0 2px #bfdbfe;padding:4px}
.nrm-correct{border-color:#15803d;border-width:4px;padding:4px}
/* 採点後の印（独立検査r10）：字体によらず同じ形になるよう、○と×は図（SVG）で描く。 */
.nrm-correct::after{content:'';position:absolute;top:-10px;right:-6px;width:24px;height:24px;border-radius:50%;box-sizing:border-box;border:0;box-shadow:0 0 0 1px #cbd5e1;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='7.5' fill='none' stroke='%2315803d' stroke-width='2.8'/%3E%3C/svg%3E") center/20px 20px no-repeat}
.nrm-wrong{border-color:#b91c1c;border-style:dashed}
.nrm-wrong::after{content:'';position:absolute;top:-10px;right:-6px;width:24px;height:24px;border-radius:50%;box-sizing:border-box;border:0;box-shadow:0 0 0 1px #cbd5e1;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='5' y1='5' x2='15' y2='15' stroke='%23b91c1c' stroke-width='2.8' stroke-linecap='round'/%3E%3Cline x1='15' y1='5' x2='5' y2='15' stroke='%23b91c1c' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E") center/20px 20px no-repeat}
.nrm-hl{box-shadow:0 0 0 4px #f59e0b}
.nrm-hl.nrm-hl3{box-shadow:0 0 0 4px #f59e0b,0 0 0 7px #92400e}
.nrm-badge-ghost{visibility:hidden}
.nrm-badge{display:block;margin-top:2px;width:30px;height:24px;border:2px dashed #475569;border-radius:4px;color:transparent;font-size:12px;line-height:20px;text-align:center}
.nrm-guide{margin:0;font-size:14px;color:#334155;text-align:center;word-break:keep-all;overflow-wrap:anywhere}
.nrm-match{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(48px,0.9fr) minmax(0,1fr);width:100%;max-width:440px}
.nrm-col{display:flex;flex-direction:column;gap:12px;z-index:1}
.nrm-col-L{grid-column:1}.nrm-col-R{grid-column:3}
.nrm-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:2}
.nrm-line{stroke:#1e293b;stroke-width:3;stroke-linecap:round}
.nrm-mark-bg{fill:#fff;stroke:none}
.nrm-mark{font-size:17px;font-weight:800;fill:#111}
.nrm-mark-ng{fill:#b91c1c}.nrm-mark-ok{fill:#15803d}
.nrm-paired{border-style:solid;border-color:#1e293b;background:#f8fafc}
.nrm-msg{min-height:1.4em;margin:0;font-weight:700;color:#b45309;text-align:center}
.feedback.has-text.nrm-feedback{height:auto;min-height:46px;padding:4px 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;word-break:keep-all;overflow-wrap:anywhere;line-height:1.45}
.nrm-fb-ans{display:inline-flex;align-items:center;gap:6px;font-weight:800}
.nrm-mini{display:inline-block;width:52px;vertical-align:middle}
/* 数字の字形（独立検査r7）：カードの数字と同じ 0 に斜線のない字形にそろえる（かなは日本語の字体）。 */
.nrm-fb-val{font-size:20px;font-family:Arial,'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.nrm-expl-text{font-family:Arial,'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.nrm-mark{font-family:'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.nrm-expl-body{display:flex;flex-direction:column;gap:6px}
.nrm-expl-pair{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.nrm-expl-text,.nrm-expl-pair .nrm-expl-text{margin:0;word-break:keep-all;overflow-wrap:anywhere}
.nrm-ex-fig{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:6px 0}
.nrm-ex-card{display:inline-block;flex:none;width:60px;border-radius:10px}
.nrm-ex-ok{outline:4px solid #15803d;outline-offset:2px}
.nrm-ex-arrow{font-size:22px;font-weight:800}
/* 例題の選択肢の3枚は、折り返すときも1行にまとめる（独立検査r8）。 */
.nrm-ex-choices{display:inline-flex;flex-wrap:nowrap;gap:inherit}
.nrm-ex{word-break:keep-all;overflow-wrap:anywhere}
#page-quiz.active:has(.nrm-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.nrm-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.nrm-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.nrm-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(.nrm-ex-fig){word-break:keep-all;overflow-wrap:anywhere}
#page-lesson:has(.nrm-ex-fig) p{text-wrap:pretty}
@media (max-width:420px){.nrm-choices-A,.nrm-choices-B{--nrm-n:2}.nrm-ex-card{width:44px}.nrm-ex-fig{gap:7px}.nrm-ex-ok{outline-width:3px;outline-offset:0}.nrm-ex-arrow{font-size:18px}.nrm-shown{width:96px}.nrm-match{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr)}}
@media (max-width:340px){.nrm-choices-A{gap:8px}.nrm-choice,.nrm-mcard{padding:4px}.nrm-selected,.nrm-correct{padding:2px}}
/* 結果の画面の一覧（§5-3）：答えは問いの下の行に置き、日本語は語の途中で折り返さない。 */
#result-details .result-row-top:has(.nrm-history-prompt){flex-wrap:wrap;gap:6px 8px;align-items:flex-start}
#result-details .result-row-top:has(.nrm-history-prompt)>.q-text,#result-details .result-row-top:has(.nrm-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-top:has(.nrm-history-prompt)>span:last-child>span{white-space:nowrap}
#result-details .result-row:has(.nrm-history-prompt) .expl-body{word-break:keep-all;overflow-wrap:anywhere}

/* 印刷：A4縦・1ページ（§7。v1.4）。使える領域200×287mm。題名の枠と記入らん・実線（CP-08a・CP-08b）、群A・群B・群Cの帯、区切り線、こたえ。カードは1辺20mm。 */
/* 紙面の字体（独立検査r6）：数字はカードと同じ 0 に斜線のない字形にそろえ、かなは日本語の字体で書く。 */
.nrm-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:Arial,'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.nrm-pr-page .pp-field-label{font-family:inherit}
.nrm-pr-top{flex:none}
.nrm-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}
.nrm-pr-top .pp-fields{margin-top:1mm}
.nrm-pr-solid{margin:1mm 0 0;border:0;border-top:0.5mm solid #000}
.nrm-pr-band{flex:none;margin-top:4mm}
.nrm-pr-band-A{margin-top:1.5mm}
.nrm-pr-q{margin:0;height:6mm;line-height:6mm;font-size:13pt;font-weight:700;white-space:nowrap;word-break:keep-all}
.nrm-pr-note{font-weight:400;font-size:13pt}
.nrm-pr-page[lang=ja] .nrm-pr-note{font-family:'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.nrm-pr-cells{display:flex;justify-content:space-between}
.nrm-pr-cells-B{flex-wrap:wrap;row-gap:2.5mm}
.nrm-pr-cell{display:flex;align-items:flex-start;gap:1mm}
.nrm-pr-num{flex:none;width:8mm;font-size:12.5pt;line-height:6mm}
.nrm-pr-card{position:relative;display:block;flex:none;width:20mm;height:20mm}
.nrm-pr-card .nrm-card-svg{width:20mm;height:20mm}
.nrm-pr-shown .nrm-card-svg rect:first-child{stroke:#000;stroke-width:1.1}
.nrm-pr-grid2{display:grid;grid-template-columns:20mm 20mm;grid-template-rows:20mm 20mm;gap:3mm}
.nrm-pr-a{width:62mm}
.nrm-pr-b{width:94mm}
.nrm-pr-bwrap{display:flex;flex-direction:column;gap:2mm}
.nrm-pr-brow{display:flex;gap:1.5mm}
.nrm-pr-c{width:60mm;flex-direction:column;gap:0}
.nrm-pr-c .nrm-pr-num{width:auto;height:5mm;line-height:5mm}
.nrm-pr-cwrap{display:flex;flex-direction:column;gap:2mm}
.nrm-pr-crow{display:flex;align-items:center}
.nrm-pr-gap{display:block;flex:none;width:20mm}
/* カードの記号（独立検査r4）：カードの中に重ねると枠や指の先をかくすので、線を引く側の上の角の外に置く。 */
.nrm-pr-letter{position:absolute;top:0;right:-4mm;width:3.5mm;text-align:center;font-size:10pt;line-height:1;font-weight:700}
.nrm-pr-crow .nrm-pr-card:last-child .nrm-pr-letter{right:auto;left:-4mm}
.nrm-pr-answers{flex:none;margin-top:2.5mm}
.nrm-pr-border{margin:0 0 1.5mm;border:0;border-top:2pt dashed #aaa}
.nrm-pr-aline{display:flex;flex-wrap:nowrap;align-items:baseline;gap:3.5mm;margin:0;height:6.5mm;line-height:6.5mm;font-size:12.5pt;white-space:nowrap}
.nrm-pr-anshead{font-weight:700;margin-right:1mm}
.nrm-pr-answer{white-space:nowrap}
.nrm-pr-crowans{display:flex;justify-content:space-between;margin-top:1mm}
.nrm-pr-cans{display:grid;grid-template-columns:10mm auto;width:60mm;font-size:12.5pt;line-height:5.5mm;white-space:nowrap}
.nrm-pr-cans .nrm-pr-anum{grid-row:1 / span 3}
.nrm-pr-cline{grid-column:2}
#pr-sheet[data-unit="number_representation_match2_1"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="number_representation_match2_1"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="number_representation_match2_1"]>#pr-problems{display:block}
#pr-sheet[data-unit="number_representation_match2_1"] .nrm-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="number_representation_match2_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="number_representation_match2_1"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="number_representation_match2_1"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="number_representation_match2_1"] .nrm-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
