:root{--bg:#f5f4ef;--paper:#fffefa;--ink:#253632;--muted:#66766f;--line:#d9dfd8;--green:#235948;--soft:#e8eee6;--gold:#b98943;--red:#a24035;--red-bg:#fbeee9;--radius:16px;font-family:'Yu Gothic UI','Hiragino Kaku Gothic ProN',Meiryo,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;line-height:1.8}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}a{color:var(--green);text-underline-offset:4px}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:4px}header{border-bottom:1px solid var(--line);background:var(--paper)}.nav{max-width:1140px;margin:auto;padding:18px 28px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{font-weight:800;text-decoration:none;color:var(--ink);letter-spacing:.06em}.brand span{display:inline-grid;place-items:center;background:var(--green);color:white;width:30px;height:30px;border-radius:8px;margin-right:10px;font:700 17px Georgia,serif}.nav small{color:var(--muted)}main{max-width:1140px;margin:auto;padding:44px 28px 80px}.eyebrow{font-size:.76rem;letter-spacing:.14em;font-weight:800;color:var(--green);margin:0 0 12px}.hero{display:grid;grid-template-columns:1fr 320px;gap:60px;align-items:center;margin:10px 0 40px}h1{font-size:clamp(1.8rem,4vw,3rem);line-height:1.5;letter-spacing:.025em;margin:0 0 18px;font-weight:800}h2{font-size:1.25rem;margin:0 0 12px}h3{font-size:1.1rem;margin:0 0 8px}p{margin:0 0 14px}.muted{color:var(--muted)}.hero p{max-width:640px}.stats-card{background:var(--green);color:white;padding:28px;border-radius:var(--radius);box-shadow:0 12px 28px #204c3310}.stats-card .number{font-size:3.4rem;font-family:Georgia,serif;line-height:1.25}.stats-card .muted{color:#d0e0d4}.stats-card .row{border-top:1px solid #ffffff35;margin-top:18px;padding-top:15px;justify-content:space-between}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.spread{justify-content:space-between}.section-head{margin:30px 0 18px;display:flex;justify-content:space-between;align-items:center;gap:16px}.section-head p{margin:0}.chapters{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.chapter-card{position:relative;display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:26px;text-decoration:none;color:var(--ink);transition:transform .15s,box-shadow .15s}.chapter-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px #203c3010}.chapter-index{display:flex;justify-content:space-between;align-items:center;color:var(--green);font-size:.78rem;font-weight:800;letter-spacing:.08em}.chapter-number{font:2.7rem Georgia,serif;color:var(--green);margin:10px 0 15px}.chapter-card h2{font-size:1.12rem;min-height:4em}.chapter-card .small{font-size:.82rem}.progress{height:6px;background:#e3e7df;border-radius:6px;overflow:hidden;margin:18px 0 12px}.progress>span{display:block;height:100%;background:var(--green);border-radius:6px}.chapter-card .launch{margin-top:22px;font-weight:800;color:var(--green)}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:26px;margin:22px 0}.quiet{background:var(--soft);border:0}.small{font-size:.85rem}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);text-decoration:none;font-weight:700;min-height:46px}.button.primary{background:var(--green);border-color:var(--green);color:#fff}.button.subtle{padding:8px 12px;background:transparent;min-height:40px}.button.danger{color:var(--red)}.button:hover:not(:disabled){filter:brightness(.96)}.chip{display:inline-block;font-size:.73rem;padding:3px 10px;border-radius:20px;background:var(--soft);color:var(--green);font-weight:700;white-space:nowrap}.chip.warn{background:#f6eacb;color:#7c541a}.chapter-title h1{font-size:clamp(1.6rem,3vw,2.35rem);max-width:850px;margin-top:18px}.chapter-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:26px 0}.metric{padding:18px 22px;border:1px solid var(--line);background:var(--paper);border-radius:12px}.metric strong{font:2rem Georgia,serif;margin-right:5px}.metric span{font-size:.8rem;color:var(--muted);display:block}.practice-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px}.control-block{display:flex;flex-direction:column;gap:8px}.control-block select,.search{width:100%;background:white;border:1px solid var(--line);border-radius:9px;padding:11px 12px;color:var(--ink)}.modes{margin-top:24px;display:flex;gap:10px;flex-wrap:wrap}.notice{padding:14px 18px;border-left:3px solid var(--gold);background:#f8f0dd;border-radius:0 8px 8px 0;margin:18px 0;font-size:.86rem}.quiz{max-width:850px;margin:auto}.quiz-head{margin:8px 0 20px}.quiz-progress{margin:14px 0 22px}.question{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:32px}.question h2{font-size:clamp(1.08rem,2.2vw,1.35rem);line-height:1.95;font-weight:700;white-space:pre-line;margin:18px 0 24px}.options{display:grid;grid-template-columns:1fr;gap:10px}.options.wordbank{grid-template-columns:1fr 1fr}.option{display:flex;align-items:center;gap:14px;min-width:0;width:100%;border:1px solid #ccd5cc;border-radius:10px;background:#fff;padding:14px 16px;text-align:left;line-height:1.7;color:var(--ink);opacity:1!important}.option .label{flex-shrink:0;display:grid;place-items:center;min-width:28px;min-height:28px;border-radius:7px;background:#f0f2eb;font-size:.85rem;font-weight:800}.option .option-text{overflow-wrap:anywhere}.option:hover:not(:disabled){border-color:var(--green);background:#f3f7ef}.option.selected{border:2px solid var(--green);padding:13px 15px;background:#eaf1e8}.option.correct{border-color:var(--green);background:#e9f2e7}.option.wrong{border-color:var(--red);background:var(--red-bg)}.option .mark{margin-left:auto;white-space:nowrap;font-size:.78rem;font-weight:700}.feedback{margin-top:24px;border-radius:12px;padding:20px;background:var(--soft);border:1px solid #c6d8c8}.feedback.bad{background:var(--red-bg);border-color:#e4c7bd}.feedback.warning{background:#f8f0dd;border-color:#e4cd9f}.feedback h3{font-size:1.1rem}.feedback p{margin-bottom:8px}.feedback .answer{font-weight:700}.feedback .row{margin-top:18px}.context{margin:18px 0 24px;border:1px solid var(--line);border-radius:10px;padding:12px 16px}.context summary{cursor:pointer;color:var(--green);font-size:.85rem;font-weight:700}.context pre{font:inherit;font-size:.88rem;white-space:pre-wrap;line-height:1.95;max-height:360px;overflow:auto;margin:14px 0 0}.nextbar{display:flex;justify-content:space-between;gap:12px;margin-top:20px;flex-wrap:wrap}.result{text-align:center;padding:30px 0}.result .big{font:4rem Georgia,serif;color:var(--green)}.result .row{justify-content:center}.question-list{padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.question-list li{border-bottom:1px solid var(--line);padding:14px 0}.question-list button{border:0;background:none;text-align:left;width:100%;color:var(--ink);cursor:pointer;padding:0}.question-list .row{justify-content:space-between;margin-bottom:6px}.question-list .preview{font-size:.9rem;line-height:1.8;display:block}.settings{margin-top:30px}.settings summary{cursor:pointer;font-weight:700}.settings .row{margin:18px 0}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:12px 22px;border-radius:12px;z-index:100;max-width:90%;font-size:.9rem}.empty{text-align:center;padding:32px 16px}.footer{font-size:.78rem;color:var(--muted);margin-top:40px;border-top:1px solid var(--line);padding-top:18px}.backlink{display:inline-block;margin-bottom:18px;font-size:.85rem}.save-warning{background:#fce8dd;color:#853a25;padding:10px 24px;text-align:center;font-size:.85rem}.hidden{display:none!important}.keyboard{color:var(--muted);font-size:.75rem;margin-top:16px}.result-list{margin-top:28px;text-align:left}.checkline{display:flex;align-items:center;gap:10px}.checkline input{accent-color:var(--green);width:18px;height:18px}.countnote{font-size:.8rem;color:var(--muted);margin-left:auto}.progress-label{display:flex;justify-content:space-between;gap:12px;font-size:.8rem;color:var(--muted)}.library-note{margin-top:18px;font-size:.8rem;color:var(--muted)}
@media(min-width:850px){.options.compact{grid-template-columns:1fr 1fr}}
@media(max-width:760px){main{padding:26px 18px 60px}.nav{padding:14px 18px}.nav small{display:none}.hero{grid-template-columns:1fr;gap:22px;margin:0 0 32px}.stats-card{padding:20px}.stats-card .number{font-size:2.6rem}.chapters{grid-template-columns:1fr}.chapter-card h2{min-height:0}.chapter-number{margin:4px 0 8px}.chapter-card{padding:22px}.chapter-stats{grid-template-columns:1fr 1fr;gap:10px}.metric{padding:15px}.question{padding:22px 18px}.options.wordbank{grid-template-columns:1fr}.option{padding:12px}.option.selected{padding:11px}.panel{padding:21px 18px}.practice-controls{grid-template-columns:1fr}.modes .button{flex:1 1 40%}.section-head{align-items:flex-start}.hero h1{font-size:2rem}.keyboard{display:none}.nextbar .button{flex:1}.context pre{max-height:300px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
