/* ── divisor_toggle_count3_5（倍数回数で反転後の状態を求めよう、単元仕様書 v1.2）── */
/* 画面：問題文の上に決まりの文、下に番号のます、A群は数を入れる1欄と共通のテンキー、B群は表・うらの2つのボタン、C群は番号のボタン（§5-3・§7 画面表示）。 */
#question-text .dvt-rule{display:block;font-size:.82em;font-weight:600;line-height:1.5;margin:0 0 6px;padding:6px 8px;background:#f1f5f9;border-left:4px solid #64748b;border-radius:4px;text-align:left}
#question-text .dvt-q{display:block}
.dvt-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.dvt-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:520px;margin:2px auto 6px;font-variant-numeric:tabular-nums}
.dvt-grid-static .dvt-cell{box-sizing:border-box;min-width:30px;height:28px;line-height:26px;padding:0 2px;border:1.5px solid #94a3b8;border-radius:4px;background:#f8fafc;color:#334155;font-size:14px;font-weight:700;text-align:center}
.dvt-card{box-sizing:border-box;min-width:44px;min-height:44px;padding:0 2px;border:2px solid #64748b;border-radius:8px;background:#fff;color:#1e293b;font-size:17px;font-weight:700;font-family:var(--font-ui,inherit);cursor:pointer;touch-action:manipulation}
.dvt-card.dvt-on{background:#1d4ed8;border-color:#1e3a8a;color:#fff;box-shadow:inset 0 0 0 2px #fff}
.dvt-card:focus-visible,.dvt-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.dvt-card:disabled{cursor:default;opacity:1}
.dvt-card:disabled:not(.dvt-on){color:#64748b;background:#f8fafc}
.dvt-choices{display:flex;gap:12px;justify-content:center;margin:4px 0}
.dvt-choice{box-sizing:border-box;min-width:110px;min-height:48px;padding:4px 14px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.15rem;font-weight:800;font-family:var(--font-ui,inherit);cursor:pointer}
.dvt-choice.dvt-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.dvt-choice:disabled{cursor:default;opacity:1}
.dvt-choice.dvt-ok,.dvt-choice.dvt-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.dvt-choice.dvt-ng,.dvt-choice.dvt-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.dvt-row-input{display:flex;justify-content:center;margin-top:4px;max-width:100%}
.dvt-input{width:5em;min-height:44px;font-size:1.3rem;padding:2px 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;box-sizing:border-box}
.dvt-input:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.dvt-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
/* 採点後：正しいときは緑の実線、まちがえたときは赤の点線の太い枠（色だけにせず線の形でも区別する）。 */
.dvt-input.dvt-ok,.dvt-input.dvt-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.dvt-input.dvt-ng,.dvt-input.dvt-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.dvt-guide{margin:6px 0 0;font-size:16px;font-weight:700;text-align:center;line-height:1.4}
.dvt-guide[hidden]{display:none}
.dvt-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.dvt-msg:empty{min-height:0;margin:0}
.dvt-main .ufk-keypad{margin-top:6px}

.feedback.has-text.dvt-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.dvt-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.dvt-example-q{font-weight:700;margin:2px 0 6px}
/* v1.3：例題の1回ずつ追う表（○＝表、●＝うら）。狭い画面でも横にはみ出さない。 */
.dvt-ex-wrap{max-width:100%;overflow-x:auto;margin:4px 0 6px}
.dvt-ex-table{border-collapse:collapse;margin:0 auto;font-size:14px;max-width:100%;line-height:1.3;font-variant-numeric:tabular-nums}
.dvt-ex-table th,.dvt-ex-table td{border:1.5px solid #94a3b8;padding:2px 3px;text-align:center;white-space:nowrap}
.dvt-ex-table thead th{background:#e0f2fe;font-size:12px;white-space:normal}
.dvt-ex-table tbody th{background:#f8fafc;font-weight:700}
.dvt-ex-table td.dvt-ex-turn{font-size:12px;color:#334155;white-space:normal;min-width:4.2em}
.dvt-ex-table td.dvt-ex-cell{font-size:15px;min-width:1.1em}
.dvt-ex-key{margin:4px 0 0;font-size:14px;text-align:center}
/* 独立検査 DTC-IR2-01：英語の字体では○●が小さく描かれるため、記号は日英とも同じ字体で示す。 */
.dvt-ex-table td.dvt-ex-cell,.dvt-ex-key{font-family:'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
/* スマホ幅：例題の枠の内側の余白まで使い、表を小さめの字で枠の中に収める（横にスクロールさせない）。 */
@media (max-width:480px){
  .dvt-ex-wrap{box-sizing:border-box;width:calc(100% + 30px);max-width:none;margin-left:-12px;margin-right:-18px;overflow-x:visible}
  .dvt-ex-table{font-size:12px}
  .dvt-ex-table th,.dvt-ex-table td{padding:2px 1px;border-width:1px}
  .dvt-ex-table thead th{font-size:11px}
  .dvt-ex-table td.dvt-ex-turn{font-size:11px;min-width:3.4em}
  .dvt-ex-table td.dvt-ex-cell{font-size:17px;line-height:1.1;min-width:1em}
}
.dvt-example-answer{margin:2px 0 6px;word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.dvt-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.dvt-main) #hint-area .kp-body,#page-quiz.active:has(.dvt-main) #feedback,.dvt-expl-text,.dvt-guide,.dvt-msg{word-break:normal;overflow-wrap:break-word;line-break:strict}
#page-quiz.active:has(.dvt-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.dvt-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.dvt-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.dvt-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}

/* 印刷：A4縦・1ページ（§7。用紙の余白10mm、本文190×277mm。題名の枠と記入欄、決まりの文、2列×5段で1問92×37.4mm、破線、答え10行）。 */
.dvt-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}
.dvt-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19.5mm}
.dvt-pr-title{box-sizing:border-box;margin:0;height:9mm;font-size:15pt;font-weight:700;line-height:8mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.dvt-pr-page[lang="en"] .dvt-pr-title{font-size:14pt}
.dvt-pr-fields{display:flex;gap:5mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12.5pt;line-height:6mm;white-space:nowrap}
.dvt-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.dvt-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.dvt-pr-field-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:2px solid #555}
.dvt-field-name{flex:1;min-width:0}
.dvt-field-name .dvt-pr-field-line{flex:1;width:auto;min-width:30mm}
.dvt-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.dvt-pr-rule{flex:none;box-sizing:border-box;width:190mm;height:10.6mm;margin:1.2mm 0 0;padding:0 2mm;font-size:12.5pt;line-height:5.3mm;overflow:hidden;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.dvt-pr-problems{flex:none;display:grid;grid-template-columns:92mm 92mm;column-gap:6mm;width:190mm;height:187mm;margin:0.5mm 0 0}
.dvt-pr-col{display:grid;grid-template-rows:repeat(5,37.4mm)}
.dvt-pr-cell{box-sizing:border-box;width:92mm;height:37.4mm;display:flex;flex-direction:column;overflow:hidden;padding:0.4mm 2mm 0 0;border-top:0.3mm solid transparent}
.dvt-pr-q{margin:0;padding-right:1mm;white-space:pre-wrap;font-size:12.5pt;line-height:5.3mm;max-height:10.6mm;overflow:hidden;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.dvt-pr-grid{display:grid;grid-template-columns:repeat(20,4.4mm);grid-auto-rows:4.5mm;margin-top:0.6mm;flex:none}
.dvt-pr-num{box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-size:9pt;line-height:4.5mm;border:0.2mm solid #bbb;margin:0 -0.1mm -0.1mm 0}
.dvt-pr-ansrow{display:flex;align-items:center;gap:1mm;margin-top:0.6mm;height:6mm;flex:none}
.dvt-pr-anslabel{font-size:12.5pt;line-height:6mm;flex:none}
.dvt-pr-ansbox{display:inline-block;box-sizing:border-box;width:12mm;height:6mm;border:0.4mm solid #333}
.dvt-pr-choice{font-size:12.5pt;line-height:6mm;margin-left:3mm;white-space:nowrap}
.dvt-pr-answers{flex:none;box-sizing:border-box;width:190mm;height:52.5mm}
.dvt-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0.8mm 0 0.6mm;padding:0;border:0;border-top:2pt dashed #aaa}
.dvt-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:5.5mm;height:5.5mm}
.dvt-pr-ans{height:4.5mm;line-height:4.5mm;font-size:10pt;white-space:nowrap;overflow:hidden}
.dvt-app-pdf-page .dvt-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="divisor_toggle_count3_5"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="divisor_toggle_count3_5"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="divisor_toggle_count3_5"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白を白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="divisor_toggle_count3_5"] .dvt-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="divisor_toggle_count3_5"]{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="divisor_toggle_count3_5"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="divisor_toggle_count3_5"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="divisor_toggle_count3_5"] .dvt-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}

/* 単元専用テンキー(ufk)を共通テンキーと同じ幅240px・UI字体にそろえる（品質検査 #2972 の形。この単元の画面だけに限る）。 */
#page-quiz:has(#question-text[data-unit="divisor_toggle_count3_5"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="divisor_toggle_count3_5"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
