*{box-sizing:border-box}:root{
 --bg:#fff8f3;--card:#fff;--ink:#28313a;--muted:#6d7580;--brand:#b94055;--brand2:#df6b66;
 --gold:#efb84c;--teal:#2e8f8b;--blue:#3e78b2;--green:#3f9665;--red:#c84d5f;--purple:#7358a6;--line:#eadfd8;
 --shadow:0 10px 30px rgba(83,52,42,.08);--radius:20px
}
html{scroll-behavior:smooth}body{margin:0;background:linear-gradient(180deg,#fffaf6 0,#f8f5f2 100%);color:var(--ink);
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;line-height:1.65}
button,input{font:inherit}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;
padding:12px max(16px,calc((100vw - 1080px)/2));background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.brand{display:flex;gap:10px;align-items:center}.brand h1{font-size:18px;margin:0;line-height:1.2}.brand p{font-size:11px;margin:2px 0 0;color:var(--muted)}
.owl{font-size:34px}main{max-width:1080px;margin:0 auto;padding:22px 16px 60px}.view{display:none}.view.active{display:block}
.card{background:var(--card);border:1px solid #efe5de;border-radius:var(--radius);box-shadow:var(--shadow)}.hero{padding:28px;display:flex;gap:24px;justify-content:space-between;align-items:center;background:radial-gradient(circle at 92% 8%,#ffe5d4,transparent 35%),linear-gradient(135deg,#fff,#fff6ef)}
.hero h2{font-size:clamp(26px,5vw,43px);margin:8px 0 4px;color:#94384c;letter-spacing:.01em}.hero p{margin:8px 0;max-width:740px}
.hero-meter{text-align:center;min-width:130px}.meter-ring{width:110px;height:110px;border-radius:50%;display:grid;place-items:center;margin:auto;background:conic-gradient(var(--brand) 0deg,#eee5df 0);position:relative}.meter-ring:before{content:"";position:absolute;width:82px;height:82px;border-radius:50%;background:white}.meter-ring span{position:relative;font-weight:900;font-size:25px;color:var(--brand)}
.badge{display:inline-block;background:var(--brand);color:white;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700}.badge.soft{background:#f6d9de;color:#7d3040}
.notice{margin:16px 0;padding:14px 16px;border-left:5px solid var(--gold);background:#fff6d9;border-radius:12px;font-size:14px}.notice.info{border-left-color:var(--blue);background:#eef5fc}
.dashboard{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.dashboard.six{grid-template-columns:repeat(6,1fr)}.stat{padding:18px;text-align:center}.stat span{display:block;font-size:13px;color:var(--muted)}.stat strong{font-size:25px;color:#753748}
.section{padding:22px;margin:16px 0}.section h3{margin:0 0 4px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-title p,.subtle{margin:0;color:var(--muted);font-size:13px}
.daily-card{background:linear-gradient(135deg,#fff,#f0fbf8)}.daily-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:15px 0}.daily-grid span{padding:10px;border-radius:12px;background:#fff;border:1px solid #d9ece8;text-align:center;font-size:13px}.daily-grid b{display:block;color:#216a64}
.inline-actions,.tool-row{display:flex;gap:8px;flex-wrap:wrap}.unit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:15px}.unit-check{border:1px solid var(--line);padding:10px 12px;border-radius:13px;display:flex;gap:9px;align-items:flex-start;background:#fff;cursor:pointer}.unit-check:hover{border-color:#d8a6af}.unit-check input{margin-top:5px;accent-color:var(--brand)}.unit-check b{display:block;font-size:14px}.unit-check small{display:block;color:var(--muted);line-height:1.35}
.mode-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:15px}.mode-grid.seven{grid-template-columns:repeat(4,1fr)}.mode{border:0;border-radius:16px;padding:16px 10px;background:#faf5f2;color:var(--ink);cursor:pointer;min-height:130px;transition:.18s}.mode:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.08)}.mode span{display:block;font-size:30px}.mode b{display:block;margin:5px 0}.mode small{color:var(--muted);font-size:11px}.mode.learn{background:#fff4de}.mode.memory{background:#eee7fb}.mode.practice{background:#e6f4f3}.mode.wrong{background:#fde8eb}.mode.test{background:#e9eff8}.mode.exam{background:#efe9fb}.mode.review{background:#f0f7e8}
.difficulty-row{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}.difficulty-row button{width:54px;height:54px;border-radius:15px;border:1px solid var(--line);background:#fff;font-weight:900;font-size:20px;cursor:pointer}.difficulty-row button.selected{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 6px 15px rgba(185,64,85,.25)}
.science-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:15px}.science-grid details{border:1px solid #e1e7ea;border-radius:13px;padding:10px 12px;background:#fbfdfe}.science-grid summary{font-weight:800;cursor:pointer}.science-grid p{font-size:13px;color:var(--muted);margin:8px 0 2px}
.progress-list{margin-top:14px;display:grid;gap:10px}.progress-item{display:grid;grid-template-columns:minmax(240px,1.3fr) 2fr 72px;gap:12px;align-items:center;font-size:13px}.progress-meta{color:var(--muted);font-size:12px}.progress-bar{height:9px;background:#eee7e2;border-radius:99px;overflow:hidden}.progress-fill{height:100%;background:linear-gradient(90deg,var(--brand2),var(--brand));border-radius:99px}.mastery-dots{display:inline-flex;gap:3px;margin-left:4px}.mastery-dots i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#e6ded8}.mastery-dots i.on{background:var(--teal)}
.ghost,.primary,.success,.danger-lite{border-radius:12px;padding:10px 14px;border:1px solid var(--line);cursor:pointer;font-weight:700}.ghost{background:#fff;color:#49515a}.ghost:hover{background:#faf7f5}.primary{border:0;background:var(--brand);color:#fff}.primary:hover{background:#a93249}.success{border:0;background:#3d9564;color:#fff}.danger-lite{border:0;background:#fbe2e7;color:#a33248}.small{padding:7px 10px;font-size:12px}.full{width:100%;margin-top:8px}.file-label{display:inline-flex;align-items:center}.file-label input{display:none}.cloud-note{margin-top:12px!important}
.study-head{padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}.study-head h2{margin:4px 0 0}.study-head p{margin:0;color:var(--muted);font-size:13px}.study-mini{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.study-mini span{font-size:12px;background:#f6f1ee;border-radius:99px;padding:5px 9px}.study-mini .timer-chip{background:#fce9ec;color:#93374a;font-weight:900}
.lesson-card,.memory-card,.question-card,.result-card,.test-done{padding:24px}.concept-pill{display:inline-block;background:#edf5f4;color:#246e6a;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700}.learn-block{padding:13px 15px;border-radius:13px;background:#f8f8f8;margin:10px 0}.learn-block.example{background:#eef5fc}.learn-block p{margin:4px 0}.warning{background:#fff4dd!important}
.memory-card{text-align:center;min-height:360px;display:flex;flex-direction:column;justify-content:center;align-items:center}.memory-prompt{font-size:25px;font-weight:800;max-width:680px}.memory-answer{width:min(680px,100%);padding:18px;background:#f7f4fb;border-radius:16px;margin-top:16px}.memory-answer h3{font-size:27px;margin:0 0 6px}.two-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.q-meta{display:flex;justify-content:space-between;align-items:center;gap:8px}.qtype{font-size:12px;color:var(--muted)}.q-lead{color:var(--muted);margin:16px 0 2px}.question-card h3{font-size:clamp(20px,4vw,28px);line-height:1.5;margin:10px 0 18px}.passage{background:#f4f7fb;border-left:5px solid var(--blue);padding:16px 18px;border-radius:12px;margin:14px 0;font-family:Georgia,"Times New Roman",serif;font-size:17px}.choices{display:grid;gap:10px}.choice{width:100%;text-align:left;border:1px solid #ded7d2;background:#fff;padding:14px 16px;border-radius:13px;cursor:pointer}.choice:hover{border-color:#bd8894;background:#fff9fa}.input-area{display:flex;gap:9px}.input-area input{flex:1;min-width:0;border:2px solid #e1d8d2;border-radius:12px;padding:13px 14px;font-size:16px}.q-actions{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}.hint{margin-top:12px;padding:12px 14px;border-radius:12px;background:#fff6d9;white-space:pre-line}
.result-card{text-align:left}.result-mark{font-size:52px;text-align:center}.result-card h3{text-align:center;font-size:24px}.result-card>#correctAnswer{text-align:center;font-weight:800;color:#7c3645}.explain-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.explain-grid>div{background:#f7f7f7;padding:13px 14px;border-radius:13px}.explain-grid p{margin:5px 0}.reflection-box{margin:18px 0;padding:16px;border:1px solid #e6ded8;border-radius:15px;background:#fcfbfa}.reflection-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.reflection-buttons button{border:1px solid #ded7d2;background:#fff;border-radius:12px;padding:9px 11px;cursor:pointer}.reflection-buttons button.selected{border-color:var(--brand);background:#fff0f3;color:#8f3045;font-weight:800}.error-box{margin-top:14px;padding-top:14px;border-top:1px dashed #d9cec7}.error-buttons button.selected{border-color:var(--red);background:#fff0f2;color:#9f3448}.result-actions{display:flex;gap:10px;justify-content:flex-end}.test-done{text-align:center}.big-score{font-size:72px;font-weight:900;color:var(--brand);line-height:1.1}.test-done button{margin:6px}.test-breakdown{margin:18px auto;max-width:760px;text-align:left;display:grid;gap:7px}.test-breakdown .break-row{display:flex;justify-content:space-between;gap:10px;padding:9px 12px;background:#f7f7f7;border-radius:11px;font-size:13px}
.history-list{display:grid;gap:8px;margin-top:14px}.history-row{display:grid;grid-template-columns:145px 1.4fr 100px 70px 100px 90px;gap:10px;align-items:center;padding:11px;border-bottom:1px solid var(--line);font-size:12px}.history-row small{color:var(--muted)}.ok{color:var(--green);font-weight:800}.ng{color:var(--red);font-weight:800}
footer{text-align:center;padding:28px 16px 50px;color:#7e7772;font-size:12px}.hidden{display:none!important}
@media(max-width:900px){.dashboard.six{grid-template-columns:repeat(3,1fr)}.mode-grid.seven{grid-template-columns:repeat(3,1fr)}.science-grid{grid-template-columns:1fr 1fr}.progress-item{grid-template-columns:minmax(200px,1fr) 1.5fr 60px}.history-row{grid-template-columns:130px 1fr 80px 60px}.history-row span:nth-child(5),.history-row span:nth-child(6){display:none}}
@media(max-width:800px){.dashboard{grid-template-columns:1fr 1fr}.mode-grid,.mode-grid.seven{grid-template-columns:1fr 1fr}.unit-grid{grid-template-columns:1fr}.progress-item{grid-template-columns:1fr 90px}.progress-item .progress-bar{grid-column:1/-1;grid-row:2}.hero{align-items:flex-start}.hero-meter{min-width:100px}.meter-ring{width:86px;height:86px}.meter-ring:before{width:64px;height:64px}.meter-ring span{font-size:20px}.daily-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){main{padding:14px 10px 50px}.topbar{padding:9px 10px}.brand h1{font-size:15px}.brand p{display:none}.owl{font-size:28px}.hero{padding:20px;flex-direction:column}.hero-meter{display:flex;align-items:center;gap:10px}.meter-ring{margin:0}.section,.lesson-card,.memory-card,.question-card,.result-card{padding:17px}.dashboard.six{grid-template-columns:1fr 1fr}.mode-grid,.mode-grid.seven{grid-template-columns:1fr 1fr}.mode{min-height:112px}.science-grid{grid-template-columns:1fr}.explain-grid{grid-template-columns:1fr}.result-actions{flex-direction:column-reverse}.result-actions button{width:100%}.input-area{flex-direction:column}.two-buttons{grid-template-columns:1fr}.history-row{grid-template-columns:1fr 70px}.history-row span:nth-child(1),.history-row span:nth-child(2){grid-column:1/-1}.history-row span:nth-child(5),.history-row span:nth-child(6){display:none}.study-head{align-items:flex-start;flex-direction:column}.section-title{align-items:flex-start;flex-direction:column}.daily-grid{grid-template-columns:1fr 1fr}}
