/* ── sequence_difference_position2_3（ちがいのきまりから数列の場所をもとめよう、単元仕様書 v1.3）── */
/* 画面：問題文、何番目・数・ちがいの3行の表、数を入れる1欄と共通のテンキー（C4型は4択）、回答案内（§5-3・§7 画面表示）。 */
#question-text .sqd-q{display:block}
.sqd-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.sqd-table{display:grid;gap:3px 0;align-items:stretch;width:min(100%,520px);margin:2px auto 6px;font-variant-numeric:tabular-nums}
.sqd-tl{display:flex;align-items:center;justify-content:flex-end;padding-right:6px;font-size:13px;font-weight:800;color:#334155;white-space:nowrap}
.sqd-tc{display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0 1px;min-width:0;text-align:center}
.sqd-pos{font-size:12px;color:#475569;font-weight:700;height:20px}
.sqd-num{height:36px;border:2px solid #64748b;border-radius:6px;background:#fff;color:#111827;font-size:17px;font-weight:800}
.sqd-num.sqd-blank{border:2px dashed #1d4ed8;background:#eff6ff;color:#1d4ed8;font-size:20px}
.sqd-num.sqd-blank.sqd-filled{border:2px solid #1d4ed8;background:#dbeafe;color:#1e3a8a}
.sqd-diff{height:30px;margin:0 6px;border:1.5px dashed #94a3b8;border-radius:6px;background:#f8fafc;color:#7c2d12;font-size:15px;font-weight:800}
.sqd-diff.sqd-filled{border:1.5px solid #c2410c;background:#fff7ed}
@media (max-width:400px){.sqd-main .sqd-choices{grid-template-columns:1fr}.sqd-main .sqd-choice{min-height:44px;padding:4px 10px}.sqd-tl{font-size:10px;padding-right:2px;white-space:normal;max-width:4.6em;text-align:right;line-height:1.1}.sqd-num{font-size:12px;letter-spacing:-0.6px;height:32px;margin:0;border-width:1px;border-radius:4px}.sqd-num.sqd-blank{font-size:17px}.sqd-diff{margin:0 3px;font-size:13px}.sqd-pos{font-size:11px}}
.sqd-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:min(100%,460px);margin:4px auto}
.sqd-choice{box-sizing:border-box;min-height:48px;padding:6px 10px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.02rem;font-weight:800;font-family:var(--font-ui,inherit);cursor:pointer;text-align:left}
.sqd-choice.sqd-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.sqd-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.sqd-choice:disabled{cursor:default;opacity:1}
.sqd-choice.sqd-ok,.sqd-choice.sqd-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.sqd-choice.sqd-ng,.sqd-choice.sqd-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
/* 誤答のあとは、正しい選択肢を緑の実線で示す（独立検査 SQD-IR1-09）。 */
.sqd-choice.sqd-right,.sqd-choice.sqd-right:disabled{border:3px solid #15803d;background:#f0fdf4;color:#14532d}
.sqd-row-input{display:flex;justify-content:center;margin-top:4px;max-width:100%}
.sqd-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}
.sqd-input:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.sqd-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.sqd-input.sqd-ok,.sqd-input.sqd-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.sqd-input.sqd-ng,.sqd-input.sqd-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.sqd-guide{margin:6px 0 0;font-size:16px;font-weight:700;text-align:center;line-height:1.4}
.sqd-guide[hidden]{display:none}
.sqd-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.sqd-msg:empty{min-height:0;margin:0}
.sqd-main .ufk-keypad{margin-top:6px}
.feedback.has-text.sqd-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.sqd-correct{margin:2px 0 4px;font-weight:800;color:#14532d}
.sqd-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.sqd-example-q{font-weight:700;margin:8px 0 4px}
.sqd-example .sqd-table{width:min(100%,360px);margin:4px 0}
.sqd-example-answer{margin:2px 0 8px;word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.sqd-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.sqd-main) #hint-area .kp-body,#page-quiz.active:has(.sqd-main) #feedback,.sqd-expl-text,.sqd-guide,.sqd-msg{word-break:normal;overflow-wrap:break-word;line-break:strict}
#page-quiz.active:has(.sqd-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.sqd-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.sqd-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.sqd-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}

/* 印刷：A4縦・1ページ（§7。用紙の余白10mm、本文190×277mm）。題名の枠と記入欄、共通の問い、2列で各問を上から積む、破線、答え2列×5行。 */
.sqd-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}
.sqd-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19.5mm}
.sqd-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}
.sqd-pr-page[lang="en"] .sqd-pr-title{font-size:14pt}
.sqd-pr-hfields{display:flex;gap:5mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12.5pt;line-height:6mm;white-space:nowrap}
.sqd-pr-hgroup{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.sqd-pr-hfield{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.sqd-pr-hfield-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:2px solid #555}
.sqd-hfield-name{flex:1;min-width:0}
.sqd-hfield-name .sqd-pr-hfield-line{flex:1;width:auto;min-width:30mm}
.sqd-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.sqd-pr-rule{flex:none;box-sizing:border-box;width:190mm;margin:1.2mm 0 0;padding:0 2mm;font-size:12.5pt;line-height:5.3mm;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.sqd-pr-problems{flex:none;display:grid;grid-template-columns:92mm 92mm;column-gap:6mm;width:190mm;margin:1mm 0 0}
.sqd-pr-col{display:flex;flex-direction:column}
.sqd-pr-cell{box-sizing:border-box;width:92mm;height:35mm;display:flex;flex-direction:column;overflow:hidden;padding:0.8mm 0 0;border-top:2px solid transparent}
.sqd-pr-cell[data-sqd-type="C4"]{height:49mm}
.sqd-pr-ask{margin:0;font-size:12.5pt;line-height:6.5mm;height:6.5mm;white-space:pre;overflow:hidden}
.sqd-pr-num{font-weight:700}
.sqd-pr-tablerow{display:flex;align-items:flex-start;gap:2mm}
/* （　）はまん中の数の行にそろえる（独立検査 SQD-IR1-04）。 */
.sqd-pr-tablerow .sqd-pr-box{margin-top:4.5mm}
.sqd-pr-table{display:grid;grid-template-rows:4.5mm 7mm 7mm;gap:0;flex:none;margin:0;width:max-content}
.sqd-pr-table .sqd-tc{margin:0;border-radius:0}
.sqd-pr-table .sqd-pos{height:4.5mm;font-size:9pt;color:#000;font-weight:400}
.sqd-pr-table .sqd-num{height:7mm;border:2px solid #444;margin-right:-2px;font-size:12.5pt;font-weight:400;background:#fff;color:#000}
.sqd-pr-table .sqd-num.sqd-blank{border:2px solid #444;background:#fff;color:#000;font-size:12.5pt}
.sqd-pr-table .sqd-diff{height:7mm;margin:0 0.5mm;border:2px dashed #777;background:#fff}
.sqd-pr-box{flex:none;display:inline-flex;justify-content:space-between;width:15mm;font-size:12.5pt;line-height:7mm;white-space:pre}
.sqd-pr-box-mark{width:12mm}
.sqd-pr-choices{margin-top:1mm;font-size:12.5pt;line-height:6.5mm}
.sqd-pr-choice-line{white-space:pre;display:flex;width:max-content;align-items:center;gap:3mm}
.sqd-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5mm}
.sqd-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}
.sqd-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:5.5mm;height:5.5mm}
.sqd-pr-anscols{display:grid;grid-template-columns:92mm 92mm;column-gap:6mm}
.sqd-pr-ans{height:4.5mm;line-height:4.5mm;font-size:10pt;white-space:nowrap;overflow:hidden}
.sqd-app-pdf-page .sqd-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="sequence_difference_position2_3"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="sequence_difference_position2_3"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="sequence_difference_position2_3"]>#pr-problems{display:block}
#pr-sheet[data-unit="sequence_difference_position2_3"] .sqd-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="sequence_difference_position2_3"]{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="sequence_difference_position2_3"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="sequence_difference_position2_3"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="sequence_difference_position2_3"] .sqd-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="sequence_difference_position2_3"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="sequence_difference_position2_3"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
