/* ── arithmetic_law_choice3_4（交かん・結合・分配のきまりを選ぼう、単元仕様書 v1.5）── */
/* 画面：問題文、2つの式の図（PC は式Aが左・式Bが右、せまい画面は上から式A・矢印・式B）、図の代替文、①〜④、回答案内。
   回答後は同じ数を結ぶ線（2つの式の下を回る）と変わった所の下線とわく（§5-3・§7・v1.5）。 */
#question-text .alc-q{display:block}
.alc-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.alc-fig{position:relative;display:flex;align-items:flex-start;justify-content:center;gap:10px;width:min(100%,760px);box-sizing:border-box;margin:2px auto 4px;padding:8px 6px 8px}
.alc-main[data-alc-state="correct"] .alc-fig,.alc-main[data-alc-state="wrong"] .alc-fig{padding-bottom:60px}
.alc-box{flex:1 1 0;min-width:0;padding:6px 8px;border:2px solid #64748b;border-radius:10px;background:#fff;text-align:center}
.alc-label{font-size:14px;font-weight:800;color:#475569;margin-bottom:2px}
.alc-expr{font-size:21px;font-weight:800;color:#0f172a;font-variant-numeric:tabular-nums;line-height:1.5;white-space:nowrap}
.alc-num{display:inline-block;position:relative;z-index:1}
.alc-chg{display:inline;border:2px solid #b45309;border-radius:4px;padding:0 2px 2px;box-shadow:inset 0 -3px 0 #b45309;background:#fffbeb}
.alc-op{font-family:'BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif}
.alc-arrow{position:relative;z-index:1;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:center;min-width:52px;font-weight:900;color:#1e3a8a}
.alc-arrow-h{font-size:30px;line-height:1}
.alc-arrow-v{display:none;font-size:28px;line-height:1}
.alc-dir{font-size:15px;font-weight:800;margin-top:2px;white-space:nowrap;background:#fff;border-radius:6px;padding:0 4px}
.alc-arrow-h,.alc-arrow-v{background:#fff;border-radius:6px;padding:0 3px}
.alc-lines{position:absolute;left:0;top:0;pointer-events:none;overflow:visible;z-index:0}
.alc-lines path{fill:none;stroke:#2563eb;stroke-width:2;stroke-dasharray:5 3}
.alc-lines circle{fill:#2563eb}
.alc-alt{margin:2px 0 6px;font-size:14px;color:#334155;text-align:center;line-height:1.5;overflow-wrap:anywhere}
.alc-choices{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:min(100%,620px);margin:2px auto}
.alc-choice{position:relative;box-sizing:border-box;min-height:48px;padding:6px 10px 6px 28px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.02rem;font-weight:800;cursor:pointer;touch-action:manipulation;text-align:left;line-height:1.4;overflow-wrap:anywhere}
.alc-check{position:absolute;top:50%;left:7px;transform:translateY(-50%);font-size:18px;font-weight:900;color:#1d4ed8}
.alc-choice.alc-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.alc-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.alc-choice:disabled{cursor:default;opacity:1}
.alc-choice.alc-ok,.alc-choice.alc-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.alc-choice.alc-ng,.alc-choice.alc-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.alc-choice.alc-right,.alc-choice.alc-right:disabled{border:3px solid #15803d;background:#f0fdf4;color:#14532d}
.alc-ok .alc-check,.alc-right .alc-check{color:#15803d}
.alc-ng .alc-check{color:#b91c1c}
.alc-guide{margin:4px 0 2px;font-size:15px;font-weight:700;text-align:center;line-height:1.4}
.alc-guide[hidden]{display:none}
.alc-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.alc-msg:empty{min-height:0;margin:0}
.feedback.has-text.alc-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.alc-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.alc-expl-text{margin:4px 0 6px;word-break:normal;overflow-wrap:anywhere;line-break:strict}
.alc-score{margin:6px 0 2px;font-weight:800;color:#1e3a8a}
@media (max-width:600px){
  /* せまい画面：上から式A・矢印・式B。矢印と向きの文字は左のはしに置き、式のわくは右に寄せて、回答後の線が矢印と文字に重ならないようにする（ALC-IR1-02） */
  .alc-fig{flex-direction:column;align-items:stretch;gap:4px}
  .alc-box{margin-left:44px}
  .alc-main[data-alc-state="correct"] .alc-fig,.alc-main[data-alc-state="wrong"] .alc-fig{padding-bottom:8px;gap:26px}
  .alc-arrow{flex-direction:column;gap:0;min-width:0;width:42px;align-self:flex-start;margin-left:0}
  .alc-dir{font-size:13px;padding:0 2px}
  .alc-arrow-h{display:none}
  .alc-arrow-v{display:inline}
  .alc-expr{font-size:17px}
}
@media (max-width:360px){.alc-expr{font-size:14.5px}.alc-box{padding:5px 4px;margin-left:40px}.alc-arrow{width:38px}.alc-choice{font-size:.96rem;padding-left:26px}}

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

/* 印刷：A4縦・1列・1ページ（§7）。題名の枠（幅いっぱい・中央）とその下の記入欄、共通の案内、選択肢①〜④の一覧、10問（各問1行）、破線、答え1行。 */
.alc-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}
.alc-pr-headrow{display:flex;flex-direction:column;gap:0;flex:none}
.alc-pr-headrow .pp-fields{height:8mm;margin:1mm 0 0}
.alc-pr-headrow .pp-field-line{height:6mm}
.alc-pr-headrow hr.pp-fields-solid{margin:1mm 0 0!important;border:0;border-top:1.5pt solid #333}
.alc-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}
.alc-pr-inst{flex:none;box-sizing:border-box;width:186mm;margin:2mm 0 0;font-size:12.5pt;line-height:5.6mm}
.alc-pr-choices{flex:none;list-style:none;margin:1.5mm 0 0;padding:1.5mm 2mm;border:2px solid #777;font-size:12.5pt;line-height:6mm}
.alc-pr-choice{white-space:nowrap}
.alc-pr-problems{flex:none;display:flex;flex-direction:column;margin:4mm 0 0}
.alc-pr-row{box-sizing:border-box;display:grid;grid-template-columns:10mm 58mm 16mm 58mm 32mm;column-gap:1mm;align-items:center;height:19mm;border-top:2px solid transparent}
.alc-pr-row:last-child{border-bottom:2px solid transparent}
.alc-pr-num{font-size:12.5pt;font-weight:700}
.alc-pr-ex{display:flex;flex-direction:column;min-width:0}
.alc-pr-label{font-size:12.5pt;font-weight:700;line-height:5.6mm}
.alc-pr-expr{font-size:12.5pt;line-height:5.6mm;white-space:nowrap}
.alc-pr-arrow{display:flex;flex-direction:column;align-items:center;font-size:12.5pt;line-height:5.6mm}
.alc-pr-arrow-g{font-weight:900;font-size:14pt}
.alc-pr-box{font-size:12.5pt;white-space:pre;text-align:left}
.alc-pr-blank{display:inline-block;min-width:11mm;height:8mm;vertical-align:middle}
.alc-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5.6mm}
.alc-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.8mm;padding:0;border:0;border-top:2pt dashed #aaa}
.alc-pr-ansrow{display:grid;grid-template-columns:22mm repeat(10,16.8mm);align-items:baseline;height:6mm;line-height:6mm;font-size:12.5pt;white-space:nowrap}
.alc-pr-answers-title{font-weight:700;font-size:12.5pt}
.alc-app-pdf-page .alc-pr-page{box-shadow:none;margin:0}

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