/* ── decimal_digit_difference_opt3_4（数字カードで小数の差を一番大きく・小さくしよう、単元仕様書 v1.2）── */
/* 画面：問題文の下に4まいの数字カードと位取りのわく（□.□−□.□）、回答案内、四つの選択肢（§5-3・§7 画面表示）。 */
.ddo-main{display:flex;flex-direction:column;align-items:center;gap:10px;margin:4px 0 6px;max-width:100%}
.ddo-cards{display:flex;justify-content:center;gap:8px}
.ddo-card{display:inline-flex;align-items:center;justify-content:center;width:44px;height:56px;box-sizing:border-box;border:2px solid #475569;border-radius:8px;background:#fffbeb;color:#111827;font-size:1.7rem;font-weight:700;font-variant-numeric:tabular-nums;box-shadow:0 2px 0 #cbd5e1}
.ddo-frame{display:flex;align-items:flex-end;justify-content:center;gap:2px;font-size:1.6rem;font-weight:700;color:#111827}
.ddo-box{display:inline-flex;align-items:center;justify-content:center;width:38px;height:44px;box-sizing:border-box;border:2px solid #475569;background:#fff;font-size:1.5rem;font-weight:700}
.ddo-box.ddo-box-fixed{border:6px double #111827;background:#fff}
.ddo-dot{display:inline-block;width:12px;text-align:center;line-height:1}
.ddo-minus{display:inline-block;width:26px;text-align:center;align-self:center}
.ddo-guide{margin:6px 0 4px;font-weight:700;text-align:center}
.ddo-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:420px;margin:6px auto 2px}
.ddo-choice{min-height:52px;padding:6px 8px;font-size:1.25rem;font-weight:700;line-height:1.2;border:3px solid #94a3b8;background:#fff;color:#111827;border-radius:12px;cursor:pointer;font-family:inherit;font-variant-numeric:tabular-nums;white-space:nowrap}
.ddo-choice:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.ddo-choice.ddo-chosen{border-color:#1d4ed8;background:#dbeafe;box-shadow:0 0 0 2px #1d4ed8 inset}
.ddo-choice:disabled{cursor:default;opacity:1}
.ddo-choice.ddo-choice-ok{border:3px solid #15803d;background:#dcfce7}
.ddo-choice.ddo-choice-ng{border:3px dashed #b91c1c;background:#fff1f2}
.ddo-msg{margin:2px auto 0;color:#b91c1c;font-weight:700;font-size:.95rem;text-align:center;max-width:32em}
.ddo-msg:empty{display:none}
.feedback.has-text.ddo-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.ddo-fixed-note{margin:4px 0 2px;color:#b91c1c;font-weight:700}
.ddo-answer-line{margin:4px 0 2px;font-weight:700}
.ddo-expl-text{margin:2px 0 6px}
#page-quiz.active:has(.ddo-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.ddo-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.ddo-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.ddo-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
@media (max-width:360px){
  .ddo-choices{gap:8px}
  .ddo-choice{font-size:1.1rem;padding:6px 4px}
}

/* 印刷：A4縦・1列・1ページ（§7。用紙の余白10mm、本文190×277mm、各問18.5mm×10問、答え3列）。 */
.ddo-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}
.ddo-pr-head{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:188mm}
.ddo-pr-title{box-sizing:border-box;margin:0;height:11mm;font-size:14.3pt;font-weight:700;line-height:9.9mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.ddo-pr-fields{display:flex;gap:9mm;align-items:flex-end;height:9mm;margin-top:3mm;font-size:12.5pt;line-height:7mm;white-space:nowrap}
.ddo-pr-group{display:inline-flex;align-items:flex-end;gap:4mm;flex:none}
.ddo-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.ddo-pr-field-line{display:inline-block;box-sizing:border-box;width:15mm;height:7mm;border-bottom:1pt solid #555}
.ddo-field-name{flex:1;min-width:0}
.ddo-field-name .ddo-pr-field-line{flex:1;width:auto;min-width:40mm}
.ddo-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:2mm 0 2.4mm}
.ddo-pr-insts{margin-top:1mm}
.ddo-pr-inst{margin:0;font-size:12.6pt;line-height:5.3mm;white-space:pre-wrap}
.ddo-pr-problems{flex:none;margin-top:2mm}
.ddo-pr-q{box-sizing:border-box;height:18.5mm;overflow:hidden;display:flex;flex-direction:column}
.ddo-pr-line1{display:flex;align-items:center;height:7.5mm;font-size:12.6pt;white-space:nowrap}
.ddo-pr-num{display:inline-block;width:15mm;font-weight:700}
.ddo-pr-page[lang="en"] .ddo-pr-num{width:24mm}
.ddo-pr-mark{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:6mm;height:6mm;margin-left:2mm;border:0.35mm solid #000;font-weight:700}
.ddo-pr-cards{display:inline-flex;gap:1mm;margin-left:3mm}
.ddo-pr-cards .ddo-card{width:6mm;height:6.5mm;border:0.35mm solid #000;border-radius:1mm;background:#fff;box-shadow:none;font-size:12.6pt}
.ddo-pr-frame{display:inline-flex;align-items:flex-end;gap:0;margin-left:4mm;font-size:12.6pt;font-weight:700}
.ddo-pr-frame .ddo-box{width:6mm;height:6.5mm;border:0.35mm solid #000;font-size:12.6pt}
.ddo-pr-frame .ddo-box.ddo-box-fixed{border:1.2mm double #000}
.ddo-pr-frame .ddo-dot{width:2mm}
.ddo-pr-frame .ddo-minus{width:8mm}
.ddo-pr-anslabel{display:inline-block;width:39mm;margin-left:4mm;font-size:12.6pt}
.ddo-pr-page[lang="en"] .ddo-pr-anslabel{width:31mm}
.ddo-pr-ansbox{display:inline-block;box-sizing:border-box;width:44mm;height:6.5mm;margin-left:1mm;border:0.35mm solid #000}
.ddo-pr-line2{display:flex;gap:3mm;height:6mm;margin-left:22mm;align-items:center}
.ddo-pr-choice{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:31mm;height:6mm;border:0.3mm solid #555;border-radius:1mm;font-size:12.6pt;white-space:nowrap}
.ddo-pr-answers{flex:none;box-sizing:border-box;margin-top:1mm}
.ddo-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.ddo-pr-answers-title{font-weight:700;font-size:12.6pt;height:6mm;line-height:6mm}
.ddo-pr-answer-cols{display:grid;grid-template-columns:61mm 61mm 61mm;column-gap:2mm}
.ddo-pr-answer{box-sizing:border-box;height:4.5mm;font-size:10.2pt;line-height:4.5mm;white-space:pre;overflow:hidden}
.ddo-app-pdf-page .ddo-pr-page{box-shadow:none;margin:0}

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