*{box-sizing:border-box}body{margin:0;background:#edf2ef;color:#25372f;font-family:UD Digi Kyokasho NP,UD デジタル 教科書体 NP,Yu Gothic,Meiryo,sans-serif}.toolbar{width:min(900px,calc(100% - 24px));margin:24px auto;padding:28px;background:#fff;border-radius:14px}.eyebrow{color:#386a56;font-size:13px}.toolbar h1{margin:8px 0 12px;font-size:26px}.summary{color:#146652;font-weight:700}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}button{border:0;border-radius:6px;padding:10px 14px;background:#146652;color:#fff;cursor:pointer;font:inherit}button.secondary{background:#edf2ef;color:#23463d}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.sheet{position:relative;width:min(210mm,calc(100% - 24px));margin:20px auto;padding:14mm 10.5mm;background:#fff;color:#222;box-shadow:0 3px 16px #0002}.page-number{position:absolute;top:4mm;right:10.5mm;margin:0;font-size:10pt}.sheet h2{margin:0 0 4mm;text-align:center;font-size:22pt}.instruction{margin:0 0 8mm;text-align:center;font-size:12pt}.problems{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:43mm;margin:0;padding:0;list-style:none;border-top:1px solid #999;border-left:1px solid #999}.problems li{position:relative;display:grid;place-items:center;border-right:1px solid #999;border-bottom:1px solid #999}.problem-number{position:absolute;top:2mm;left:2.5mm;font-size:10pt;color:#555}.value{font-size:32pt;font-weight:700;font-variant-numeric:tabular-nums}@page{size:A4 portrait;margin:0}@media print{body{background:#fff}.toolbar{display:none}.sheet{width:210mm;height:297mm;margin:0;box-shadow:none;break-after:page}.sheet:last-child{break-after:auto}}@media screen and (max-width:620px){.toolbar{padding:16px}.toolbar h1{font-size:20px}.sheet{padding:22px 8px}.page-number{top:4px;right:8px;font-size:11px}.sheet h2{font-size:20px}.instruction{font-size:13px}.problems{grid-auto-rows:78px}.value{font-size:clamp(20px,6vw,32px)}}
