/* ── digit_extreme_number3_4（数字カードで最大最小の数を作ろう、単元仕様書 v1.2）── */
/* 画面：問題文、数字カード（名前と数字）、B群の位のわく（決める位は太い二重のわく）、要約の文、回答案内、四つの選択肢（§5-3・§7）。 */
#question-text .dxn-q{display:block}
.dxn-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.dxn-fig{display:flex;flex-direction:column;align-items:center;gap:8px;width:min(100%,640px);margin:2px auto 4px}
.dxn-cards{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:100%}
.dxn-card{display:inline-flex;align-items:baseline;gap:4px;min-width:50px;box-sizing:border-box;padding:6px 8px;border:2px solid #475569;border-radius:8px;background:#fff;font-weight:800}
.dxn-card-id{font-size:15px;color:#64748b}
.dxn-card-d{font-size:26px;color:#0f172a;line-height:1}
.dxn-frames{display:flex;gap:5px;justify-content:center}
.dxn-frame{display:inline-flex;align-items:center;justify-content:center;width:30px;height:36px;box-sizing:border-box;border:2px solid #64748b;border-radius:4px;background:#fff;font-weight:800;font-size:17px;color:#1e3a8a}
.dxn-frame-fix{border:5px double #1e3a8a;background:#eff6ff}
.dxn-alt{margin:2px 0 6px;font-size:14px;color:#334155;text-align:center;line-height:1.5;overflow-wrap:anywhere}
.dxn-guide{margin:4px 0 2px;font-size:15px;font-weight:700;text-align:center;line-height:1.4}
.dxn-guide[hidden]{display:none}
.dxn-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,560px);margin:2px auto}
.dxn-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.25rem;font-weight:800;font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation;text-align:center;white-space:nowrap}
.dxn-check{position:absolute;top:50%;left:7px;transform:translateY(-50%);font-size:18px;font-weight:900;color:#1d4ed8}
.dxn-choice.dxn-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.dxn-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.dxn-choice:disabled{cursor:default;opacity:1}
.dxn-choice.dxn-ok,.dxn-choice.dxn-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.dxn-choice.dxn-ng,.dxn-choice.dxn-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.dxn-choice.dxn-right,.dxn-choice.dxn-right:disabled{border:3px solid #15803d;background:#f0fdf4;color:#14532d}
.dxn-ok .dxn-check,.dxn-right .dxn-check{color:#15803d}
.dxn-ng .dxn-check{color:#b91c1c}
.dxn-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.dxn-msg:empty{min-height:0;margin:0}
.feedback.has-text.dxn-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.dxn-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.dxn-expl-text{margin:4px 0 6px;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.dxn-score{margin:6px 0 2px;font-weight:800;color:#1e3a8a}
@media (max-width:480px){
  .dxn-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:300px}
  .dxn-card{min-width:0;justify-content:center;padding:5px 4px}
  .dxn-card-d{font-size:23px}
  .dxn-frame{width:26px;height:32px;font-size:15px}
  .dxn-choice{font-size:1.1rem}
}
@media (max-width:360px){.dxn-frames{gap:3px}.dxn-frame{width:24px}.dxn-choice{font-size:1rem;padding-left:22px}}

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

/* 印刷：A4縦・1列・1ページ（§7）。題名の枠と記入欄、共通の案内4行、10問（1行目：番号・カード・B群のわく・条件の語、2行目：四つの選択肢・答え・記入欄）、破線、答え5列2行。 */
.dxn-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}
.dxn-pr-headrow{display:flex;flex-direction:column;gap:0;flex:none}
.dxn-pr-headrow .pp-fields{height:8mm;margin:1mm 0 0}
.dxn-pr-headrow .pp-field-line{height:6mm}
.dxn-pr-headrow hr.pp-fields-solid{margin:1mm 0 0!important;border:0;border-top:1.5pt solid #333}
.dxn-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}
.dxn-pr-inst{flex:none;margin:1.5mm 0 0}
.dxn-pr-inst-line{margin:0;font-size:12.5pt;line-height:5.3mm;white-space:nowrap}
.dxn-pr-problems{flex:none;display:flex;flex-direction:column;margin:2.5mm 0 0}
.dxn-pr-row{box-sizing:border-box;height:21.5mm;padding:0.5mm 0 0;border-top:2px solid transparent}
.dxn-pr-row:last-child{border-bottom:2px solid transparent}
.dxn-pr-l1,.dxn-pr-l2{display:flex;align-items:center;height:7.6mm;gap:1.5mm;white-space:nowrap}
.dxn-pr-num{width:8mm;font-size:12.5pt;font-weight:700}
.dxn-pr-cards{display:flex;flex-wrap:nowrap;gap:1mm}
.dxn-pr-cards .dxn-card{min-width:0;width:8mm;height:7mm;padding:0 0.5mm;border:2px solid #333;border-radius:1.2mm;gap:0.4mm;align-items:center;justify-content:center}
.dxn-pr-cards .dxn-card-id,.dxn-pr-cards .dxn-card-d{font-size:12.5pt;line-height:1;color:#000}
.dxn-pr-cards .dxn-card-id{font-weight:400}
.dxn-pr-frames{display:flex;gap:0.8mm;margin-left:1mm}
.dxn-pr-frames .dxn-frame{width:5.2mm;height:6.4mm;border:2px solid #333;border-radius:0;font-size:12.5pt;color:#000;background:#fff}
.dxn-pr-frames .dxn-frame-fix{width:7.6mm;height:7.4mm;border:6px double #000}
.dxn-pr-cond{margin-left:1.5mm;font-size:12.5pt;font-weight:700}
.dxn-pr-l2{padding-left:7mm;gap:3mm}
.dxn-pr-choice{box-sizing:border-box;width:28mm;height:7mm;line-height:6.4mm;padding:0 1mm;border:2px solid #555;font-size:12.5pt;font-variant-numeric:tabular-nums;text-align:center}
.dxn-pr-anslabel{margin-left:-1.5mm;font-size:12.5pt;font-weight:700}
.dxn-pr-field{display:inline-block;box-sizing:border-box;width:40.5mm;height:7.6mm;margin-left:-2mm;border:2px solid #333}
.dxn-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5.6mm}
.dxn-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.8mm;padding:0;border:0;border-top:2pt dashed #aaa}
.dxn-pr-ansgrid{display:grid;grid-template-columns:19mm repeat(5,32mm);column-gap:2mm;grid-auto-rows:5mm;align-items:baseline;font-size:10pt;line-height:5mm;white-space:nowrap}
.dxn-pr-anshead{grid-row:1 / span 2;font-weight:700;font-size:12.5pt}
.dxn-app-pdf-page .dxn-pr-page{box-shadow:none;margin:0}

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