@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');
:root{--ink:#422d3c;--rose:#a33f62;--pink:#f9e0e9;--paper:#fffdfa;--cream:#fcf5ec;--gold:#b58849;--border:#ead4db;--muted:#745e6a;--green:#39765f}
*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font:16px/1.65 'DM Sans',Arial,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit}a{color:var(--rose)}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #b66d89;outline-offset:3px}.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:22px;padding:13px 28px;background:#fffaf7ed;backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}.brand{text-decoration:none;font-weight:700;color:var(--rose);white-space:nowrap;font-size:20px}.nav{display:flex;gap:4px;margin-left:auto}.nav button,.menu{border:0;background:none;padding:8px 12px;border-radius:10px;font-weight:600}.nav button:hover,.menu:hover{background:var(--pink)}.menu{display:none}.progress{width:110px;display:grid;gap:5px;flex-shrink:0}.progress span{font-size:13px;color:var(--rose);font-weight:700;text-align:right}.progress>div{height:7px;border-radius:12px;background:#e9d8dc}.progress i{height:100%;display:block;background:var(--rose);border-radius:12px;transition:width .3s}.layout{display:grid;grid-template-columns:290px 1fr;max-width:1530px;margin:auto;min-height:calc(100vh - 68px)}aside{position:sticky;top:67px;height:calc(100vh - 67px);overflow:auto;padding:25px 16px;border-right:1px solid var(--border);background:#fff9f5}.side-head{padding:0 12px}.side-head p,.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:2px;font-weight:700;color:var(--rose)}.side-head h2{font:600 29px/1.16 'Playfair Display',Georgia,serif;margin:8px 0 18px}.side-head input{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:white;margin-bottom:16px}.chapter-link{display:flex;align-items:flex-start;width:100%;border:0;background:none;text-align:left;padding:10px;gap:9px;font-size:14px;border-radius:9px;line-height:1.4}.chapter-link small{color:var(--rose);font-weight:700;min-width:28px}.chapter-link:hover,.chapter-link.active{background:var(--pink)}.chapter-link .done{margin-left:auto;color:var(--green)}aside>small{display:block;margin:18px 12px;color:var(--muted);font-size:12px}.group{font-size:11px;letter-spacing:1.7px;color:var(--gold);font-weight:700;margin:20px 10px 5px;text-transform:uppercase}main{padding:42px clamp(18px,5vw,70px) 80px;min-width:0}.hero{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center;background:linear-gradient(120deg,#fff8ec,#f9dce7);padding:36px;border:1px solid var(--border);border-radius:26px;overflow:hidden}.hero h1,h1,h2,h3{font-family:'Playfair Display',Georgia,serif;line-height:1.15}h1{font-size:clamp(36px,5vw,65px);margin:14px 0;letter-spacing:-1px}h2{font-size:28px;margin:0 0 15px}h3{font-size:23px;margin:0 0 10px}.hero h1 em{color:var(--rose)}.hero p{font-size:18px}.primary,.secondary,.pill{border:1px solid var(--rose);border-radius:12px;padding:12px 18px;font-weight:700}.primary{background:var(--rose);color:white}.secondary,.pill{background:white;color:var(--rose)}.secondary:hover,.pill:hover{background:#fff0f4}.primary:hover{background:#84304d}.stats{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.stats span,.tag{padding:5px 9px;border-radius:20px;background:#fff4f5;color:var(--rose);font-size:13px;font-weight:700}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:15px;margin:24px 0}.card,.paper,.quiz,.graph,.memory,.deep{background:var(--paper);border:1px solid var(--border);border-radius:18px;padding:23px;box-shadow:0 6px 15px #5a34400a}.card{text-align:left;min-height:170px}.card:hover{border-color:#af5375;transform:translateY(-2px)}.card p{color:var(--muted)}.card .symbol{font-size:33px;display:block;margin-bottom:9px}.section-head{margin:40px 0 15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.section-head h2{margin:0}.chapter-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.bookmark{background:white;border:1px solid var(--border);border-radius:50%;width:45px;height:45px;font-size:23px;color:var(--rose)}.chapter-title{font-size:clamp(32px,4.8vw,54px);margin:12px 0}.subtitle{font-size:20px;color:var(--muted);margin:0 0 20px}.art{width:100%;display:block;border-radius:19px;overflow:hidden}.chapter-art{margin:22px 0}.paper{margin:18px 0}.paper p{margin:0 0 13px}.paper p:last-child{margin:0}.paper strong{color:var(--rose)}.memory{background:#fbe6ef;border-color:#ebbbce;margin:18px 0}.memory h3{color:var(--rose)}.deep{border-left:5px solid var(--gold);margin:18px 0}.graph{margin:18px 0}.graph img{width:100%;height:auto;display:block;cursor:zoom-in}.graph figcaption{color:var(--muted);font-size:14px;margin-top:10px}.quiz{margin:18px 0}.quiz h3{font-size:23px}.quiz p{margin:9px 0}.options{display:grid;gap:9px;margin:15px 0}.option{display:flex;gap:12px;align-items:center;text-align:left;border:1px solid var(--border);border-radius:11px;background:#fff;padding:12px 14px;font-weight:500}.option .letter{background:var(--pink);color:var(--rose);font-weight:700;border-radius:8px;min-width:32px;text-align:center;line-height:32px}.option.correct{border-color:#429373;background:#e6f5ed}.option.wrong{border-color:#b94e6b;background:#fce9e9}.option:disabled{cursor:default}.feedback{padding:15px;border-radius:12px;background:#fff0e0;color:#64452a}.feedback.ok{background:#e8f5ee;color:#28664c}.chapter-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:25px}.chapter-footer>div{display:flex;gap:10px;flex-wrap:wrap}.muted{color:var(--muted)}.empty{text-align:center;padding:45px}.flashcard{min-height:210px;width:100%;display:grid;place-content:center;text-align:center;border:1px solid var(--border);border-radius:18px;background:linear-gradient(120deg,#fff8e8,#f9dce7);padding:24px;font:600 27px/1.4 'Playfair Display',Georgia,serif}.flashcard small{font:14px 'DM Sans',Arial;color:var(--rose);margin-top:14px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.tabs button.active{background:var(--rose);color:white}.modal{display:none;position:fixed;inset:0;z-index:50;background:#2a1926df;padding:24px;align-items:center;justify-content:center}.modal.open{display:flex}.modal img{max-width:100%;max-height:90vh;object-fit:contain;background:white;border-radius:12px}.modal button{position:absolute;top:18px;right:18px;background:white;border:0;border-radius:50%;width:42px;height:42px;font-size:24px}.disclaimer{font-size:13px;color:var(--muted);margin-top:36px;border-top:1px solid var(--border);padding-top:18px}dialog{border:0}
@media(max-width:900px){.layout{grid-template-columns:1fr}.menu{display:block}.top{padding:10px 12px;gap:5px}.brand{font-size:17px}.nav button{font-size:13px;padding:7px}.progress{width:64px}.progress span{font-size:11px}aside{position:fixed;top:58px;left:0;bottom:0;z-index:19;width:min(300px,88vw);height:calc(100dvh - 58px);box-shadow:6px 0 20px #351f3430;transform:translateX(-105%);transition:transform .2s}aside.open{transform:translateX(0)}main{padding:26px 17px 55px}.hero{grid-template-columns:1fr;padding:23px}.hero .art{grid-row:1}.hero h1{font-size:43px}.hero p{font-size:16px}.brand span{display:none}}
@media(max-width:430px){.nav button{font-size:12px;padding:5px}.progress{width:50px}.hero h1{font-size:37px}.chapter-footer button{font-size:14px;padding:10px}.paper,.quiz,.graph,.deep,.memory{padding:17px}.grid{grid-template-columns:1fr}}
.story-art{margin:0;background:#fff9f1;border:1px solid #eac9d5;padding:8px;border-radius:24px;box-shadow:0 8px 24px #98537018}
.story-art img{display:block;width:100%;height:auto;border-radius:17px;aspect-ratio:3/2;object-fit:cover}
.story-art figcaption{padding:13px 10px 8px;display:flex;align-items:center;gap:11px;color:#a33f62;line-height:1.32}
.story-art figcaption>span:nth-child(2){flex:1}.story-art figcaption small{display:block;font:700 10px/1.35 'DM Sans',Arial,sans-serif;letter-spacing:1.8px;margin-bottom:3px}.story-art figcaption strong{font:italic 600 clamp(16px,2vw,22px)/1.3 'Playfair Display',Georgia,serif}
.mini-heart{width:39px;height:39px;display:grid;place-items:center;flex-shrink:0;background:#fce1ec;border-radius:100%;font-size:22px;color:#c6678b}.sparkle{font-size:27px;color:#c69a54}.chapter-art .story-art{max-width:850px;margin:auto}.cover-art{transform:rotate(1.5deg);padding:8px;background:#fffbf6}.hero{background:radial-gradient(circle at 90% 15%,#fff1d3,transparent 40%),linear-gradient(120deg,#fff9ec,#f9d3e4)}.brand{color:#b94e77}.card{background:linear-gradient(160deg,#fffefa,#fff4f8)}.card .symbol{background:#fce0ea;border-radius:16px;width:57px;height:57px;display:grid;place-items:center}
@media(max-width:900px){.cover-art{transform:none}.story-art figcaption{padding:10px 7px 6px}.chapter-art .story-art{max-width:100%}}
