:root{--ink: #2b2b28;--ink-soft: #63655f;--line: #d9dfd6;--paper: #fff;--bg: #f3f6f2;--accent: #2f6243;--accent-strong: #24503a;--accent-soft: #e6efe8;--red: #c8312a;--kyokasho: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "UD デジタル 教科書体 N-R", "UD Digi Kyokasho N-R", "UD デジタル 教科書体 NK", "UD Digi Kyokasho NK", "YuKyokasho", "BIZ UDMincho", "Yu Mincho", serif}html{background:var(--bg)}*{box-sizing:border-box}body{margin:0;color:var(--ink);line-height:1.7;font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP","Yu Gothic UI","Meiryo",sans-serif}button{font:inherit;cursor:pointer}.top{max-width:1400px;margin:0 auto;padding:.8rem 16px 0;display:flex;gap:.6rem;align-items:baseline;flex-wrap:wrap}.brand{font-weight:800;color:var(--accent-strong);text-decoration:none}.crumb{color:var(--ink-soft)}.crumb::before{content:"／";margin-right:.6rem;color:#b7bdb4}.wrap{max-width:1400px;margin:0 auto;padding:8px 16px 24px;display:grid;grid-template-columns:minmax(300px,380px) 1fr;gap:20px;align-items:start}.panel{background:var(--paper);border:1px solid var(--line);border-radius:.9rem;padding:1rem 1.1rem;position:sticky;top:8px;max-height:calc(100vh - 16px);overflow:auto}.panel h1{margin:0;font-size:1.35rem;color:var(--accent-strong)}.lead{margin:.2rem 0 .4rem;color:var(--ink-soft);font-size:.92rem}.step{border-top:1px solid var(--line);padding:.7rem 0 .5rem}.step h2{margin:0 0 .4rem;font-size:1rem;display:flex;align-items:center;gap:.45rem}.step h2 small{font-weight:400;color:var(--ink-soft);font-size:.85rem}.n{display:inline-grid;place-items:center;width:1.5rem;height:1.5rem;border-radius:50%;background:var(--accent);color:#fff;font-size:.85rem}.hint{margin:.2rem 0 .5rem;font-size:.82rem;color:var(--ink-soft)}.row{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:.5rem}.seg{display:flex;gap:.3rem;flex-wrap:wrap}.seg button,.row button.sub,button.sub{border:1px solid var(--line);background:#f7f9f6;border-radius:.55rem;padding:.3rem .75rem;min-height:2.4rem}.seg button[aria-pressed=true],button.sub[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:700}.field{display:grid;grid-template-columns:3.2rem 1fr;gap:.5rem;align-items:center;margin:.35rem 0}.field>span{font-size:.85rem;color:var(--ink-soft)}.field input:not([type]),.field input[id=title]{border:1px solid var(--line);border-radius:.5rem;padding:.45rem .6rem;font:inherit;width:100%}.checks{display:flex;flex-direction:column;gap:.15rem;font-size:.92rem}.checks input{width:1.1rem;height:1.1rem;vertical-align:-2px}.kgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(2.5rem,1fr));gap:.25rem}.kgrid button{font-family:var(--kyokasho);font-size:1.3rem;aspect-ratio:1;border:1px solid var(--line);border-radius:.45rem;background:#fff;color:#9aa09a;padding:0}.kgrid button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--ink);font-weight:700}.kgrid button:disabled{opacity:.35;cursor:default}button.main{width:100%;border:none;border-radius:.7rem;background:var(--accent);color:#fff;font-weight:800;padding:.7rem;font-size:1.05rem;margin-bottom:.4rem}button.main.print{background:#8a5a12}.msg{color:var(--red);font-size:.9rem;margin:.3rem 0 0;min-height:1em}.preview{min-width:0}#sheets{display:flex;flex-direction:column;gap:18px;align-items:center}.empty{color:var(--ink-soft)}.sheet{width:210mm;height:297mm;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.12);padding:12mm 12mm 10mm;display:flex;flex-direction:column;overflow:hidden;color:#111;font-family:var(--kyokasho);position:relative}.sh-head{display:flex;flex-wrap:wrap;row-gap:1.5mm;justify-content:space-between;align-items:flex-end;gap:6mm;border-bottom:.5mm solid #333;padding-bottom:2.5mm}.sh-title{font-size:7mm;font-weight:700;white-space:nowrap}.sh-title small{font-size:4.2mm;margin-left:3mm;font-weight:400}.sh-name{display:flex;gap:2mm;font-size:3.8mm;margin-left:auto}.sh-name span{border-bottom:.3mm solid #555;min-width:12mm;text-align:right;padding:0 1mm}.sh-name .nm{min-width:48mm;text-align:left}.sh-name .pt{min-width:16mm}.sh-lead{margin:2.5mm 0 1mm;font-size:4mm}.answer .sh-title{color:var(--red)}.items{list-style:none;margin:0;padding:0;flex:1;min-height:0}.item{position:relative}.no{font-family:"Yu Gothic UI","Meiryo",sans-serif}.box{display:inline-grid;place-items:center;border:.35mm solid #222;background:#fff;vertical-align:middle}.box+.box{margin-block-start:-.35mm}.box b{color:var(--red);font-weight:400;line-height:1}.q rt{font-size:3.4mm;letter-spacing:.05em}.q.yomi{position:relative}.q.yomi .paren{position:absolute;white-space:pre;line-height:1}.q.yomi .paren b{color:var(--red);font-weight:400}.answer .q.kaki rt{color:#888}.sheet.tate .items{writing-mode:vertical-rl;display:flex;flex-direction:column;flex-wrap:wrap;gap:0;margin-top:3mm}.sheet.tate .item{inline-size:100%;block-size:calc((186mm) / 10);padding-block:0;padding-inline:2mm 0;border-inline-start:none;font-size:7mm;line-height:1.5;border-block-end:.2mm dashed #ccc}.sheet.tate .no{font-size:4.2mm;margin-block-end:2mm;display:inline-block;text-combine-upright:none}.sheet.tate .q.yomi .word{border-right:.35mm solid #222;padding-right:.4mm}.sheet.tate .q.yomi .paren{right:-7.6mm;top:-.3em;font-size:6mm}.sheet.tate .item.has-yomi{padding-block-start:7.4mm}.sheet.tate .box{inline-size:12mm;block-size:12mm;font-size:9mm}.sheet.tate .q rt{font-size:3.4mm}.sheet.yoko .items{display:flex;flex-direction:column;margin-top:3mm}.sheet.yoko .item{flex:1;display:flex;align-items:center;gap:3mm;font-size:6.5mm;line-height:2.2;border-bottom:.2mm dashed #ccc}.sheet.yoko .no{font-size:4.2mm;width:7mm}.sheet.yoko .q.yomi .word{border-bottom:.35mm solid #222}.sheet.yoko .q.yomi .paren{left:-.3em;top:-6.6mm;font-size:5.8mm}.sheet.yoko .item.has-yomi{line-height:3}.sheet.yoko .box{width:12mm;height:12mm;font-size:9mm}.sheet.yoko .box+.box{margin:0 0 0 -.35mm}.sheet.g1 .item,.sheet.g2 .item{font-size:8mm}.sheet.g1 .box,.sheet.g2 .box{inline-size:14mm;block-size:14mm;width:14mm;height:14mm;font-size:10.5mm}.sheet.tate.g1 .q.yomi .paren,.sheet.tate.g2 .q.yomi .paren{right:-8.6mm;font-size:7mm}.sheet.tate.g1 .item.has-yomi,.sheet.tate.g2 .item.has-yomi{padding-block-start:8.4mm}.sheet.yoko.g1 .q.yomi .paren,.sheet.yoko.g2 .q.yomi .paren{top:-7.6mm;font-size:6.6mm}.item .tools{position:absolute;display:none;gap:1mm;z-index:2;writing-mode:horizontal-tb}.sheet.tate .item .tools{top:0;left:50%;transform:translate(-50%,-110%);flex-direction:row}.sheet.yoko .item .tools{right:1mm;top:50%;transform:translateY(-50%)}.item:hover .tools,.item:focus-within .tools,.item.on .tools{display:flex}.item .tools button{border:1px solid var(--accent);background:#fff;color:var(--accent-strong);border-radius:.4rem;width:2.1rem;height:2.1rem;font-size:1rem;padding:0}.item:hover{background:#f6faf6}.pcols{list-style:none;margin:4mm 0 0;padding:0;display:flex;flex-direction:row-reverse;justify-content:flex-start;gap:1.5mm;flex:1}.pcols li{display:flex;flex-direction:column}.cell{width:22mm;height:22mm;border:.35mm solid #333;margin-top:-.35mm;display:grid;place-items:center;font-size:17mm;line-height:1;position:relative;background-image:linear-gradient(#bbb,#bbb),linear-gradient(#bbb,#bbb);background-size:100% .2mm,.2mm 100%;background-position:center;background-repeat:no-repeat}.cell.model{font-weight:400}.cell.model small{position:absolute;right:.6mm;bottom:.2mm;font-size:2.8mm;color:#555;font-family:"Yu Gothic UI",sans-serif}.cell.trace{color:#c9c9c9}.hj-rows{list-style:none;margin:3mm 0 0;padding:0;display:flex;flex-direction:column;gap:4mm;flex:1}.hj-row{display:flex;flex-direction:column;gap:1.5mm;padding-bottom:3mm;border-bottom:.2mm dashed #ccc}.hj-l1,.hj-l2{display:flex;align-items:flex-start;gap:2mm}.hj-l2{gap:0}.hj-cell{width:21mm;height:21mm;border:.35mm solid #333;display:grid;place-items:center;position:relative;flex:none;background-image:linear-gradient(#bbb,#bbb),linear-gradient(#bbb,#bbb);background-size:100% .2mm,.2mm 100%;background-position:center;background-repeat:no-repeat}.hj-l2 .hj-cell+.hj-cell{margin-left:-.35mm}.hj-model{width:26mm;height:26mm}.hj-model small{position:absolute;right:.6mm;bottom:.1mm;font-size:2.8mm;color:#555;font-family:"Yu Gothic UI",sans-serif}.hj-k{width:94%;height:94%;display:block}.hj-k path{fill:none;stroke-linecap:round;stroke-linejoin:round}.hj-k .hj-s{stroke:#111;stroke-width:3.6}.hj-k .hj-n{font:700 10px "Yu Gothic UI",sans-serif;fill:#c4122f}.hj-k .hj-p{stroke:#a6a6a6;stroke-width:3}.hj-k .hj-c{stroke:#000;stroke-width:5.5}.hj-k .hj-d{fill:#000}.hj-k .hj-t{stroke:#cfcfcf;stroke-width:4.5}.hj-steps{display:flex;flex-wrap:wrap;gap:1mm}.hj-step{width:12.6mm;height:12.6mm;border:.25mm solid #888;position:relative;display:grid;place-items:center;margin-bottom:3.4mm}.hj-step::after{content:attr(data-n);position:absolute;bottom:-3.4mm;left:0;right:0;text-align:center;font:2.6mm/1 "Yu Gothic UI",sans-serif;color:#444}.hj-qs{list-style:none;margin:3mm 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:0 6mm;flex:1}.hj-q{display:flex;align-items:center;gap:3mm;border-bottom:.2mm dashed #ccc;font-size:5mm}.hj-q .no{font-size:4.2mm;width:6mm}.hj-q .hj-pic{width:34mm;height:34mm}.hj-q .hj-a{display:flex;flex-direction:column;gap:3mm;line-height:1.5}.hj-q .hj-a b{display:inline-block;min-width:9mm;text-align:center;color:#c4122f}.hj-k .hj-o{stroke:#9a9a9a;stroke-width:3}.hj-k .hj-r{stroke:#d6001c;stroke-width:7}.hj-foot{margin-top:2mm;font:2.4mm/1.3 "Yu Gothic UI",sans-serif;color:#666}#cards{width:min(96vw,1200px);max-width:none;height:min(92vh,820px);max-height:none;padding:1rem 1.2rem;display:none;flex-direction:column;gap:.8rem}#cards[open]{display:flex}.cd-top{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;font-size:1rem}.cd-top #cd-pos{font-weight:700;margin-right:auto}.cd-auto{display:flex!important;align-items:center;gap:.3rem;margin:0!important}.cd-auto input{display:inline!important;width:auto!important;margin:0!important}#cd-sec{font:inherit;padding:.2rem .4rem}.cd-card{flex:1;border:3px solid var(--accent);border-radius:1rem;background:#fffdf6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.2rem;padding:1rem 2rem;cursor:pointer;font-family:var(--kyokasho);color:#111}.cd-sent{margin:0;font-size:clamp(1.8rem,5vw,4rem);line-height:1.5;text-align:center}.cd-word{font-size:1.3em;font-weight:700;color:var(--red);border-bottom:.08em solid var(--red)}.cd-yomi{margin:0;min-height:1.4em;font-size:clamp(2rem,6vw,5rem);font-weight:700;color:var(--accent-strong);visibility:hidden}.cd-yomi.on{visibility:visible}.cd-nav{display:flex;gap:.8rem;justify-content:center}.cd-nav button{width:auto;flex:none;min-width:7rem;min-height:3rem;font-size:1.2rem}.cd-nav #cd-show{min-width:12rem}@media(max-width:600px){#cards{width:100vw;height:100dvh;border-radius:0;padding:.6rem}.cd-card{padding:.6rem}.cd-nav button,.cd-nav #cd-show{min-width:0;flex:1}.cd-sent{font-size:2.1rem}}dialog{border:none;border-radius:.9rem;padding:1rem 1.2rem;max-width:30rem;width:calc(100% - 32px)}dialog::backdrop{background:rgba(0,0,0,.35)}dialog label{display:block;font-size:.9rem;margin:.4rem 0}dialog input{display:block;width:100%;font:inherit;font-size:1.1rem;border:1px solid var(--line);border-radius:.5rem;padding:.45rem .6rem;margin-top:.15rem;font-family:var(--kyokasho)}dialog .row button{flex:1}.foot{max-width:1400px;margin:0 auto;padding:0 16px 32px;font-size:.8rem;color:var(--ink-soft)}.sister h2{font-size:.9rem;margin:1rem 0 .3rem}.sister ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.1rem 1rem}.sister a{color:var(--accent-strong);font-weight:700;margin-right:.5rem}.credits summary{cursor:pointer;padding-block:.35rem}@media(max-width:1100px){.wrap{grid-template-columns:1fr}.panel{position:static;max-height:none}}@media screen and (max-width:860px){#sheets{zoom:.62}}@media screen and (max-width:520px){#sheets{zoom:.43}}@media print{@page{size:A4 portrait;margin:0}html,body{background:#fff}.no-print,.panel,.top,.foot,#edit-hint{display:none!important}.wrap{display:block;padding:0;max-width:none}#sheets{display:block;zoom:1}.sheet{box-shadow:none;break-after:page;page-break-after:always}.item:hover{background:none}}#grades{display:grid;grid-template-columns:repeat(6,1fr)}#grades button{padding-inline:0}
