/* ── coin_denomination_total_1（おかねを しゅるいごとに まとめよう、単元仕様書 v1.5）── */
/* 画面：問題文の下に、硬貨記号の図と額面別の表（まいすう・しょうけいは書きこみ欄）、答えの欄とテンキー（§5-2・§7 画面表示）。 */
.cdt-main{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:8px 14px;margin:4px 0 6px;max-width:100%}
.cdt-fig{flex:0 1 240px;max-width:100%;display:flex;justify-content:center}
.cdt-coins{display:block;height:auto;overflow:visible}
.cdt-coin-body{fill:#fff7d6;stroke:#1f2937}
.cdt-coin-ring{fill:none;stroke:#1f2937}
.cdt-coin-num{font-weight:700;fill:#111827;font-family:inherit}
.cdt-table{border-collapse:collapse;font-size:15px;flex:none}
.cdt-table th,.cdt-table td{border:1.5px solid #475569;padding:2px 4px;text-align:center;vertical-align:middle}
.cdt-table thead th,.cdt-table tr:first-child th{word-break:keep-all;background:#f1f5f9;font-weight:700;font-size:13px;line-height:1.25;max-width:88px}
.cdt-table th[scope="row"]{white-space:nowrap;font-weight:700;min-width:52px}
.cdt-cell-input{width:3.2em;min-height:44px;font-size:1.2rem;padding:2px 4px;border:2px solid #64748b;background:#fff;border-radius:8px;text-align:center;font-family:inherit;box-sizing:border-box}
.cdt-cell-c .cdt-cell-input{width:2.4em}
.cdt-cell-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#cbd5e1}
/* 採点後（v1.5）：表の欄も答え。正しい欄は緑の実線、まちがえた欄は赤の点線の太い枠（線の形でも区別する）。 */
.cdt-cell-input.cdt-cell-ok,.cdt-cell-input.cdt-cell-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.cdt-cell-input.cdt-cell-ng,.cdt-cell-input.cdt-cell-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.cdt-table-example td{min-width:44px;height:30px}
.cdt-example-answer{margin:6px 0 0;font-weight:700}
.cdt-fields{display:flex;justify-content:center;align-items:center;gap:8px;margin:6px auto 2px;flex-wrap:wrap}
.cdt-input-label{font-weight:700;font-size:1.05rem}
.cdt-unit{font-weight:700;font-size:1.05rem}
.cdt-input-wrap{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.cdt-input{width:4.2em;min-height:44px;font-size:1.4rem;padding:4px 8px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:10px;text-align:center;font-family:inherit;box-sizing:border-box}
.cdt-input:focus-visible,.cdt-cell-input:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
/* えらんでいる欄（テンキーの書きこみ先）だけに太い枠を出す。フォーカスの枠より後ろに置いて、えらんでいる欄では必ずこの枠にする。 */
.cdt-cell-input.ufk-input-active,.cdt-input.ufk-input-active,.cdt-cell-input.ufk-input-active:focus-visible,.cdt-input.ufk-input-active:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.cdt-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.cdt-input.cdt-input-ok{border:3px solid #15803d;background:#dcfce7}
.cdt-input.cdt-input-ng{border:3px dashed #b91c1c;background:#fff1f2}
/* テンキーの切り替えキーは、単元の台帳の文言「らんを かえる」（SURF-055）に差し替えて1行に置く。 */
#cdt-keypad-anchor + .ufk-keypad .ufk-key-switch{grid-column:1/-1;font-size:1rem;white-space:nowrap}
.feedback.has-text.cdt-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.feedback.has-text.cdt-error{color:#b45309}
.cdt-expl-text{margin:4px 0 6px;overflow-wrap:anywhere}
#page-quiz.active:has(.cdt-main) #question-text{word-break:keep-all;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.cdt-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.cdt-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.cdt-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.cdt-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
.lesson-card .cdt-main-example{margin:4px 0}

/* 印刷：A4縦・1ページ（§7。用紙の余白 上下5mm・左右6mm、本文198×287mm、2列×5段、1段42mm）。 */
.cdt-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}
.cdt-pr-head{display:flex;flex-direction:column;flex:none;box-sizing:border-box;width:190mm;height:19mm}
.cdt-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}
.cdt-pr-fields{display:flex;gap:6mm;align-items:flex-end;height:7mm;margin-top:1mm;font-size:12pt;line-height:6mm;white-space:nowrap}
.cdt-pr-group{display:inline-flex;align-items:flex-end;gap:3mm;flex:none}
.cdt-pr-field{display:inline-flex;align-items:flex-end;gap:1.5mm;flex:none}
.cdt-pr-field-line{display:inline-block;box-sizing:border-box;width:14mm;height:6mm;border-bottom:1pt solid #555}
.cdt-field-name{flex:1;min-width:0}
.cdt-field-name .cdt-pr-field-line{flex:1;width:auto;min-width:40mm}
.cdt-pr-solid{box-sizing:content-box;display:block;height:0;padding:0;border:0;border-top:1.5pt solid #333;margin:1mm 0 0}
.cdt-pr-common{flex:none;margin:0;height:7mm;line-height:7mm;font-size:13pt;font-weight:700;white-space:nowrap}
.cdt-pr-problems{display:grid;grid-template-columns:93mm 93mm;column-gap:4mm;flex:none;height:210mm}
.cdt-pr-col{display:flex;flex-direction:column}
.cdt-pr-cell{box-sizing:border-box;height:41.4mm;margin-bottom:0.6mm;padding:1.5mm 0.6mm;border:0.3mm solid transparent;border-radius:1mm;overflow:hidden;display:flex;gap:0.8mm}
.cdt-pr-left{flex:none;width:36mm;display:flex;flex-direction:column}
.cdt-pr-no{height:5mm;line-height:5mm;font-size:12.5pt;font-weight:700}
.cdt-pr-fig{height:18mm;width:36mm}
.cdt-pr-coins{display:block;overflow:visible}
.cdt-pr-coin-body{fill:#fff;stroke:#000}
.cdt-pr-coin-ring{fill:none;stroke:#000}
.cdt-pr-coin-num{font-weight:700;fill:#000;font-family:inherit}
.cdt-pr-ans-label{margin-top:1mm;height:5mm;line-height:5mm;font-size:12.5pt;white-space:nowrap}
.cdt-pr-ans-row{display:flex;align-items:flex-end;gap:1mm;height:8mm}
.cdt-pr-box{display:inline-block;box-sizing:border-box;width:28mm;height:8mm;border:1pt solid #333}
.cdt-pr-unit{font-size:12.5pt;line-height:5mm}
.cdt-pr-right{flex:none;width:53.5mm}
.cdt-pr-table{border-collapse:collapse;table-layout:fixed;width:53.2mm;font-size:9pt}
.cdt-pr-table th,.cdt-pr-table td{border:0.3mm solid #333;padding:0 0.6mm;text-align:center;vertical-align:middle;box-sizing:border-box}
.cdt-pr-table tr:first-child th{height:8mm;line-height:1.15;font-weight:700;word-break:keep-all;overflow-wrap:anywhere}
.cdt-pr-table tr:first-child th:nth-child(1){width:16mm}
.cdt-pr-table tr:first-child th:nth-child(2){width:17mm}
.cdt-pr-table tr:first-child th:nth-child(3){width:20.2mm}
.cdt-pr-table tr+tr th,.cdt-pr-table tr+tr td{height:7.5mm;font-weight:700}
.cdt-pr-answers{flex:none;box-sizing:border-box;height:36mm;padding-top:0}
.cdt-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0.6mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.cdt-pr-answers-title{font-weight:700;font-size:12.5pt;line-height:5mm;height:5mm}
.cdt-pr-ans-wrap{display:grid;grid-template-columns:93mm 93mm;column-gap:4mm}
.cdt-pr-ans-col{display:flex;flex-direction:column}
.cdt-pr-ans{margin:0;font-size:12.5pt;line-height:5.8mm;height:5.8mm;white-space:nowrap;overflow:hidden}
.cdt-app-pdf-page .cdt-pr-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="coin_denomination_total_1"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="coin_denomination_total_1"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="coin_denomination_total_1"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白を白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="coin_denomination_total_1"] .cdt-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="coin_denomination_total_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="coin_denomination_total_1"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="coin_denomination_total_1"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="coin_denomination_total_1"] .cdt-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="coin_denomination_total_1"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="coin_denomination_total_1"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
