/* SORAIRO CLASSROOM R16 — shared accessible learning layout. Primary lessons remain self-contained otherwise. */
:root{--paper:#fbfcf8;--ink:#28473e;--muted:#577469;--mint:#357f70;--line:#d8e8de;--gold:#9a6d30;--gold-bg:#fff0d4;--note-bg:#eaf6f4}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:linear-gradient(150deg,#ecf6f1,#fcfdf9 50%,#edf5f2);font:16px/1.83 -apple-system,BlinkMacSystemFont,"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif;color:var(--ink)}
body,input,select,button{font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif}
main{max-width:870px;padding:20px clamp(15px,4vw,37px) 70px;margin:auto}
a{color:#36776a}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #55a08c;outline-offset:3px}
.brand{display:flex;align-items:center;gap:11px;margin:4px 0 22px;text-decoration:none;color:#326e60;font-size:13px;font-weight:800}
.brand i{width:25px;height:25px;border-radius:9px;background:radial-gradient(circle at 38% 35%,#f9f1ac 0 23%,#a4d9ca 24% 65%,#338a72 66%);flex:none}
.brand small{font-size:10px;color:#789588}
.hero{padding:33px clamp(19px,5vw,43px);border-radius:25px;background:linear-gradient(130deg,#dceee6,#f3f7ec 75%,#fff);border:1px solid #d5e7da;margin-bottom:23px}
.hero .eyebrow,.step{font-size:12px;font-weight:850;letter-spacing:.14em;color:#3b8572}
.hero h1{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-size:clamp(27px,6vw,43px);line-height:1.45;margin:16px 0 12px;letter-spacing:.015em}
.hero p{color:#537368;font-size:clamp(14px,3.7vw,16px);line-height:1.9;margin:10px 0}
.course-chip{display:inline-block;margin-top:10px;color:#347567;border:1px solid #badace;border-radius:99px;padding:5px 12px;background:#f6fffa;font-weight:800;font-size:12px}
.chapter{background:#fffdfa;border:1px solid #dce8df;border-radius:26px;margin:21px 0;padding:clamp(18px,4.7vw,32px);box-shadow:0 8px 24px #7aa78c0d;min-width:0;overflow-wrap:anywhere}
.chapter h2{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-weight:800;font-size:clamp(24px,5vw,34px);line-height:1.55;margin:21px 0 13px;color:#264e40;letter-spacing:.01em}
.chapter h3{font-size:clamp(17px,4.4vw,21px);line-height:1.65;color:#2d6654;margin:12px 0}
.chapter p,.chapter li{font-size:clamp(14px,3.75vw,16px);line-height:1.95;color:#4d6a60}
.chapter p{margin:11px 0 17px}
strong{color:#276d58}
.diagram{background:#f0f7f3;border:1px solid #d1e4da;border-radius:19px;overflow:hidden;padding:12px 10px;margin:20px 0 7px}
.diagram svg{display:block;width:100%;max-width:640px;height:auto;margin:auto}
.diagram .diagram-caption{font-size:12px;color:#568071;margin:4px 7px 7px;line-height:1.6}
.controls{background:#f7faf7;border:1px solid #e2ece5;border-radius:16px;padding:14px 16px;margin:12px 0 16px}
.control{margin:10px 0 15px}.control label{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-weight:750;font-size:14px;color:#3d6858}
.control output{font-size:16px;font-weight:850;color:#257c60;font-variant-numeric:tabular-nums}
input[type=range]{display:block;accent-color:#3d8c76;width:100%;min-height:34px;cursor:pointer;touch-action:pan-y}
.btns{display:flex;gap:9px;flex-wrap:wrap;margin:11px 0}
button{border:1.5px solid #b3d3c2;border-radius:13px;background:white;color:#276e5a;font-weight:800;font-size:14px;padding:11px 16px;min-height:44px;cursor:pointer;line-height:1.55}
button[aria-pressed=true],button.active{background:#327f6b;color:white;border-color:#327f6b}
button:disabled{opacity:.48;cursor:not-allowed}
button.primary{background:#337d6d;color:white;border-color:#337d6d}
button:hover:not(:disabled){filter:brightness(.97)}
.readout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:11px 0}
.readout>div{padding:13px;border:1px solid #d5e8dc;border-radius:14px;background:#f1f8f3;min-width:0}
.readout small{display:block;color:#56766a;font-size:12px;font-weight:800;line-height:1.55}
.readout strong{display:block;font-variant-numeric:tabular-nums;color:#24745c;font-size:clamp(16px,4.8vw,22px);margin-top:5px;overflow-wrap:anywhere}
.think-prompt{padding:15px 18px;background:#f0f8ed;border:1px solid #cadfcb;border-radius:15px;color:#3b6957;margin:18px 0}
.think-prompt strong{display:block;font-size:15px;margin:0 0 4px}
.think-prompt p{margin:0;color:#426b58}
.term-note{margin:15px 0;padding:12px 14px;border-left:4px solid #67a5a5;background:#edf7f6;border-radius:8px;color:#37676b;font-size:13px;line-height:1.85}
.term-note strong{color:#277477}
.key-concept{background:var(--gold-bg);border:2px solid #d3a358;border-radius:18px;margin:19px 0;padding:18px 20px;box-shadow:0 2px 0 #d3a3581c}
.key-concept h3{margin:9px 0;font-size:clamp(20px,4.5vw,25px);color:#694a22}
.key-concept p,.key-concept li{color:#654b2b;font-size:clamp(14px,3.8vw,16px)}
.key-concept strong{color:#6e4617}
.key-flag{display:inline-block;background:#ffe1a6;border-radius:8px;font-size:12px;font-weight:850;color:#81591f;padding:4px 10px}
.feedback{background:#e7f4eb;border-left:5px solid #46987f;border-radius:10px;padding:13px 16px;color:#2e7056;font-size:14px;line-height:1.9;margin:14px 0}
.feedback[data-tone=neutral]{background:#eef6f3;border-left-color:#84afa1}
.stack{display:grid;gap:10px}.stack>div{border:1px solid #dfebe2;background:#fafcf8;padding:13px;border-radius:13px}
.muted{color:#60766e;font-size:13px}
.summary ul{padding-left:23px}
.quiz{background:#fffefa}.quiz .intro{color:#5b7668}
.quiz-item{margin:16px 0;background:#f6fbf7;border:1px solid #cce3d4;border-radius:17px;padding:17px}
.quiz-item .qnum{display:block;font-size:12px;font-weight:850;color:#3d806d}
.quiz-item p.question{font-size:clamp(15px,4vw,17px);color:#2e5647;font-weight:800;line-height:1.6;margin:5px 0 11px}
.choices{display:grid;gap:8px}
.choices button{background:white;color:#345f52;text-align:left;font-weight:700;overflow-wrap:anywhere;min-height:46px}
.choices button[aria-pressed=true]{background:#e1f0e6;color:#28654e;border-color:#3e9479}
.q-feedback{margin:11px 1px 0!important;font-size:13px!important;color:#526c62!important;min-height:24px;line-height:1.7!important}
.q-feedback[data-good=true]{color:#246847!important;font-weight:800}
.q-feedback[data-good=false]{color:#80602d!important}
.quiz-progress{padding:13px 16px;background:#e7f3eb;border:1px solid #c9e3d3;border-radius:13px;color:#2d6951;font-weight:850;font-size:14px}
.chapter.mystery{background:linear-gradient(135deg,#275d53,#173e3f 82%);border:0;color:#fff;position:relative;overflow:hidden;padding:clamp(27px,6vw,49px)}
.chapter.mystery::before{content:"?";position:absolute;right:-15px;top:-90px;font:300px Georgia,serif;color:#ffffff10;line-height:1;pointer-events:none}
.chapter.mystery .step{color:#cbe9d0;position:relative}
.chapter.mystery h2{color:#fff;position:relative;font-size:clamp(23px,5vw,31px)}
.chapter.mystery p{color:#e6f3ea;position:relative;font-size:15px;opacity:1}
.chapter.mystery .mystery-question{color:#fff;font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-size:clamp(23px,5.5vw,34px);line-height:1.6;font-weight:850;margin:21px 0;border:0;padding:0}
.chapter.mystery .mystery-question strong{color:#f9e7b3}
footer{margin:34px 3px;color:#688478;font-size:12px;display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between}
footer a{font-weight:750}
[hidden]{display:none!important}
@media(max-width:390px){.hero{padding:26px 20px}.chapter{padding:20px 16px}.key-concept{padding:15px 14px}.diagram{padding:7px 4px}.controls{padding:12px}.quiz-item{padding:13px}.btns button{flex:1}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
