:root{--ink:#28343b;--red:#b83e36;--green:#176747;--line:#cdd3d3;--muted:#6b7478}*{box-sizing:border-box}html{height:100%}body{margin:0;background:#f8f9f8;color:var(--ink);font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:13px}main{max-width:1600px;margin:auto;padding:10px 28px 12px}button,input{font:inherit}button{cursor:pointer;border:1px solid #bfc7c7;background:#fff;color:var(--ink);border-radius:4px;padding:6px 12px;white-space:nowrap}button:hover{background:#eef1ef}button:disabled{cursor:default;opacity:.5}button:focus-visible,input:focus-visible,div[tabindex]:focus-visible{outline:3px solid #d99b33;outline-offset:2px}[hidden]{display:none!important}.title-line{display:flex;align-items:center;justify-content:center;gap:14px;position:relative;margin-bottom:9px}.game-title{font-weight:700;font-size:16px;color:var(--red)}h1{font-weight:700;font-size:28px;margin:0;letter-spacing:-.04em}.title-line #help{position:absolute;right:0;font-size:11px;padding:4px 10px;border-color:#d9dfdd}.modes{display:flex;gap:0;justify-content:center;margin-bottom:9px}.mode{font-size:12px;border-radius:0;padding:5px 15px;border-color:#b9c5c1}.mode:first-child{border-radius:4px 0 0 4px}.mode:last-child{border-radius:0 4px 4px 0}.mode+.mode{border-left:0}.mode.active{background:#3c5b52;border-color:#3c5b52;color:white}.mode small{font-size:10px;margin-left:4px;opacity:.75}.toolbar{display:flex;justify-content:center;align-items:stretch;gap:8px;max-width:1120px;margin:auto}.timer{border:1px solid #d1d8d5;border-radius:4px;background:#fff;padding:5px 15px;font:22px ui-monospace,monospace;display:grid;place-items:center;font-variant-numeric:tabular-nums;min-width:145px}.score{display:flex;align-items:center;justify-content:center;gap:18px;border:1px solid #d1d8d5;border-radius:4px;background:#fff;min-width:230px;padding:0 12px;font-size:11px}.score strong{font-size:20px;font-variant-numeric:tabular-nums}.score #correct{color:var(--green)}#answer-form{display:flex;align-items:stretch;gap:5px;flex:1}#answer{min-width:100px;flex:1;width:0;border:1px solid #b8c7c2;border-radius:4px;padding:6px 10px;background:white;font-size:14px}#answer:disabled{background:#f0f2f1}#submit{background:#437fbd;color:white;border-color:#437fbd}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#0c5337}#giveup{color:#9e423d}#pause{font-size:11px}.progress{height:3px;background:#e6eae7;max-width:1120px;margin:7px auto 0;border-radius:3px;overflow:hidden}.progress div{width:0;height:100%;background:#238156;transition:width .2s}#feedback{min-height:17px;margin:4px 0 6px;text-align:center;color:var(--muted);font-size:10px}#feedback.success{color:var(--green);font-weight:700}#feedback.error{color:#a02d27}.dict-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px;min-height:27px}.group-jumps{display:flex;align-items:center;gap:4px}.group-jumps button{font-size:10px;background:transparent;border:0;padding:3px 8px;border-radius:3px;color:#53685f}.group-jumps button:disabled{display:none}.filters{display:flex;gap:4px;margin-left:auto}.filters button{font-size:10px;padding:4px 9px;border:0;background:transparent}.filters button.active{background:#324e44;color:white}.filters button span{font-variant-numeric:tabular-nums;margin-left:4px}.filters button:not(.active){color:var(--muted)}#percent{font-size:10px;color:var(--muted);min-width:72px;text-align:right}#collection{height:calc(100dvh - 236px);min-height:250px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid #aab7b1;background:#fff;border-radius:3px;padding:0 6px 8px;scroll-behavior:smooth}.section-label{display:flex;align-items:center;gap:9px;margin:0 0 5px;padding:6px 4px;font-size:11px;font-weight:700;background:#eef2ef;position:sticky;top:0;z-index:2;border-bottom:1px solid #dce3de}.section-label span{font-size:10px;font-weight:400;color:#6d7c74}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(57px,1fr));gap:4px;margin-bottom:8px}.entry{height:72px;min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:11px 1px 2px;background:#f0f2ef;border:1px solid #e2e6e1;border-radius:4px;text-align:center;scroll-margin-top:35px}.entry .no{position:absolute;top:2px;left:4px;font-size:8px;font-family:ui-monospace,monospace;color:#7b867f;line-height:10px}.entry .question{width:42px;height:42px;border:5px solid #dce2db;border-radius:50%;display:grid;place-items:center;color:#b6c1b6;font-size:22px;font-family:Georgia,serif;margin:auto 0}.entry .question:before{content:"";position:absolute;width:28px;height:28px;border:1px solid #d7ded5;border-radius:50%;pointer-events:none}.entry .name{width:100%;font-size:8px;line-height:10px;height:20px;display:flex;align-items:center;justify-content:center;word-break:break-all;overflow:hidden;letter-spacing:-.05em}.entry img{height:38px;width:43px;object-fit:contain;display:block;flex-shrink:0}.entry.answered{background:var(--green);border-color:#0b5135;box-shadow:inset 0 0 0 1px #ffffff18}.entry.answered .no,.entry.answered .name,.entry.answered .question{color:#fff}.entry.answered img{background:#fff;border-radius:50%;padding:1px}.entry.answered .question{border-color:#92bca4;width:36px;height:36px;font-size:20px}.entry.answered .question:before,.entry.revealed .question:before{display:none}.entry .check{position:absolute;right:3px;top:0;color:#fff;font-size:11px;font-weight:900}.entry.revealed{background:#e8eae8;border-color:#dadfda;color:#677168}.entry.revealed img{opacity:.4;filter:grayscale(.6)}.entry.revealed .question{height:36px;width:36px;font-size:20px;border-color:#cfd6cf}.entry.revealed .name{color:#717b74}.entry.pop{animation:pop .25s ease-out}.empty{text-align:center;padding:50px;color:var(--muted);font-size:12px}.below-list{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:7px 0 5px;font-size:10px;color:var(--muted)}.settings{display:flex;align-items:center;gap:14px}.settings label{display:flex;align-items:center;gap:4px;cursor:pointer}.settings input{margin:0;accent-color:var(--green)}.legend{display:flex;gap:12px;margin-left:auto}.legend span{display:flex;align-items:center;gap:5px}.legend i{width:11px;height:11px;border-radius:2px;display:inline-block}.answered-key{background:var(--green)}.unanswered-key{background:#e5e8e4;border:1px solid #cbd1cb}#show-result{font-size:10px;padding:3px 9px}footer{text-align:center;color:#717978;font-size:10px;line-height:1.7;padding-top:4px}dialog{max-width:660px;width:calc(100% - 30px);max-height:85dvh;padding:0;border:1px solid #b9c6bf;border-radius:10px;color:var(--ink);box-shadow:0 12px 70px #1a312b44}dialog::backdrop{background:#19362b77}.dialog-inner{padding:25px}.eyebrow{font-size:10px;letter-spacing:.12em;color:#65796b}h2{font-size:23px;margin:7px 0 16px}#dialog-content{font-size:12px;line-height:1.8;color:#53635b}#dialog-content p{margin:7px 0}.result-number{font:bold 46px ui-monospace,monospace;color:var(--green)}.result-denom{font-size:19px;margin-left:10px}.result-summary{display:flex;align-items:center;justify-content:space-between;gap:15px}.result-answers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;max-height:240px;overflow:auto;margin-top:10px;padding-right:4px}.result-answers .result-answer{border-radius:5px;background:var(--green);color:white;text-align:center;padding:6px 4px;font-size:10px;line-height:1.3;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:70px}.result-answer img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:50%;margin-bottom:4px}.result-label{font-weight:700;color:var(--green);margin-top:14px}#dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}#dialog-actions button{font-size:12px;padding:9px 15px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@keyframes pop{0%{transform:scale(.85)}70%{transform:scale(1.04)}100%{transform:scale(1)}}@media(max-width:1000px){main{padding:10px 14px}.timer{min-width:115px;font-size:20px;padding:5px 9px}.score{min-width:190px;gap:10px;padding:0 8px}.toolbar{gap:5px}#answer{font-size:12px;padding:6px}#answer-form button{font-size:11px;padding:6px 9px}.grid{grid-template-columns:repeat(auto-fill,minmax(54px,1fr))}.entry{height:70px}}@media(max-width:700px){main{padding:8px}.title-line{gap:8px;flex-wrap:wrap;margin-bottom:6px;padding-right:45px}.game-title{font-size:11px}h1{font-size:21px}.title-line #help{font-size:10px;padding:3px 6px}.mode{font-size:10px;padding:5px 8px}.mode small{font-size:9px}.toolbar{flex-wrap:wrap;gap:5px}.timer{font-size:19px;flex:1;min-width:100px;height:32px}.score{flex:1.5;height:32px;font-size:10px}.score strong{font-size:18px}#answer-form{flex-basis:100%;height:35px}#answer{font-size:14px;min-width:50px}#feedback{font-size:9px;margin:3px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dict-tools{gap:4px;flex-wrap:wrap;margin-bottom:3px}.group-jumps{gap:0}.group-jumps button{padding:3px 5px;font-size:9px}.filters{gap:0}.filters button{padding:4px 5px;font-size:9px}.filters button span{margin-left:2px}#percent{display:none}#collection{height:calc(100dvh - 250px);min-height:210px;padding:0 4px 6px}.grid{grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:3px}.entry{height:68px}.entry img{height:35px;width:39px}.entry .name{font-size:8px}.entry .question{height:36px;width:36px;font-size:20px}.section-label{font-size:10px;padding:5px 3px}.section-label span{font-size:9px}.below-list{gap:8px;font-size:9px;flex-wrap:wrap;padding:6px 0 4px}.settings{gap:9px}.legend{gap:7px}footer{font-size:9px;padding-top:2px}.dialog-inner{padding:20px}.result-answers{grid-template-columns:repeat(4,minmax(0,1fr))}.result-summary{align-items:flex-start}.result-number{font-size:38px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

#collection{position:relative}
main{height:100dvh;min-height:420px;display:flex;flex-direction:column}header,.game-panel,.dict-tools,.below-list,footer{flex-shrink:0}.dictionary{display:flex;flex-direction:column;flex:1;min-height:0}#collection{height:auto;min-height:0;flex:1}

.result-answer small{font-size:8px;opacity:.85;margin-bottom:3px}.entry.answered .question{margin:0}

#dialog-actions a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:12px;padding:9px 15px;border:1px solid var(--green);border-radius:4px}#dialog-actions a:focus-visible{outline:3px solid #d99b33;outline-offset:2px}
