/* ── exchange_reward_payment3_3（品物のこうかんをくり返してはらう金がくをもとめよう、単元仕様書 v1.2）── */
/* 画面：問題文、回答欄（ことば・数の欄・単位。C群は2欄）、案内、共通のテンキー。回答後は正誤・欄ごとの正誤・正しい答え・解説・スタンプの数のかわり方の表（§5-3・§7） */
#question-text .erp-q{display:block;overflow-wrap:normal}
.erp-nb{white-space:nowrap}
.erp-phrase-group{display:inline;min-width:0}
.erp-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
.erp-input{width:6.4em;min-height:48px;font-size:1.35rem;padding:0 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;font-weight:800;box-sizing:border-box}
.erp-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.erp-input.erp-ok,.erp-input.erp-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.erp-input.erp-ng,.erp-input.erp-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.erp-input.erp-bad{border:3px dashed #b45309;background:#fffbeb}
.erp-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center;max-width:560px;line-height:1.7}
.erp-guide[hidden]{display:none}
.erp-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.6;max-width:560px}
.erp-msg:empty{min-height:0;margin:0}
.erp-msg-line{display:block}
.erp-main .ufk-keypad{margin-top:4px}
.feedback.has-text.erp-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.erp-correct{margin:4px 0 6px;font-weight:800;font-size:17px;line-height:1.9}
.erp-expl-text{margin:4px 0 8px;line-height:2;overflow-wrap:normal;word-break:normal;line-break:strict}
.erp-example .erp-ex-q{margin:6px 0 4px;font-weight:700;line-height:2}
.erp-example .erp-ex-a{margin:4px 0 8px;line-height:2}
.erp-learning-focus{word-break:normal;line-break:strict}
#page-quiz.active:has(.erp-main) #question-text{word-break:normal;overflow-wrap:normal;line-break:strict;font-size:17px;line-height:2}
#page-quiz.active:has(.erp-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.erp-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.erp-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.erp-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="exchange_reward_payment3_3"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="exchange_reward_payment3_3"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
/* 結果画面の単元名：狭い幅でも省略せず、文節で折り返す */
.result-unit-badge.erp-badge{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;height:auto;border-radius:14px;line-height:1.5}
.result-unit-badge.erp-badge .rub-name{white-space:normal;overflow:visible;text-overflow:clip}
@media (max-width:400px){
  #page-lesson:has(.erp-example) .lesson-point,#page-lesson:has(.erp-example) .lesson-point *{font-size:15px}
  #page-lesson:has(.erp-example) .lesson-point{padding-left:10px;padding-right:10px;gap:6px}
  #page-lesson:has(.erp-example) .lesson-point .pt-icon{display:none}
  #page-lesson .lesson-example:has(.erp-example){padding-left:8px;padding-right:8px}
  #page-lesson .lesson-example div:has(>.erp-example){padding-left:6px!important;padding-right:6px!important}
  .erp-example .erp-ex-q,.erp-example .erp-ex-a{font-size:14px}
  .erp-guide,.erp-msg{font-size:15px}
}
@media (max-width:340px){
  .erp-example .erp-ex-q,.erp-example .erp-ex-a{font-size:13px}
  #page-lesson:has(.erp-example) :is(h1,h2,h3):has(.erp-phrase){font-size:20px!important}
}
/* 答えの欄：ことばを上に、数の欄の右に単位を離さずに置く。C群は2つの欄をたてにならべる */
.erp-fields{display:flex;flex-direction:column;align-items:center;gap:10px;max-width:100%}
.erp-field{display:flex;flex-direction:column;align-items:center;gap:3px}
.erp-flabel{font-size:15px;font-weight:800;color:#111827;line-height:1.5;white-space:nowrap}
.erp-frow{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.erp-funit{font-size:1.25rem;font-weight:800;color:#111827}
.erp-part{margin:2px 0;font-weight:800;font-size:16px;line-height:1.7}
.erp-part-ok{color:#15803d}
.erp-part-ng{color:#b91c1c}
.erp-part-ok::before{content:"○ "}
.erp-part-ng::before{content:"× "}
/* スタンプの数のかわり方の表：4列。はじめの行とおわりの行は4列をまたぐ */
.erp-table-wrap{max-width:100%;margin:6px 0 8px}
.erp-table{border-collapse:separate;border-spacing:0;width:100%;max-width:360px;font-size:15px;line-height:1.6;color:#111827;border:2px solid #334155;border-radius:6px;background:#fff}
.erp-table th,.erp-table td{padding:3px 6px;text-align:center;border-bottom:1px solid #94a3b8;font-weight:700;white-space:nowrap}
.erp-table th{background:#e2e8f0;font-weight:800;border-bottom:2px solid #334155;font-size:14px}
.erp-table th+th,.erp-table .erp-tr-step td+td{border-left:1px solid #cbd5e1}
.erp-table tr:last-child td{border-bottom:0}
.erp-table .erp-tr-start td,.erp-table .erp-tr-end td{text-align:left;background:#f8fafc;white-space:normal;line-height:1.8}
@media (max-width:400px){
  .erp-funit{font-size:1.1rem}
  .erp-table{font-size:14px}
  .erp-table th{font-size:13px}
  .erp-table th,.erp-table td{padding:3px 3px}
}
@media (max-width:340px){
  .erp-table{font-size:13px}
  .erp-table th{font-size:12px}
  .erp-table th,.erp-table td{padding:3px 2px}
  .erp-table .erp-tr-start td,.erp-table .erp-tr-end td{font-size:12.5px}
  .erp-example .erp-table th{white-space:normal;word-break:keep-all;overflow-wrap:normal;line-height:1.3}
}

/* 印刷（プリント共通仕様書のひな型P・P-標準：A4縦・2列×5行・1ページ。§7・確定表 ERK-09） */
.erp-pr-page{width:190mm;height:276mm;box-sizing:border-box;color:#000;background:#fff;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;display:flex;flex-direction:column;overflow:hidden}
.erp-pr-headrow{flex:none;display:flex;flex-direction:column;gap:0}
.erp-pr-title{box-sizing:border-box;width:100%;height:9mm;margin:0;padding:0 2mm;border:1.5pt solid #666;background:#ffffcc;font-size:13pt;line-height:calc(9mm - 3pt);text-align:center;font-weight:700;white-space:nowrap;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.erp-pr-headrow .pp-fields{margin:1mm 0 0}
.erp-pr-headrow .pp-field-name .pp-field-line{min-width:40mm}
.erp-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:1.5mm 0 1.5mm!important}
.erp-pr-inst{flex:none;font-size:12.5pt;line-height:5.6mm;margin:0 0 1.2mm;padding:0 1mm;overflow-wrap:normal;word-break:normal}
.erp-pr-problems{flex:1 1 0;min-height:0;display:flex;gap:4mm;justify-content:center}
.erp-pr-col{width:93mm;display:flex;flex-direction:column;gap:2mm;min-height:0}
.erp-pr-cell{box-sizing:border-box;width:93mm;flex:1 1 0;min-height:0;padding:0 0.5mm;overflow:hidden;break-inside:avoid;display:flex;flex-direction:column}
.erp-pr-line{flex:none;display:flex;align-items:center;height:6mm;font-size:12.5pt;font-weight:400;line-height:6mm;white-space:nowrap}
.erp-pr-q2{padding-left:8mm}
.erp-pr-field{height:9mm;line-height:9mm;padding-left:8mm}
.erp-pr-no{flex:none;margin-right:1.5mm;font-weight:700;min-width:6.5mm}
.erp-pr-lead{flex:none;font-size:12.5pt;margin-right:1mm;white-space:pre}
.erp-pr-paren{font-size:14pt;font-weight:400}
.erp-pr-blank{flex:none;display:inline-block;width:15.4mm;height:8.4mm}
.erp-pr-blank-w{width:20.4mm}
.erp-pr-paren+.erp-pr-lead{margin-left:0.5mm}
.erp-pr-work{flex:1 1 0;min-height:0}
.erp-pr-answers{flex:none;margin-top:3mm}
.erp-pr-fold{width:100%;height:0;border-top:2px dotted #333;margin:0 0 1.5mm}
.erp-pr-anshead{font-size:12.5pt;font-weight:700;line-height:6mm}
.erp-pr-acols{display:flex;gap:4mm}
.erp-pr-acol{width:93mm}
.erp-pr-answer{margin:0 0 0.5mm;font-size:10pt;line-height:4.4mm;white-space:nowrap}
#pr-sheet[data-unit="exchange_reward_payment3_3"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="exchange_reward_payment3_3"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="exchange_reward_payment3_3"]>#pr-problems{display:block}
#pr-sheet[data-unit="exchange_reward_payment3_3"] .erp-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="exchange_reward_payment3_3"]{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="exchange_reward_payment3_3"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="exchange_reward_payment3_3"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="exchange_reward_payment3_3"] .erp-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.erp-app-pdf-page .erp-pr-page{box-shadow:none;margin:0}
/* 英語の答えの欄の行：かっこのあとのことばの前をあける */
.erp-pr-paren+.erp-pr-lead-en{margin-left:.3em}
