/* ── number_clue_intersection_1（いくつもの じょうけんに あう かず、単元仕様書 v1.4）── */
/* 画面：問題文の下に、条件カード（表示順）、0〜20の数直線（数を押すと しるし）、こたえの かず の欄とキー（§7 画面表示）。 */
.nci-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.nci-cards{list-style:none;margin:2px 0 8px;padding:0;display:flex;flex-wrap:wrap;gap:8px 10px;justify-content:center;max-width:100%}
.nci-card{box-sizing:border-box;min-height:44px;padding:6px 14px;border:2px solid #475569;border-radius:10px;background:#f8fafc;display:flex;align-items:center;font-weight:700;font-size:17px;line-height:1.35;color:#111827}
.nci-card-text{white-space:nowrap}
/* ヒント1：条件1のカードだけを、太い線と色で強調する（§6）。 */
.nci-card.nci-card-focus{border:3px solid #d97706;background:#fef3c7;box-shadow:0 0 0 2px #fde68a}
.nci-nl{display:flex;width:100%;max-width:660px;margin:6px auto 4px}
.nci-nl-row{position:relative;display:grid}
.nci-nl-row1{flex:11 1 0;grid-template-columns:repeat(11,minmax(0,1fr))}
.nci-nl-row2{flex:10 1 0;grid-template-columns:repeat(10,minmax(0,1fr))}
/* 数直線の線：目盛り0の中心から目盛り20の中心まで（2つの段をつないで1本に見せる）。 */
.nci-nl-row::before{content:'';position:absolute;top:30px;border-top:2px solid #1e293b;pointer-events:none}
.nci-nl-row1::before{left:calc(100% / 22);right:0}
.nci-nl-row2::before{left:0;right:calc(100% / 20)}
.nci-tick{position:relative;min-width:0;height:60px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;font-family:inherit;color:#111827;cursor:pointer;display:flex;flex-direction:column;align-items:center}
.nci-tick::after{content:'';position:absolute;left:calc(50% - 1px);top:24px;width:2px;height:13px;background:#1e293b}
.nci-tick:focus-visible{outline:3px solid #f59e0b;outline-offset:-2px}
.nci-tick:disabled{cursor:default;opacity:1;color:#111827}
/* しるし：線の上の丸（ある・ないの形で示し、色だけにしない。§5-5）。 */
.nci-dot{display:block;box-sizing:border-box;width:16px;height:16px;margin-top:3px;border-radius:50%;border:2px solid transparent}
.nci-tick.nci-marked .nci-dot{background:#2563eb;border-color:#1e3a8a}
.nci-tick-num{display:block;margin-top:20px;font-size:16px;font-weight:700;line-height:1.1}
/* 採点後：答えの目盛りの数を緑の丸でかこむ。 */
.nci-tick.nci-answer .nci-tick-num{padding:1px 3px;border:2px solid #15803d;border-radius:999px;background:#dcfce7;margin-top:18px}
.nci-answer-row{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 2px;flex-wrap:wrap}
.nci-label{font-weight:700;font-size:16px}
.nci-input{box-sizing:border-box;width:96px;height:52px;border:3px solid #475569;border-radius:10px;font-size:26px;font-weight:700;text-align:center;font-family:inherit;color:#111827;background:#fff}
.nci-input:focus{outline:3px solid #f59e0b;outline-offset:1px}
.nci-input:disabled{opacity:1;color:#111827}
.nci-input.nci-ok{border:4px double #15803d;background:#dcfce7}
.nci-input.nci-ng{border:3px dashed #b91c1c;background:#fff1f2}
.nci-msg{min-height:1.4em;margin:6px 0 2px;color:#b45309;font-weight:700;text-align:center}
.nci-msg:empty{min-height:0;margin:0}
/* キーはほかの数の問いと同じ共通テンキーの配置（main.css の .numpad・.num-btn：3列、1〜9、最下段に0（2列分）と⌫）。ここでは上の余白だけを変える。 */
/* 共通テンキーは renderQuestion が max-width:240px を直接指定するので、狭い画面でも同じ幅にそろえる。 */
.nci-keypad{width:100%;max-width:240px;margin-top:10px}
.nci-keypad[hidden]{display:none}
/* キーは操作の部品なので、共通テンキーと同じ UI の字体（--font-ui）にする（デザイン層仕様書 §1-2「UI 字体は非波及」。学習の字体だと 0 に斜線が入り、共通テンキーと字の形が違って見える）。 */
.nci-key{min-height:44px;font-family:var(--font-ui)}
.feedback.has-text.nci-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.nci-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.nci-hint-text{display:block}
.nci-check-list{list-style:none;margin:6px 0 2px;padding:0;display:flex;flex-direction:column;gap:4px}
.nci-check-list li{font-weight:700}
.nci-check-box{display:inline-block;font-size:1.15em;line-height:1}
/* 学習内容の例題：0〜10に、4より おおきい しるし（5〜10）を付け、6より ちいさくない しるし（6〜10）を消すと、5だけが残る。 */
.nci-example-text,.nci-example-sum{margin:4px 0;font-weight:700}
.nci-ex-line{position:relative;display:grid;grid-template-columns:repeat(11,minmax(0,1fr));max-width:340px;margin:6px 0}
.nci-ex-line::before{content:'';position:absolute;left:calc(100% / 22);right:calc(100% / 22);top:22px;border-top:2px solid #1e293b}
.nci-ex-tick{position:relative;display:flex;flex-direction:column;align-items:center}
.nci-ex-tick::after{content:'';position:absolute;left:calc(50% - 1px);top:17px;width:2px;height:10px;background:#1e293b}
.nci-ex-dot{position:relative;display:block;box-sizing:border-box;width:13px;height:13px;border-radius:50%;border:2px solid transparent}
.nci-ex-keep .nci-ex-dot{background:#2563eb;border-color:#1e3a8a}
.nci-ex-drop .nci-ex-dot{border-color:#94a3b8;background:#e2e8f0}
.nci-ex-drop .nci-ex-dot::after{content:'×';position:absolute;left:50%;top:50%;transform:translate(-50%,-56%);font-size:14px;font-weight:700;line-height:1;color:#b91c1c}
.nci-ex-num{margin-top:14px;font-size:14px;font-weight:700}
#page-quiz.active:has(.nci-main) #question-text,#page-quiz.active:has(.nci-main) #hint-area .kp-body,#page-quiz.active:has(.nci-main) #feedback,.nci-expl-text{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.nci-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.nci-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.nci-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
/* 狭い画面（幅320pxを含む）：数直線を0〜10と11〜20の2段にする。並びと読み上げの順は0〜20のまま（§7）。 */
@media (max-width:560px){
  .nci-nl{flex-direction:column;gap:2px}
  .nci-nl-row1,.nci-nl-row2{flex:none;grid-template-columns:repeat(11,minmax(0,1fr))}
  .nci-nl-row1::before{left:calc(100% / 22);right:calc(100% / 22)}
  .nci-nl-row2::before{left:calc(100% / 22);right:calc(100% * 3 / 22)}
  .nci-card{font-size:16px;padding:6px 10px}
  .nci-card-text{white-space:normal}
}
@media (max-width:360px){
  /* 学習内容の例の数直線：9と10がくっついて「910」と読めないよう、字を少し小さくして字間を詰めない。 */
  .nci-ex-num{font-size:11px;letter-spacing:-0.04em}
  .nci-tick-num{font-size:15px}
  .nci-tick.nci-answer .nci-tick-num{padding:1px 1px}
}

/* 印刷：A4横・1ページ（§7。用紙の余白 上5mm・下4mm・左右6mm、本文285×201mm。上22mm、2列×158mm、下の答え16mm）。 */
.nci-pr-page{width:277mm;height:190mm;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}
.nci-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:277mm;height:16.5mm}
.nci-pr-title{box-sizing:border-box;margin:0;height:8mm;font-size:15pt;font-weight:700;line-height:7mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.nci-pr-fields{display:flex;gap:8mm;align-items:flex-end;height:7mm;font-size:12.6pt;line-height:6mm;white-space:nowrap}
.nci-pr-group{display:inline-flex;align-items:flex-end;gap:4mm;flex:none}
.nci-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.nci-pr-field-line{display:inline-block;box-sizing:border-box;width:16mm;height:6.2mm;border-bottom:1pt solid #555}
.nci-field-name{flex:1;min-width:0}
.nci-field-name .nci-pr-field-line{flex:1;width:auto;min-width:60mm}
.nci-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.nci-pr-common{flex:none;margin:0;height:5.6mm;line-height:5.6mm;font-size:12.8pt;font-weight:700;white-space:nowrap}
.nci-pr-problems{display:flex;gap:7mm;flex:none;height:152.2mm}
.nci-pr-col{flex:none;width:135mm;min-width:0;display:flex;flex-direction:column}
.nci-pr-prompt{flex:none;box-sizing:border-box;height:5.6mm;line-height:5.6mm;font-size:12.8pt;font-weight:700;white-space:nowrap;overflow:hidden}
.nci-pr-cell{flex:none;box-sizing:border-box;height:27mm;display:flex;flex-direction:column;overflow:hidden;padding:0}
.nci-pr-cell[data-nci-group="B"]{height:33mm}
.nci-pr-prompt-b{font-weight:400}
.nci-pr-cardrow{flex:none;display:flex;align-items:center;gap:1.6mm;height:8mm;white-space:nowrap}
.nci-pr-num{flex:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-width:6.6mm;height:6.6mm;padding:0 0.8mm;border:0.3mm solid #333;border-radius:3.3mm;font-size:12.6pt;font-weight:700}
.nci-pr-card{flex:none;box-sizing:border-box;display:inline-flex;align-items:center;height:6.8mm;padding:0 1.5mm;border:0.35mm solid #333;border-radius:1mm;font-size:12.8pt;white-space:nowrap}
.nci-pr-line{flex:none;height:12mm;line-height:0}
.nci-pr-nl{display:block;width:120mm;height:12mm}
.nci-pr-nl text{font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;fill:#000}
.nci-pr-ansrow{flex:none;display:flex;align-items:center;gap:2mm;height:7mm}
.nci-pr-anslabel{font-size:12.8pt;white-space:nowrap}
.nci-pr-ansbox{flex:none;box-sizing:border-box;width:22mm;height:7mm;border:0.35mm solid #333;border-radius:1mm}
.nci-pr-answers{flex:none;box-sizing:border-box;height:14.6mm}
.nci-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0.5mm 0 0.6mm;padding:0;border:0;border-top:2pt dashed #aaa}
.nci-pr-ans-row{display:flex;height:6.4mm;line-height:6.4mm}
.nci-pr-ans{flex:1 1 0;min-width:0;font-size:12.8pt;white-space:nowrap;overflow:hidden}
.nci-app-pdf-page .nci-pr-page{box-shadow:none;margin:0}

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