/* ── nested_parentheses_order3_4（入れ子のかっこを外側から整理しよう、単元仕様書 v1.3）── */
/* 画面：問題文、式と式の木（A群は回答後だけ）、C群の書きかえの図、4択、回答案内。回答後は大わく・内わく（§5-3・§7）。 */
#question-text .npo-q{display:block}
.npo-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.npo-figs{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;column-gap:16px;row-gap:6px;max-width:100%;margin:2px auto 6px}
.npo-expr{font-size:21px;font-weight:800;color:#0f172a;font-variant-numeric:tabular-nums;padding:6px 12px;border:2px solid #64748b;border-radius:10px;background:#fff;word-break:keep-all;overflow-wrap:normal;max-width:100%}
.npo-tree{display:block;max-width:100%;height:auto}
.npo-tree-line{stroke:#64748b;stroke-width:2}
.npo-tree-op{fill:#fff;stroke:#1e3a8a;stroke-width:2}
.npo-tree-sym{font-size:16px;font-weight:800;fill:#1e3a8a}
.npo-tree-leaf{font-size:16px;font-weight:800;fill:#0f172a}
.npo-box-outer{fill:none;stroke:#b45309;stroke-width:3.5}
.npo-box-inner{fill:none;stroke:#15803d;stroke-width:2.5;stroke-dasharray:5 4}
.npo-box-label{font-size:12.5px;font-weight:700;fill:#334155}
.npo-trace{display:flex;flex-direction:column;gap:3px;margin:2px auto 8px;padding:6px 12px;border:2px dashed #94a3b8;border-radius:10px;background:#f8fafc;max-width:100%}
.npo-trace-row{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.npo-trace-step{font-size:14px;color:#475569;white-space:nowrap}
.npo-trace-f{word-break:keep-all;overflow-wrap:anywhere}
.npo-trace-mark{font-size:13px;font-weight:800;color:#b91c1c;border:2px solid #b91c1c;border-radius:6px;padding:0 4px;white-space:nowrap}
.npo-guide{margin:4px 0 2px;font-size:15px;font-weight:700;text-align:center;line-height:1.4}
.npo-guide[hidden]{display:none}
.npo-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,640px);margin:2px auto}
.npo-choice{position:relative;box-sizing:border-box;min-height:52px;padding:6px 8px 6px 26px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.05rem;font-weight:800;font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation;text-align:left;word-break:keep-all;overflow-wrap:anywhere}
.npo-check{position:absolute;top:1px;left:6px;font-size:18px;font-weight:900;color:#1d4ed8}
.npo-choice.npo-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.npo-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.npo-choice:disabled{cursor:default;opacity:1}
.npo-choice.npo-ok,.npo-choice.npo-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.npo-choice.npo-ng,.npo-choice.npo-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.npo-choice.npo-right,.npo-choice.npo-right:disabled{border:3px solid #15803d;background:#f0fdf4;color:#14532d}
.npo-ok .npo-check,.npo-right .npo-check{color:#15803d}
.npo-ng .npo-check{color:#b91c1c}
.npo-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.npo-msg:empty{min-height:0;margin:0}
.feedback.has-text.npo-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.npo-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.npo-expl-text{margin:4px 0 6px;word-break:normal;overflow-wrap:normal;line-break:strict}
.npo-chunk{white-space:nowrap}
.npo-score{margin:6px 0 2px;font-weight:800;color:#1e3a8a}
@media (max-width:480px){.npo-expr{font-size:18px}.npo-trace-row{font-size:16px}.npo-choices-A{grid-template-columns:minmax(0,1fr)}}
@media (max-width:360px){.npo-expr{font-size:16.5px}.npo-choice{font-size:.98rem;padding-left:24px}}

.npo-example .npo-ex-q{font-weight:700;margin:6px 0 2px}
.npo-example .npo-ex-a{margin:2px 0 8px;overflow-wrap:anywhere}
#page-quiz.active:has(.npo-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.npo-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.npo-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.npo-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.npo-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}

/* 印刷：A4縦・2列・1ページ（§7）。題名の枠（幅いっぱい・中央）とその下の記入欄、共通の案内、2列（各5問、各問の高さ 45mm）、破線、答え1行。 */
.npo-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}
.npo-pr-headrow{display:flex;flex-direction:column;gap:1.5mm;flex:none}
.npo-pr-title{box-sizing:border-box;margin:0;height:8mm;width:100%;padding:0 2mm;font-size:14pt;font-weight:700;line-height:7.4mm;white-space:nowrap;text-align:center;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact;flex:none}
.npo-pr-page[lang="en"] .npo-pr-title{font-size:14pt}
.npo-pr-hfields{display:flex;gap:2mm;align-items:flex-end;min-width:0;height:6mm;font-size:12pt;line-height:6mm;white-space:nowrap}
.npo-pr-hfield{display:inline-flex;align-items:flex-end;gap:1mm;flex:none}
.npo-pr-hfield-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:2px solid #555}
.npo-hfield-name{flex:1;min-width:0}
.npo-hfield-name .npo-pr-hfield-line{flex:1;width:auto;min-width:30mm}
.npo-pr-headline{display:block;height:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.npo-pr-inst{flex:none;margin:1.2mm 0 0;font-size:12.5pt;line-height:5.5mm}
.npo-pr-problems{flex:none;display:grid;grid-template-columns:repeat(2,91mm);column-gap:4mm;margin:5.2mm 0 0}
.npo-pr-col{display:flex;flex-direction:column}
.npo-pr-cell{box-sizing:border-box;height:45mm;overflow:hidden;padding:0.6mm 0 0;background:linear-gradient(#bbb,#bbb) top left/100% 2px no-repeat;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.npo-pr-q{font-size:12.5pt;line-height:5.6mm;max-height:11.2mm;font-weight:700;word-break:keep-all;overflow-wrap:normal}
.npo-pr-e{font-weight:400}
.npo-pr-ask{height:6mm;line-height:6mm;font-size:12.5pt;white-space:nowrap}
.npo-pr-area{display:flex;gap:4mm;height:22mm;font-size:12.5pt;line-height:5.5mm}
.npo-pr-area-A{flex-direction:column;gap:0;white-space:nowrap}
.npo-pr-choice{height:5.5mm;white-space:nowrap}
.npo-pr-choices{display:flex;flex-direction:column;flex:none}
.npo-pr-work{box-sizing:border-box;width:67mm;height:22mm;border:1px dashed #999;border-radius:1.5mm;padding:0.5mm 1.5mm;flex:none}
.npo-pr-work-label{font-size:9pt;line-height:4mm;color:#333}
.npo-pr-trace{width:64mm;flex:none;font-size:9pt;line-height:4.4mm;white-space:nowrap}
.npo-pr-trace-row{height:4.4mm}
.npo-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5.2mm}
.npo-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.8mm;padding:0;border:0;border-top:2pt dashed #aaa}
.npo-pr-ansrow{display:grid;grid-template-columns:22mm repeat(10,16.8mm);align-items:baseline;height:5.5mm;line-height:5.5mm;font-size:10pt;white-space:nowrap}
.npo-pr-answers-title{font-weight:700;font-size:12.5pt}
.npo-app-pdf-page .npo-pr-page{box-shadow:none;margin:0}

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