:root{font-family:Inter,"Noto Sans JP","Hiragino Sans","Yu Gothic",system-ui,sans-serif;color:#172846;background:#f6f9ff;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-width:0}
a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
a:focus-visible{outline:3px solid #69a7ff;outline-offset:4px}
h1,h2,h3,p{margin:0}
.wrap{width:min(92%,1200px);margin-inline:auto}
.site-header{min-height:94px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid #dbe4f3}
.brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:700;letter-spacing:.08em;color:#173e82}
.brand-mark{display:grid;place-items:center;width:36px;height:44px;border-radius:5px;background:#1c59b3;color:white;font-family:Georgia,serif;font-size:26px;font-weight:400}
.header-note{color:#526581;font-size:12px;letter-spacing:.12em}
.eyebrow{color:#2a65bf;font-size:11px;font-weight:700;letter-spacing:.16em}
.hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:36px;min-height:328px;margin:35px 0 48px;padding:46px clamp(24px,5vw,72px);border-radius:8px;overflow:hidden;background:linear-gradient(118deg,#123d80 0%,#1c59b3 60%,#2872cf 100%);color:white;box-shadow:0 18px 48px #214d9220}
.hero:before{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff0c 1px,transparent 1px),linear-gradient(90deg,#ffffff0c 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
.hero-copy{position:relative;z-index:1;max-width:550px}
.hero .eyebrow{color:#bbd8ff}
.hero h1{margin:15px 0 19px;font-size:clamp(38px,5vw,60px);font-weight:650;letter-spacing:.14em;line-height:1.3}
.hero-lead{font-size:clamp(14px,1.45vw,17px);line-height:2;letter-spacing:.04em}
.status{display:inline-flex;align-items:center;gap:9px;margin-top:29px;padding:9px 15px;border:1px solid #b6d4ff70;border-radius:22px;background:#ffffff13;color:#ecf4ff;font-size:12px;line-height:1.5}
.status-dot{width:7px;height:7px;border-radius:50%;background:#a9d0ff}
.hero-art{position:relative;flex:0 0 290px;width:290px;height:225px}
.art-circle{position:absolute;inset:3px 30px 16px 19px;border:2px solid #c8dfff99;border-radius:50%}
.art-circle:before{content:"";position:absolute;top:53px;right:-7px;width:13px;height:13px;border-radius:50%;background:#dceaff}
.art-line{position:absolute;height:1px;background:#dbeaffb5;transform-origin:left center}
.line-one{left:14px;top:129px;width:271px;transform:rotate(-23deg)}
.line-two{left:76px;top:13px;width:197px;transform:rotate(72deg)}
.art-formula{position:absolute;top:85px;left:79px;font-family:Georgia,serif;font-size:29px;font-style:italic;white-space:nowrap;color:#f4f8ff}
.art-square{position:absolute;right:5px;bottom:5px;width:37px;height:37px;border:2px solid #d7e9ff9c;transform:rotate(15deg)}
.grades{padding-bottom:58px}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:20px}
.section-heading h2{margin-top:8px;font-size:22px;letter-spacing:.06em}
.section-heading>p{color:#5c6e89;font-size:13px;line-height:1.7}
.grade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.grade-card{min-height:190px;display:flex;flex-direction:column;align-items:flex-start;padding:23px 25px 20px;border:1px solid #d7e4f5;border-radius:7px;background:white;box-shadow:0 5px 22px #2949770a}
.grade-number{font-family:Georgia,serif;color:#4577ba;font-size:24px;line-height:1}
.grade-card-copy{margin-top:20px}
.grade-card h3{font-size:19px;letter-spacing:.04em}
.grade-card p{margin-top:8px;color:#60728d;font-size:13px}
.grade-badge{align-self:flex-end;margin-top:auto;padding:5px 11px;border-radius:20px;background:#eaf2ff;color:#2f5c9d;font-size:11px;font-weight:600}
.site-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #dbe4f3;padding:23px 0 30px;color:#5c6e89;font-size:11px;line-height:1.8}
.site-footer nav{margin-left:auto}
.notebook-switch{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:9px 15px;border:1px solid #95b8e8;border-radius:24px;color:#174b97;font-size:12px;font-weight:600;line-height:1.5;text-align:center;touch-action:manipulation}
.notebook-switch:hover{background:#e9f2ff}
@media(max-width:760px){.hero{min-height:300px}.hero-art{flex-basis:180px;width:180px;transform:scale(.7);transform-origin:left center}.grade-grid{gap:12px}.grade-card{padding:20px 17px}}
@media(max-width:600px){.site-header{min-height:77px}.brand{font-size:17px}.brand-mark{width:31px;height:38px;font-size:23px}.header-note{display:none}.hero{min-height:340px;margin:22px 0 39px;padding:35px 23px;align-items:flex-start}.hero h1{font-size:39px}.hero-lead{font-size:14px}.hero-art{position:absolute;right:-73px;bottom:-30px;opacity:.34;transform:scale(.66)}.hero-copy{max-width:100%}.section-heading{display:block}.section-heading>p{margin-top:8px}.grade-grid{grid-template-columns:1fr}.grade-card{min-height:108px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:14px}.grade-card-copy{margin:0}.grade-card h3{font-size:17px}.grade-card p{margin-top:5px}.grade-badge{align-self:center;margin:0}.grades{padding-bottom:44px}.site-footer{align-items:stretch;flex-direction:column;gap:12px}.site-footer nav{margin-left:0}.notebook-switch{width:100%;font-size:13px}}
@media(max-width:360px){.hero{min-height:360px}.grade-card{grid-template-columns:31px 1fr;gap:10px}.grade-badge{grid-column:2;justify-self:start}}

button,input,select{font:inherit}
button{cursor:pointer;min-height:44px;touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #69a7ff;outline-offset:3px}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-wrap:wrap}
.header-actions .active-name{margin-right:7px;color:#173e82;font-size:12px;font-weight:700;white-space:nowrap}
.header-actions button,.math-back button,.math-welcome button{border:0;background:transparent;color:#245ca7;font-size:12px;font-weight:600;padding:10px}
.header-actions button:hover,.math-back button:hover,.math-welcome button:hover{text-decoration:underline}
.math-profile-page,.math-history,.file-notice{max-width:780px;margin:44px auto 70px}
.math-profile-page h1,.math-history h1,.file-notice h1{margin:12px 0 13px;font-size:clamp(27px,3vw,36px);line-height:1.4}
.math-profile-page>p:not(.eyebrow),.file-notice p,.history-intro{color:#526581;font-size:14px;line-height:1.9}
.privacy-note{margin-top:14px;padding:12px 15px;border-left:3px solid #8ab4ec;background:#eaf2ff}
.math-message{margin:16px 0;padding:12px 15px;border-left:3px solid #245ca7;background:#eaf2ff;color:#173e82}
.math-profile-list{display:grid;gap:10px;margin:28px 0 36px}
.math-profile-list button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:17px 19px;border:1px solid #d5e3f5;border-radius:7px;background:white;color:#193b71;text-align:left}
.math-profile-list button:hover{border-color:#6a9fe2;background:#f7fbff}
.math-profile-list strong{display:block;font-size:17px}
.math-profile-list small{display:block;margin-top:5px;color:#60728d;font-size:12px}
.math-profile-page h2{margin:10px 0 17px;font-size:19px}
.math-form{display:grid;grid-template-columns:minmax(0,1fr) 155px auto;gap:12px;align-items:end}
.math-form label{display:grid;gap:7px;color:#405775;font-size:12px;font-weight:600}
.math-form input,.math-form select{width:100%;height:48px;min-width:0;padding:0 13px;border:1px solid #adc6e9;border-radius:5px;background:white;color:#172846;font-size:15px}
.math-primary,.math-secondary{min-height:48px;padding:11px 19px;border-radius:25px;font-size:13px;font-weight:700}
.math-primary{border:1px solid #1c59b3;background:#1c59b3;color:white}
.math-secondary{border:1px solid #8eb5e8;background:white;color:#174b97}
.math-primary:hover{background:#174b97}
.math-secondary:hover{background:#edf5ff}
.math-backup{margin-top:29px;padding:15px 0;border-top:1px solid #dbe4f3;color:#526581;font-size:13px}
.math-backup summary,.math-fold summary{cursor:pointer;font-weight:700}
.math-backup p{margin:10px 0;font-size:12px;line-height:1.7}
.empty-note{padding:14px 0;color:#60728d;font-size:13px;line-height:1.8}
.math-welcome{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:24px;padding:12px 16px;border:1px solid #d7e4f5;border-radius:6px;background:white;color:#173e82;font-size:13px;font-weight:700}
.math-welcome+.hero{margin-top:24px}
.math-back{margin-top:24px}
.math-history{max-width:1000px;margin-top:16px}
.math-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:26px 0}
.math-stats>div,.math-panel{padding:22px;border:1px solid #d7e4f5;border-radius:7px;background:white}
.math-stats span,.math-stats small{display:block;color:#60728d;font-size:12px}
.math-stats strong{display:block;margin-top:9px;color:#173e82;font-size:27px}
.math-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.math-panel{margin-bottom:14px;min-width:0}
.math-panel h2{font-size:19px;line-height:1.5}
.math-panel h3{margin:20px 0 5px;color:#31598e;font-size:14px}
.small-note{margin:9px 0;color:#60728d;font-size:12px;line-height:1.7}
.math-insight-list{list-style:none;margin:0;padding:0}
.math-insight-list li{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #e5edf8;font-size:13px}
.math-insight-list li span{flex:1;min-width:0;overflow-wrap:anywhere}
.math-insight-list li strong{color:#174b97;font-size:15px}
.math-insight-list li small{color:#60728d;white-space:nowrap}
.math-fold summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;color:#173e82;font-size:17px}
.math-fold summary small{color:#60728d;font-size:12px;font-weight:400}
.math-trend{display:flex;align-items:end;gap:8px;min-height:180px;overflow-x:auto;padding:13px 2px}
.math-trend-item{display:grid;justify-items:center;gap:5px;flex:0 0 60px;color:#31598e;font-size:11px;text-align:center}
.math-trend-item small{color:#60728d;font-size:10px;line-height:1.4}
.math-trend-bar{position:relative;width:20px;height:110px;border-radius:4px;background:#eaf2ff;overflow:hidden}
.math-trend-bar>span{position:absolute;bottom:0;left:0;right:0;background:#2872cf}
.math-session{border-top:1px solid #e2eaf5}
.math-session summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:53px;cursor:pointer;font-size:13px}
.math-session summary strong{color:#245ca7;white-space:nowrap}
.math-session ol{margin:0 0 18px;padding-left:24px}
.math-session li{padding:11px 0;border-top:1px solid #edf2f9;font-size:13px;line-height:1.7}
.math-session li p{margin:4px 0;color:#526581}
.math-session li small{color:#31598e}
@media(max-width:850px){.site-header{flex-wrap:wrap;padding-top:14px;padding-bottom:11px}.header-note{display:none}.header-actions{order:2;max-width:none;width:100%;justify-content:space-between;gap:4px}.header-actions button{font-size:12px;padding:9px 7px}.math-form{grid-template-columns:1fr 145px}.math-form .math-primary{grid-column:1/-1}.math-insights{grid-template-columns:1fr}}
@media(max-width:600px){.site-header{flex-wrap:wrap;padding-top:14px;padding-bottom:10px}.header-actions{order:2;max-width:none;width:100%;justify-content:space-between}.header-actions .active-name{margin-right:auto}.header-actions button{padding:7px 5px;font-size:11px}.math-profile-page,.math-history,.file-notice{margin-top:28px}.math-form{grid-template-columns:1fr}.math-form .math-primary{grid-column:auto}.math-welcome{align-items:flex-start;flex-direction:column}.math-stats{grid-template-columns:1fr 1fr}.math-stats>div:last-child{grid-column:1/-1}.math-stats>div,.math-panel{padding:17px}.math-session summary{align-items:flex-start;flex-direction:column;padding:12px 0}.math-insight-list li{flex-wrap:wrap}}
.grade-card-ready{border-color:#83b4eb;background:#fafdff}.grade-card-ready:hover{border-color:#2872cf;box-shadow:0 8px 24px #214d921b}.grade-card-ready .grade-badge{background:#1c59b3;color:white}
.math-unit-section{padding:0 0 70px;scroll-margin-top:18px}.math-unit-grid,.math-skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.math-unit-card,.math-skill-card{display:flex;align-items:center;gap:18px;width:100%;min-width:0;padding:22px;border:1px solid #d7e4f5;border-radius:8px;background:#fff;color:#172846;text-align:left;box-shadow:0 4px 18px #2949770a}.math-unit-card:hover,.math-skill-card:hover{border-color:#76a8e9;background:#fafdff}.math-unit-symbol{flex:0 0 48px;display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:#eaf2ff;color:#1c59b3;font-size:23px;font-weight:700}.math-unit-copy{display:grid;gap:5px;min-width:0}.math-unit-copy small,.math-skill-card small{color:#3970b6;font-size:11px;font-weight:700}.math-unit-copy strong,.math-skill-card strong{font-size:18px}.math-unit-copy>span,.math-skill-card>span{color:#60728d;font-size:12px;line-height:1.6}.math-unit-arrow,.math-skill-card b{margin-left:auto;color:#2a65bf}.math-unit-page,.math-practice,.math-result{max-width:850px;margin:15px auto 75px}.math-unit-page h1,.math-practice h1,.math-result h1{margin:9px 0 12px;font-size:clamp(26px,3vw,36px)}.math-unit-page>p:not(.eyebrow){margin-bottom:28px;color:#526581;font-size:14px;line-height:1.8}.math-skill-card{display:grid;grid-template-columns:35px 1fr auto;column-gap:12px;row-gap:4px;padding:19px}.math-skill-card strong{font-size:16px}.math-skill-card>span{grid-column:2}.math-skill-card b{grid-column:3;grid-row:1/3}.math-practice-top{display:flex;align-items:end;justify-content:space-between;gap:12px}.math-progress-text{color:#60728d;font-size:13px}.math-progress-track{height:7px;margin:17px 0 23px;border-radius:9px;background:#e3edfb;overflow:hidden}.math-progress-track span{display:block;height:100%;background:#1c59b3;transition:width .2s}.math-question-card{padding:clamp(20px,4vw,34px);border:1px solid #d7e4f5;border-radius:10px;background:white}.math-question-prompt{font-size:clamp(17px,2.5vw,22px);font-weight:650;line-height:1.85;white-space:pre-wrap}.math-diagram{display:grid;place-items:center;max-width:360px;margin:20px auto;padding:12px;border:1px solid #e2eaf5;border-radius:8px;background:#fbfdff}.math-diagram svg{width:min(100%,300px);height:auto}.math-paper-note,.math-input-note{margin:12px 0;color:#60728d;font-size:13px;line-height:1.7}.math-answer-form{display:grid;justify-items:start;gap:12px;margin-top:25px}.math-answer-label{color:#31598e;font-size:14px;font-weight:700}.math-answer-form>input{width:min(100%,380px);min-height:53px;padding:11px 14px;border:1px solid #adc6e9;border-radius:6px;background:#fff;color:#172846;font-size:20px}.math-answer-form .math-primary{margin-top:4px}.math-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin:0;padding:0;border:0}.math-choices legend{grid-column:1/-1;margin-bottom:10px;color:#31598e;font-size:14px;font-weight:700}.math-choices label{min-width:0}.math-choices input{position:absolute;opacity:0}.math-choices span{display:grid;place-items:center;min-height:54px;padding:9px;border:1px solid #adc6e9;border-radius:7px;background:#fff;color:#173e82;text-align:center;cursor:pointer}.math-choices input:checked+span{border-color:#1c59b3;background:#eaf2ff;font-weight:700}.math-choices input:focus-visible+span{outline:3px solid #69a7ff;outline-offset:3px}.math-hints{margin-top:27px;padding-top:20px;border-top:1px solid #e2eaf5}.math-hints h2{margin-bottom:10px;color:#31598e;font-size:16px}.math-hints>p{display:flex;gap:10px;margin:8px 0;padding:10px 12px;border-radius:6px;background:#edf5ff;font-size:14px;line-height:1.75}.math-hints>p strong{color:#245ca7}.math-hints button{margin-top:5px}.math-feedback{margin-top:25px;padding:20px;border-radius:8px;line-height:1.8}.math-feedback.correct{background:#eaf7ef;border:1px solid #a9d9b5}.math-feedback.review{background:#fff6e9;border:1px solid #ead3aa}.math-feedback h2{margin-bottom:10px;font-size:18px}.math-feedback p{margin:8px 0;font-size:15px}.math-next{margin-top:20px}.math-table-scroll{max-width:100%;overflow-x:auto}.math-question-table{margin:20px 0;border-collapse:collapse;min-width:240px;font-size:15px}.math-question-table th,.math-question-table td{padding:9px 18px;border:1px solid #cdddf1;text-align:center}.math-question-table th{background:#eaf2ff}.math-result{max-width:680px;padding:45px clamp(20px,5vw,45px);border:1px solid #d7e4f5;border-radius:9px;background:white}.math-result>p:not(.eyebrow){color:#526581;line-height:1.8}.math-result-score{display:grid;gap:5px;margin:28px 0;padding:22px;border-radius:8px;background:#eaf2ff;color:#173e82}.math-result-score strong{font-size:39px}.math-result-score small{font-size:13px}.math-result-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.math-number{display:inline-flex;align-items:center;gap:.1em;vertical-align:middle}.stacked-fraction{display:inline-flex;flex-direction:column;min-width:1.1em;vertical-align:middle;text-align:center;line-height:1.1}.stacked-fraction>span:first-child{border-bottom:1.5px solid currentColor;padding:0 .1em .12em}.stacked-fraction>span:last-child{padding:.12em .1em 0}.math-keyboard{width:min(100%,410px);padding:10px 12px;border:1px solid #d7e4f5;border-radius:7px;background:#f6f9ff}.math-keyboard summary{min-height:36px;color:#245ca7;font-size:13px;font-weight:700;cursor:pointer}.math-keyboard p{margin:6px 0 10px;color:#60728d;font-size:12px}.key-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.key-grid button,.key-tools button{min-width:0;min-height:41px;border:1px solid #bad0eb;border-radius:5px;background:#fff;color:#173e82}.key-tools{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}.key-tools button{font-size:11px}.math-session .math-number{font-size:1em}
@media(max-width:700px){.math-unit-grid,.math-skill-grid{grid-template-columns:1fr}.math-unit-card{padding:17px}.math-choices{grid-template-columns:1fr 1fr}.math-result-actions>*{width:100%}}
.math-keyboard-grouped .key-groups{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:9px}.math-keyboard-grouped .key-group{min-width:0;padding:9px;border:1px solid #d7e4f5;border-radius:6px;background:#fff}.math-keyboard-grouped .key-group h3{margin:0 0 8px;color:#31598e;font-size:12px;font-weight:700}.math-keyboard-grouped .key-group-numbers{grid-row:span 2}.math-keyboard-grouped .key-group-aux,.math-keyboard-grouped .key-group-tools{grid-column:1/-1}.math-keyboard-grouped .key-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.math-keyboard-grouped .key-group-aux .key-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.math-keyboard-grouped .key-grid button,.math-keyboard-grouped .key-tools button{min-height:42px}.math-keyboard-grouped .key-tools{margin-top:0;gap:5px}.math-keyboard-grouped .key-group-tools .key-tools button{font-size:11px}
@media(max-width:380px){.math-keyboard-grouped .key-groups{gap:6px}.math-keyboard-grouped .key-group{padding:6px}.math-keyboard-grouped .key-grid{gap:4px}}
