/* ── decimal_column_addsub3_4（小数点をそろえて加げんの筆算をしよう、単元仕様書 v1.4）── */
/* 画面：問題文の下に、A群・B群は数を入れる1欄・回答案内・案内・共通の小数のテンキー、C群は四つの筆算と回答案内（§5-3・§7 画面表示）。 */
.dca-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.dca-row-input{display:flex;justify-content:center;margin-top:4px}
.dca-input{width:7em;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}
.dca-input:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.dca-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
/* 採点後：正しいときは緑の実線、まちがえたときは赤の点線の太い枠（色だけにせず線の形でも区別する）。 */
.dca-input.dca-ok,.dca-input.dca-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.dca-input.dca-ng,.dca-input.dca-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.dca-guide{margin:6px 0 0;font-size:16px;font-weight:700;text-align:center;line-height:1.4}
.dca-guide[hidden]{display:none}
.dca-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.dca-msg:empty{min-height:0;margin:0}
.dca-main .ufk-keypad{margin-top:6px}

/* 筆算の図：数字を位取りのますに置き、小数点は数字の右下に打つ。線は答えの行の上。 */
.dca-col{display:inline-flex;flex-direction:column;align-items:flex-start;font-family:inherit;font-variant-numeric:tabular-nums;line-height:1.15;font-size:1.25rem;color:#111}
.dca-row{display:flex}
.dca-row-rule{border-bottom:2px solid #111;padding-bottom:1px;margin-bottom:2px}
.dca-sign,.dca-d{display:inline-block;width:.78em;text-align:center;position:relative}
.dca-d.dca-pt::after{content:'';position:absolute;right:-.1em;bottom:.12em;width:.17em;height:.17em;border-radius:50%;background:currentColor}
.dca-row-mark .dca-d{font-size:.62em;width:1.258em;line-height:1.1;color:#b45309;font-weight:700}
.dca-row-mark{margin-bottom:-1px}

/* C群：四つの筆算（ア〜エ）。幅に合わせて横一列又は2つずつ2段。順は変えない。 */
.dca-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;max-width:560px;margin:4px auto 0}
@media (max-width:520px){.dca-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dca-choice{position:relative;display:flex;justify-content:center;align-items:center;min-height:96px;padding:22px 4px 8px;border:2px solid #94a3b8;border-radius:10px;background:#fff;cursor:pointer;font:inherit;color:#111}
.dca-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.dca-choice-label{position:absolute;left:6px;top:3px;font-weight:700;font-size:1rem}
/* 選んだ筆算：太い青の枠と、記号の丸（色だけにしない）。 */
.dca-choice.dca-selected{border:4px solid #1d4ed8;background:#eff6ff}
.dca-choice.dca-selected .dca-choice-label{background:#1d4ed8;color:#fff;border-radius:999px;padding:0 6px}
.dca-choice:disabled{cursor:default;opacity:1}
.dca-choice.dca-correct{border:4px solid #15803d;background:#dcfce7}
.dca-choice.dca-wrong{border:4px dashed #b91c1c;background:#fff1f2}
.dca-choice .dca-col{font-size:1.15rem}
@media (max-width:400px){.dca-choice .dca-col{font-size:1.02rem}}

.feedback.has-text.dca-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.dca-answer{margin:4px 0 2px;font-weight:700}
.dca-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
.dca-expl-fig{display:flex;justify-content:center;margin:4px 0 6px}
.dca-example-q{font-weight:700;margin:2px 0 6px}
.dca-example-answer{margin:2px 0 6px}
#page-quiz.active:has(.dca-main) #hint-area .kp-body,#page-quiz.active:has(.dca-main) #feedback,.dca-expl-text,.dca-guide,.dca-msg{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
/* 例題の問題と解説は長い式をふくむので、どこでも折り返せるようにし、句読点を行の頭に置かない（独立検査 DCA-IR1-03）。 */
.dca-example-q,.dca-example-answer{word-break:normal;overflow-wrap:anywhere;line-break:strict}
.dca-nb{white-space:nowrap}
/* 問題文は式（小数）をふくむので、どこでも折り返せるようにし、句読点を行の頭に置かない。「ア〜エ」は分けない（独立検査 DCA-IR1-02・IR2-01）。 */
#page-quiz.active:has(.dca-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.dca-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.dca-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.dca-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.dca-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}

/* 印刷：A4縦・1ページ（§7。用紙の余白10mm、本文190×277mm。題名と記入欄、共通の案内、2列×5段で1問92×40mm、破線、答え2列×5行）。 */
.dca-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}
.dca-pr-headblock{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19.5mm}
.dca-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}
.dca-pr-page[lang="en"] .dca-pr-title{font-size:14pt}
.dca-pr-fields{display:flex;gap:5mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12pt;line-height:6mm;white-space:nowrap}
.dca-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.dca-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.dca-pr-field-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:2px solid #555}
.dca-field-name{flex:1;min-width:0}
.dca-field-name .dca-pr-field-line{flex:1;width:auto;min-width:30mm}
.dca-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.dca-pr-common{flex:none;box-sizing:border-box;width:190mm;margin:1.5mm 0 0;height:16.5mm;font-size:12.5pt;line-height:5.5mm;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
.dca-pr-problems{flex:none;display:grid;grid-template-columns:92mm 92mm;column-gap:6mm;width:190mm;height:200mm;margin:0}
.dca-pr-col{display:grid;grid-template-rows:repeat(5,40mm)}
.dca-pr-cell{box-sizing:border-box;width:92mm;height:40mm;display:flex;flex-direction:column;overflow:hidden;padding-top:1mm}
.dca-pr-head{display:flex;align-items:center;gap:2mm;margin:0;height:6mm;font-size:12.5pt;line-height:6mm;white-space:nowrap}
.dca-pr-num{font-weight:700;width:7mm;flex:none}
.dca-pr-expr{flex:none}
.dca-pr-blank-ab,.dca-pr-blank-c{flex:none;white-space:pre}
.dca-pr-blank-c{margin-left:auto;margin-right:2mm}
.dca-pr-blank-in-ab{display:inline-block;min-width:22mm;white-space:pre}
.dca-pr-blank-in-c{display:inline-block;min-width:10mm;white-space:pre}
.dca-pr-work{position:relative;box-sizing:border-box;margin:1mm 0 0 9mm;width:60mm;height:24mm;border:0.35mm solid #555}
.dca-pr-work-label{position:absolute;left:1mm;top:0.5mm;font-size:9pt;line-height:4mm}
.dca-pr-choices{display:grid;grid-template-columns:36mm 36mm;column-gap:4mm;row-gap:1.5mm;margin:1mm 0 0 9mm}
.dca-pr-choice{position:relative;box-sizing:border-box;width:36mm;height:13.1mm;display:flex;align-items:flex-start;padding-left:4.6mm}
.dca-pr-label{position:absolute;left:0;top:0;font-size:10pt;font-weight:700;line-height:4mm}
.dca-col.dca-col-print{font-size:10pt;line-height:4.1mm}
.dca-col-print .dca-sign,.dca-col-print .dca-d{width:3.4mm}
.dca-col-print .dca-row-rule{border-bottom:0.35mm solid #000;padding-bottom:0;margin-bottom:0.2mm}
.dca-pr-answers{flex:none;box-sizing:border-box;width:190mm;height:36mm}
.dca-pr-dashed{box-sizing:content-box;display:block;height:0;margin:1.5mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.dca-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:6mm;height:6mm}
.dca-pr-answers-grid{display:grid;grid-template-columns:92mm 92mm;column-gap:6mm}
.dca-pr-ans{height:5mm;line-height:5mm;font-size:10pt;white-space:nowrap;overflow:hidden}
.dca-app-pdf-page .dca-pr-page{box-shadow:none;margin:0}

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

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