:root{--study:#2563eb;--ink:#172033;--muted:#526277;--line:#d9e1ec;--paper:#fff}*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:var(--ink);font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif;line-height:1.6}.study-header{background:#fff;border-bottom:1px solid var(--line)}.wrap{width:min(960px,calc(100% - 32px));margin:auto}.study-header .wrap{padding:16px 0;display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{font-weight:800;color:var(--study);text-decoration:none;font-size:1.15rem}.study-nav a,.breadcrumbs a{color:#365171}.study-nav a{margin-left:15px}main{padding:26px 0 50px}.breadcrumbs{font-size:.88rem;margin-bottom:18px}.breadcrumbs span{margin:0 5px;color:#8290a2}.hero,.panel,.problem-card,.landing-card{background:var(--paper);border:1px solid var(--line);border-radius:14px}.hero{padding:28px;margin-bottom:20px}.hero h1{margin:0 0 8px;font-size:clamp(1.7rem,5vw,2.35rem);line-height:1.25}.hero p{margin:0;color:var(--muted)}.panel{padding:22px;margin:20px 0}.settings{display:flex;flex-wrap:wrap;gap:18px;align-items:end}.setting label{display:block;font-weight:700;margin-bottom:5px}select,button,input{font:inherit}select{min-height:44px;padding:6px 10px;border:1px solid #9aa9bc;border-radius:8px;background:#fff}button,.button{min-height:46px;padding:9px 17px;border:0;border-radius:9px;background:var(--study);color:#fff;font-weight:750;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}button.secondary{background:#e8f0ff;color:#164d9b}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}.problem-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.problem-card{padding:17px}.problem-card label{display:flex;align-items:center;gap:10px;font-size:1.25rem}.problem-number{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#e8f0ff;color:#164d9b;font-size:.85rem}.answer-input{width:100%;min-height:52px;margin-top:12px;padding:8px 12px;border:2px solid #aebdce;border-radius:9px;font-size:1.3rem}.answer-status{font-weight:800;margin:10px 0 0}.is-correct{color:#087a45}.is-incorrect{color:#bd2435}.session-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.result{border-color:#b7d2ff;background:#f8fbff}.summary{font-size:1.16rem}.print-settings{display:flex;flex-wrap:wrap;gap:14px;align-items:center}.landing-grid{display:grid;gap:14px}.landing-card{padding:20px;text-decoration:none;color:inherit}.landing-card:hover{border-color:#7aa8ef;box-shadow:0 4px 16px #1d4ed81a}.landing-card h2{margin:0 0 5px;color:#164d9b}.landing-card p{margin:0;color:var(--muted)}.print-only{display:none}@media(max-width:600px){.wrap{width:min(100% - 24px,960px)}.study-nav{display:none}.hero,.panel{padding:18px}.problem-grid{grid-template-columns:1fr}.settings,.print-settings{align-items:stretch}.setting,select,button{width:100%}}@media print{@page{size:A4 portrait;margin:14mm}body{background:#fff;font-size:11pt}.no-print,.study-header,.breadcrumbs,.settings-panel,.print-panel,.session-actions,.answer-status,.result{display:none!important}main{padding:0}.wrap{width:100%}.hero{border:0;padding:0;margin:0 0 10mm}.hero p{display:none}.problem-grid{grid-template-columns:repeat(2,1fr);gap:7mm}.problem-card{border:1px solid #777;padding:5mm;break-inside:avoid}.answer-input{border:0;border-bottom:1px solid #333;border-radius:0;min-height:12mm}html[data-print-mode="questions-answers"] .answer-input{font-size:0}html[data-print-mode="questions-answers"] .answer-input:after{content:""}html[data-print-mode="questions-answers"] .problem-card::after{content:"答え：" attr(data-answer)}html[data-print-mode="answers-page"] .problem-grid{page-break-after:always}html[data-print-name="true"] .print-only,html[data-print-date="true"] .print-only{display:block}.print-fields{display:flex;justify-content:flex-end;gap:12mm;margin-bottom:6mm}.print-answer-key{display:none}html[data-print-mode="answers-page"] .print-answer-key{display:block;page-break-before:always}.print-answer-key li{margin:4mm 0}}
/* Scope hidden-state safety to Study pages. */
.study-header ~ main [hidden],
main [hidden] {
  display: none !important;
}

/* ToolDock Study refresh: shared paper, chalkboard, and practice-workspace skin. */
:root{--study:#2563eb}
body{background-color:#f5f0e4;background-image:radial-gradient(#d7ceb9 0.6px,transparent .6px);background-size:10px 10px}
main{--ink:#18324a;--muted:#587082;--line:#d8d0bd;--paper:#fffdf7;--chalk:#173f37;--warm:#f5efe1;--accent:#efb74d;--soft-blue:#eaf4fb;--soft-green:#eaf2e3;--soft-coral:#fff0e7;color:var(--ink)}
main.wrap{width:min(1180px,calc(100% - 36px));padding:24px 0 58px}
.breadcrumbs{display:inline-flex;align-items:center;gap:5px;padding:7px 13px;margin:0 0 16px;border:1px solid #e3dac7;border-radius:999px;background:#fffdf7d9;color:#637786}
.breadcrumbs a{color:#315a7d;text-decoration:none}.breadcrumbs a:hover{text-decoration:underline}
.hero{position:relative;overflow:hidden;padding:clamp(24px,4vw,44px);margin:0 0 25px;border:1px solid #426b58;border-radius:18px;background:linear-gradient(130deg,#17433b,#24564a 65%,#1a473e);color:#fffdf2;box-shadow:0 10px 24px #183b3022,inset 0 0 0 5px #ffffff09}
.hero:after{content:"✦   ·   ✧";position:absolute;right:26px;bottom:15px;color:#f7dda0;font-size:1.25rem;letter-spacing:.45em;opacity:.8;pointer-events:none}
.hero h1{max-width:850px;margin:0 0 10px;color:#fffdf2;font-size:clamp(1.8rem,5vw,2.8rem);letter-spacing:.02em;text-wrap:balance;text-shadow:0 2px 1px #0e302966}
.hero h1:after{content:"";display:block;width:min(210px,42%);height:4px;margin-top:12px;border-radius:50%;background:#f4ce72;transform:rotate(-1deg)}
.hero p{max-width:760px;color:#e2eee3;font-size:1.02rem}
.panel{border-color:#e0d8c8;border-radius:16px;background:var(--paper);box-shadow:0 5px 16px #49391c0b}
.settings-panel{position:relative;z-index:1;padding:16px 20px;margin:0 0 20px;border-top:4px solid #e9b54e;background:#fffdf7}
.settings{gap:12px 18px}.setting{min-width:125px}.setting label{color:#31526a;font-size:.92rem}
select{border-color:#d1c8b6;border-radius:10px;background-color:#fff;color:#18324a}
button,.button{border-radius:11px;background:var(--study);box-shadow:0 3px 0 #17499b22;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
button:hover,.button:hover{transform:translateY(-1px);filter:brightness(1.04);box-shadow:0 5px 12px #1c4b8826}
button.secondary{background:#edf4f8;color:#234f6c;box-shadow:inset 0 0 0 1px #cfdfeb}
.landing-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:16px}
.landing-card{position:relative;min-height:150px;padding:22px 22px 20px 76px;border:1px solid #e0d7c6;border-radius:16px;background:linear-gradient(145deg,#fffefb,#faf6e9);box-shadow:0 4px 12px #4637190a;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.landing-card:before{content:"✎";position:absolute;left:19px;top:22px;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eaf3f7;color:#28688e;font-size:1.45rem;font-weight:800}
.landing-card:after{content:"›";position:absolute;right:17px;bottom:12px;color:#50809a;font-size:1.35rem;font-weight:800}
.landing-card:hover{transform:translateY(-3px);border-color:#9ab7b8;box-shadow:0 10px 22px #46371915}
.landing-card h2{margin:0 0 7px;color:#244e68;font-size:1.13rem}.landing-card p{line-height:1.55}
.landing-card[href*="/elementary/"]:before{background:#fff0e8;color:#c55c48}
.landing-card[href*="/middle/"]:before{background:#e8f2fb;color:#2469a0}
.landing-card[href*="/high-school/"]:before{background:#f0eafb;color:#7353a5}
.landing-card[href*="/math/"]:before{background:#e7f1fb;color:#276ca3;content:"＋"}
.landing-card[href*="/science/"]:before{background:#eaf4e3;color:#558b45;content:"♧"}
.landing-card[href*="/social/"]:before{background:#fff0e5;color:#c06a36;content:"◎"}
.landing-card[href*="/japanese/"]:before{background:#fff0ef;color:#c85354;content:"あ"}
.landing-card[href*="/english/"]:before{background:#fff5df;color:#bd8520;content:"A"}
.landing-grid:has(> a[href$="/grade-1/"]){grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card{min-height:0;padding:17px 12px;text-align:center;border-radius:14px;background:linear-gradient(180deg,#fffdf8,#f7f0e2)}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card:before{position:static;width:38px;height:38px;margin:0 auto 8px;border-radius:50%;content:"学";background:#e4eff5;color:#315e7a;font-size:1rem}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card:after{display:none}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card h2{margin:0;font-size:.94rem}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card p{font-size:.78rem}
.landing-grid:has(> a[href*="/math-1/"])>.landing-card{min-height:126px}
.practice-workspace{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;align-items:start}
.practice-column{min-width:0}.practice-column .problem-grid{grid-template-columns:1fr;gap:14px}
.problem-card{position:relative;padding:20px 20px 18px 24px;border-color:#ddd5c5;border-radius:14px;background-color:#fffdf7;background-image:repeating-linear-gradient(180deg,transparent 0,transparent 38px,#dce9eb66 39px,#dce9eb66 40px);box-shadow:0 4px 12px #4637190b}
.problem-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:7px;border-radius:14px 0 0 14px;background:#91b7c0}
.problem-label{display:flex;align-items:flex-start;gap:12px;line-height:1.65}.problem-label strong{font-size:1.11rem;font-weight:650}
.problem-number{flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#2d78ad;color:white;font-size:.95rem}
.answer-input{border-color:#a9c8d5;border-radius:10px;background:#fbfeff}
.choice-option{border-color:#d9d2c2;border-radius:10px;background:#fffefa;transition:background .15s,border-color .15s}
.choice-option:hover{border-color:#78a8c5;background:#f3f9fb}.choice-option:has(input:checked){border-color:#3c8bb3;background:#eaf5f8}
.practice-aside{position:sticky;top:18px;display:grid;gap:14px}
.study-progress-card,.study-hint-card{padding:18px;border:1px solid #e0d7c6;border-radius:15px;background:#fffdf7;box-shadow:0 5px 15px #4637190b}
.study-progress-card{border-top:4px solid #e9b54e}.study-aside-kicker{display:block;margin:0 0 7px;color:#658091;font-size:.78rem;font-weight:800;letter-spacing:.06em}
.study-progress-card h2,.study-hint-card h2{margin:0 0 10px;color:#244e68;font-size:1.08rem}
.study-progress-count{display:block;margin-bottom:8px;color:#254c66;font-size:1.5rem;font-weight:850;line-height:1.2;font-variant-numeric:tabular-nums}
.study-progress-track{height:10px;overflow:hidden;border-radius:999px;background:#e7e2d6}.study-progress-fill{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#4b9b75,#a5bd58);transition:width .25s ease}
.study-progress-copy{margin:9px 0 0;color:#5c7180;font-size:.88rem}.study-hint-card ol{margin:0;padding-left:1.25rem;color:#405b6f}.study-hint-card li+li{margin-top:8px}
.session-actions{align-items:center}.session-actions #score{min-width:180px;background:#d84f69;box-shadow:0 4px 0 #9f2f4a33}.session-actions #score:hover{background:#c83e5a}
.result{border-color:#bdd5bd;background:#f3f8ed}.result h2{color:#315b43}
.print-panel{border-style:dashed;background:#fffdf8}.print-panel h2{margin-top:0;color:#315b63}
.print-answer-key{color:#334c5e}
.home-today{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;margin:0 0 20px}
.home-today-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border:1px solid #d8d0bd;border-radius:16px;background:#fffdf7;box-shadow:0 5px 16px #49391c0b}
.home-today-card h2{margin:0 0 5px;color:#244e68;font-size:1.13rem}.home-today-card p{margin:0;color:#587082}
.home-today-card .button{flex:0 0 auto}.home-streak-card{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid #d8d0bd;border-radius:16px;background:linear-gradient(135deg,#edf5e9,#fffdf7)}
.home-streak-mark{display:grid;place-items:center;flex:0 0 54px;height:54px;border-radius:50%;background:#e8b84c;color:#fff;font-size:1.45rem}
.home-streak-card strong{display:block;color:#315b43;font-size:1.06rem}.home-streak-card span{color:#587082;font-size:.88rem}
.section-title{margin:22px 0 14px;color:#244e68;font-size:1.22rem}
@media(max-width:900px){.practice-workspace{grid-template-columns:minmax(0,1fr) 235px;gap:13px}.landing-grid:has(> a[href$="/grade-1/"]){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){main.wrap{width:min(100% - 24px,1180px);padding-top:17px}.hero{padding:25px 20px;border-radius:15px}.hero:after{right:13px;bottom:8px;font-size:1rem}.landing-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.landing-card{min-height:125px;padding:16px 13px 17px 58px}.landing-card:before{left:11px;top:16px;width:36px;height:36px;font-size:1.15rem}.landing-card h2{font-size:1rem}.landing-card p{font-size:.84rem}.landing-grid:has(> a[href$="/grade-1/"]){grid-template-columns:repeat(3,minmax(0,1fr))}.practice-workspace{grid-template-columns:1fr}.practice-aside{position:static;grid-template-columns:repeat(2,minmax(0,1fr));grid-row:1}.study-progress-card,.study-hint-card{padding:15px}.problem-card{padding:17px 15px 16px 20px}.problem-label strong{font-size:1rem}.home-today{grid-template-columns:1fr}.home-today-card{align-items:flex-start;flex-direction:column}.home-today-card .button{width:100%}}
@media(max-width:390px){.landing-grid{grid-template-columns:1fr}.landing-grid:has(> a[href$="/grade-1/"]){grid-template-columns:repeat(2,minmax(0,1fr))}.practice-aside{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
@media screen{.answer-key-concealed{display:none}.answer-key-toggle{display:flex;margin:22px 0 12px}}

/* Shared illustrations and consistent selection controls throughout Study. */
.hero{isolation:isolate;min-height:205px;padding-right:clamp(24px,4vw,44px)}
.hero::before{content:"";position:absolute;right:23px;bottom:-8px;width:min(34%,375px);height:100%;background:url('/study/assets/images/chalkboard-study.svg') right bottom/contain no-repeat;pointer-events:none;z-index:-1}
.hero h1,.hero p{max-width:calc(100% - min(34%,375px))}
.hero h1{line-height:1.36;text-wrap:balance}.hero p{text-wrap:pretty;line-height:1.75}
.landing-grid{grid-auto-rows:1fr;align-items:stretch}
.landing-card{display:flex;flex-direction:column;min-height:164px;height:100%;padding-right:30px}
.landing-card h2{font-size:1.14rem;line-height:1.45;text-wrap:balance;overflow-wrap:anywhere}
.landing-card p{font-size:.9rem;line-height:1.65;text-wrap:pretty;overflow-wrap:anywhere}
.landing-card::before,.landing-card[href*="/math/"]::before,.landing-card[href*="/science/"]::before,.landing-card[href*="/social/"]::before,.landing-card[href*="/japanese/"]::before,.landing-card[href*="/english/"]::before{content:"";width:48px;height:48px;top:20px;left:17px;background-repeat:no-repeat;background-position:center;background-size:35px 35px}
.landing-card::before{background-image:url('/study/assets/images/book.svg');background-color:#eaf3f7}
.landing-card[href="/study/elementary/"]::before,.landing-card[href="/study/middle/"]::before,.landing-card[href="/study/high-school/"]::before{background-image:url('/study/assets/images/school.svg');background-size:39px 39px}
.landing-card[href*="/math/"]::before{background-image:url('/study/assets/images/ruler.svg');background-color:#e7f1fb}
.landing-card[href*="/science/"]::before{background-image:url('/study/assets/images/flask.svg');background-color:#eaf4e3}
.landing-card[href*="/social/"]::before{background-image:url('/study/assets/images/globe.svg');background-color:#fff0e5}
.landing-card[href*="/japanese/"]::before{background-image:url('/study/assets/images/book.svg');background-color:#fff0ef}
.landing-card[href*="/english/"]::before{background-image:url('/study/assets/images/letters.svg');background-color:#fff5df}
.landing-card[href*="/geography-history/"]::before{background-image:url('/study/assets/images/globe.svg');background-color:#e9f2f0}
.landing-card[href*="/civics/"]::before{background-image:url('/study/assets/images/scales.svg');background-color:#f7eddf}
.landing-card[href*="/information/"]::before{background-image:url('/study/assets/images/chip.svg');background-color:#e8f1f5}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card::before{content:"";background-image:url('/study/assets/images/school.svg');background-size:30px 30px}
.landing-grid:has(> a[href$="/grade-1/"])>.landing-card{height:100%;min-height:130px}
.home-grade-grid .landing-card{min-height:172px}
.home-streak-mark{background:#fff0ce url('/study/assets/images/book.svg') center/40px no-repeat;font-size:0}
.section-title{display:flex;align-items:center;gap:9px;text-wrap:balance}.section-title::before{content:"";display:inline-block;flex:0 0 28px;width:28px;height:28px;background:url('/study/assets/images/book.svg') center/contain no-repeat}
.settings-heading{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:#244e68;font-size:1.08rem;line-height:1.4}
.settings-heading::before{content:"";flex:0 0 29px;width:29px;height:29px;background:url('/study/assets/images/ruler.svg') center/contain no-repeat}
.settings-panel .settings{display:grid;grid-template-columns:repeat(2,176px) minmax(176px,max-content);align-items:end;justify-content:start;gap:14px}
.settings-panel .setting{width:176px;min-width:0;margin:0}.settings-panel .setting select{display:block;width:100%;min-height:50px}
.settings-panel .settings>button{min-width:176px;min-height:50px}
.settings-panel .setting label{min-height:1.5em;margin-bottom:7px}
.print-settings .setting{width:176px;min-width:0}.print-settings .setting select{display:block;width:100%;min-height:50px}
.study-hint-card{position:relative}.study-hint-card::before{content:"";position:absolute;right:15px;top:15px;width:34px;height:34px;background:url('/study/assets/images/book.svg') center/contain no-repeat}
.study-hint-card h2{padding-right:36px}.study-hint-card li,.home-today-card p,.home-streak-card span{text-wrap:pretty}
.problem-label strong{min-width:0;overflow-wrap:anywhere;text-wrap:pretty}
@media(max-width:780px){.hero::before{width:30%;opacity:.7}.hero h1,.hero p{max-width:70%}.settings-panel .settings{grid-template-columns:repeat(2,minmax(0,176px))}.settings-panel .settings>button{grid-column:1/-1;width:min(100%,366px)}}
@media(max-width:680px){.hero{min-height:190px}.hero::before{width:170px;right:-10px;opacity:.23}.hero h1,.hero p{max-width:100%}.landing-card{min-height:155px;padding-left:62px;padding-right:20px}.landing-card::before,.landing-card[href*="/math/"]::before,.landing-card[href*="/science/"]::before,.landing-card[href*="/social/"]::before,.landing-card[href*="/japanese/"]::before,.landing-card[href*="/english/"]::before{left:12px;top:17px;width:40px;height:40px;background-size:30px 30px}.landing-card p{font-size:.86rem}.settings-panel .settings{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.settings-panel .setting{width:100%}.settings-panel .settings>button{width:100%;min-width:0}.home-grade-grid .landing-card{min-height:155px}}
@media(max-width:390px){.settings-panel .settings{grid-template-columns:1fr}.settings-panel .settings>button{grid-column:auto}.landing-grid:has(> a[href$="/grade-1/"])>.landing-card{padding:14px 8px}}
@media print{.hero{min-height:0}.hero::before,.section-title::before,.study-hint-card::before{display:none}}
.practice-empty{display:flex;align-items:center;gap:24px;min-height:218px;padding:28px 34px;border:1px dashed #b9c9c1;border-radius:17px;background-color:#fffdf7;background-image:repeating-linear-gradient(0deg,transparent 0,transparent 33px,#dce9eb66 34px,#dce9eb66 35px);box-shadow:0 5px 16px #49391c0b}
.practice-empty-art{display:block;flex:0 0 104px;width:104px;height:104px;border-radius:26px;background:#eaf3ed url('/study/assets/images/book.svg') center/76px no-repeat;transform:rotate(-6deg)}
.practice-empty h2{margin:0 0 7px;color:#244e68;font-size:1.2rem;text-wrap:balance}.practice-empty p{max-width:480px;margin:0;color:#587082;text-wrap:pretty}
@media(max-width:680px){.practice-empty{min-height:0;padding:22px;gap:16px}.practice-empty-art{flex-basis:68px;width:68px;height:68px;border-radius:17px;background-size:50px}}
@media(max-width:680px){.breadcrumbs{display:flex;flex-wrap:wrap;max-width:100%;line-height:1.4}.breadcrumbs a,.breadcrumbs span{flex:0 0 auto}}
@media(max-width:680px){.print-settings .setting{width:100%}}
.home-grade-grid .landing-card{background-image:url('/study/assets/images/school.svg'),linear-gradient(145deg,#fffefb,#faf6e9);background-size:96px auto,auto;background-position:right 20px bottom 14px,center;background-repeat:no-repeat}
.home-grade-grid .landing-card p{max-width:calc(100% - 92px)}
.home-grade-grid .landing-card[href="/study/elementary/"]{background-image:url('/study/assets/images/school-elementary.svg'),linear-gradient(145deg,#fffefb,#fff2e9)}
.home-grade-grid .landing-card[href="/study/middle/"]{background-image:url('/study/assets/images/school-middle.svg'),linear-gradient(145deg,#fffefb,#edf7fc)}
.home-grade-grid .landing-card[href="/study/high-school/"]{background-image:url('/study/assets/images/school-high.svg'),linear-gradient(145deg,#fffefb,#f5effb)}
.home-grade-grid .landing-card[href="/study/elementary/"]::before{background-image:url('/study/assets/images/school-elementary.svg')}
.home-grade-grid .landing-card[href="/study/middle/"]::before{background-image:url('/study/assets/images/school-middle.svg')}
.home-grade-grid .landing-card[href="/study/high-school/"]::before{background-image:url('/study/assets/images/school-high.svg')}
.home-grade-grid .landing-card{display:flex;justify-content:center;padding:20px 20px 20px 128px;background-size:96px 96px,auto;background-position:left 17px center,center}
.home-grade-grid .landing-card::before,.home-grade-grid .landing-card::after{display:none}
.home-grade-grid .landing-card p{max-width:none}
@media(max-width:680px){.home-grade-grid .landing-card{padding:18px 18px 18px 118px;background-size:88px 88px,auto;background-position:left 16px center,center}}
.study-shell-header{background:#fffdfb;border-bottom:1px solid #dce5e9;box-shadow:0 2px 12px #254b6210}
.study-shell-header .wrap{width:min(1180px,calc(100% - 40px));min-height:70px;padding:11px 0}
.study-shell-header .brand,.study-shell-footer .brand{color:#4245c8;letter-spacing:-.03em;font-size:1.24rem;font-weight:850}
.study-shell-header .brand,.study-shell-footer .brand{display:inline-flex;align-items:center;gap:9px;white-space:nowrap}
.study-shell-header .brand img,.study-shell-footer .brand img{display:block;flex:none;width:32px;height:32px;border-radius:9px;box-shadow:0 4px 12px #4f46e524}
.study-shell-header .study-brand-name,.study-shell-footer .study-brand-name{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;font-size:23px;font-weight:850;letter-spacing:-.025em}
.study-shell-header .study-brand-tooldock,.study-shell-footer .study-brand-tooldock{color:#4f46e5}
.study-shell-header .study-brand-study,.study-shell-footer .study-brand-study{color:#276b8b}
.study-shell-header .study-nav{display:flex;align-items:center}
.study-shell-header .study-nav a{margin:0;padding:8px 12px;border-radius:9px;color:#284b62;font-size:.92rem;font-weight:750;text-decoration:none}
.study-shell-header .study-nav a:hover{background:#edf5f8;color:#174d75}
.study-shell-footer{margin-top:34px;background:#fffdfb;border-top:1px solid #dce5e9;color:#425b6d}
.study-shell-footer .wrap{width:min(1180px,calc(100% - 40px))}
.study-footer-main{display:flex;justify-content:space-between;gap:40px;padding:35px 0 30px}
.study-footer-brand{max-width:460px}.study-footer-brand p{margin:8px 0 0;font-size:.86rem;color:#668095}
.study-footer-main nav{display:flex;flex-wrap:wrap;align-content:flex-start;justify-content:flex-end;gap:12px 20px;max-width:550px}
.study-footer-main nav a{color:#284b62;text-decoration:none;font-size:.84rem;font-weight:650;white-space:nowrap}
.study-footer-main nav a:hover{text-decoration:underline;color:#245fc1}
.study-footer-bottom{padding:14px 0 20px;border-top:1px solid #e6eaee;color:#81909d;font-size:.76rem}
.study-info-hero{background:#f8fbfc url('/study/assets/images/book.svg') right 28px center/110px no-repeat}
.study-info-hero h1,.study-info-hero p{max-width:calc(100% - 115px)}
.study-info-hero{border-color:#426b58;background-color:#f8fbfc;background-image:url('/study/assets/images/book.svg');box-shadow:0 8px 20px #284b6220;color:#18324a}
.study-info-hero h1{color:#18324a;text-shadow:none}
.study-info-hero p{color:#526277}
.study-info-hero h1::after{background:#efb74d}
.study-info-hero::after{color:#c99d49}
.study-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:24px 0}
.study-info-grid .panel{margin:0}.study-info-grid h2{margin:0 0 8px;color:#244e68;font-size:1.1rem}.study-info-grid p{margin:0;color:#526277;font-size:.92rem}
.study-info-content{max-width:800px;margin:22px 0}.study-info-content h2{margin:24px 0 8px;color:#244e68;font-size:1.15rem}.study-info-content p{margin:8px 0;color:#526277}
.study-feedback-form{display:grid;gap:15px;max-width:640px}.study-feedback-form label{display:grid;gap:5px;font-weight:700}.study-feedback-form input,.study-feedback-form textarea{width:100%;padding:10px 12px;border:1px solid #9aa9bc;border-radius:8px;background:#fff}.study-feedback-form textarea{min-height:150px;resize:vertical}.study-feedback-form button{justify-self:start}
.study-feedback-form .study-honeypot{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
@media(max-width:680px){.study-shell-header .wrap,.study-shell-footer .wrap{width:min(100% - 24px,1180px)}.study-shell-header .brand{font-size:1.08rem}.study-shell-header .study-nav a{font-size:.78rem;padding:7px 5px}.study-footer-main{flex-direction:column;gap:22px}.study-footer-main nav{justify-content:flex-start;gap:10px 17px}.study-info-grid{grid-template-columns:1fr}.study-info-hero{background-size:70px;background-position:right 14px top 15px}.study-info-hero h1,.study-info-hero p{max-width:100%}}
@media(max-width:680px){.study-shell-header .study-brand-name,.study-shell-footer .study-brand-name{font-size:20px}}
.study-grade-nav{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 22px}.study-grade-nav a{padding:9px 14px;border:1px solid #d7dfdf;border-radius:999px;background:#fffdf7;color:#315a7d;font-weight:700;text-decoration:none}.study-grade-nav a:hover{border-color:#8cb4c0;background:#f0f8f8}
.study-guide-unit{scroll-margin-top:20px;padding:22px;margin:0 0 16px;border:1px solid #e0d8c8;border-radius:16px;background:#fffdf7;box-shadow:0 5px 16px #49391c0b}.study-guide-unit h2{margin:2px 0 8px;color:#244e68;font-size:1.25rem}.study-guide-unit>p{margin:0 0 15px;color:#526277}
.study-worked-example{padding:14px 16px;border-left:4px solid #6da6b4;border-radius:0 10px 10px 0;background:#f0f7f8}.study-worked-example h3{margin:0 0 5px;color:#315e70;font-size:.96rem}.study-worked-example p{margin:0;color:#304b5e}
.study-check{margin-top:14px;padding:12px 15px;border:1px solid #e6d9bd;border-radius:10px;background:#fff8e9}.study-check summary{color:#6a5021;font-weight:750;cursor:pointer}.study-check p{margin:10px 0 0;color:#405b6f}
@media(max-width:680px){.study-guide-unit{padding:18px}.study-worked-example{padding:12px}}
.study-generated-topics{margin:24px 0}.study-generated-topics .landing-card h3{margin:4px 0 7px;color:#244e68;font-size:1.1rem;line-height:1.4}.study-generated-topics .landing-card p{font-size:.9rem}
.problem-explanation{margin:8px 0 0;padding:9px 11px;border-radius:8px;background:#edf6f5;color:#315a62;font-size:.9rem}
@media print{.study-shell-footer{display:none!important}}

/* Keep the diagram worksheet compact and readable on A4. */
@media print {
  body[data-topic="middle-math-congruence-proofs-grade2"] { background: #fff; color: #172033; }
  body[data-topic="middle-math-congruence-proofs-grade2"] main.wrap { width: 100%; padding: 0; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .hero { background: #fff; color: #172033; box-shadow: none; border: 0; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .hero h1 { max-width: 100%; color: #172033; text-shadow: none; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .hero h1::after,
  body[data-topic="middle-math-congruence-proofs-grade2"] .hero::after,
  body[data-topic="middle-math-congruence-proofs-grade2"] .practice-aside { display: none !important; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .practice-workspace { display: block; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7mm; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .problem-card { background: #fff; border: 1px solid #777; box-shadow: none; padding: 4mm; break-inside: avoid; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .problem-label strong,
  body[data-topic="middle-math-congruence-proofs-grade2"] .choice-option { font-size: 10pt; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .question-diagram { display: block; margin: 2mm auto; }
  body[data-topic="middle-math-congruence-proofs-grade2"] .print-answer-key .question-diagram { width: 75mm; margin-left: 0; }
}
