.library{padding:6px 0 24px;border-bottom:1px solid #dfd4db}
.volume{width:100%;display:grid;grid-template-columns:74px 1fr 28px;align-items:center;gap:12px;text-align:left;border:0;border-radius:0;border-bottom:1px solid #e8dfe6;background:transparent;padding:16px 2px}
.volume small,.volume span{color:#884a70;font-weight:700}
.volume span{font-size:24px;text-align:right}
.volume:hover{background:#f4eaf0}
.readerBar,.noteHead,.tools,.penOnly{display:flex;align-items:center;gap:8px}
.readerBar{position:sticky;top:0;z-index:3;background:#faf8f3;padding:10px 0;border-bottom:1px solid #dfd4db}
.readerBar select{flex:1;min-width:0}
.noteButton{background:#653456;color:white;border:none;margin:8px 0 16px}
.readerBar .noteButton{margin:0}
.reader section{font-size:17px;line-height:1.9;padding:24px 0}
.reader h2,.reader h3,.reader h4,.card-title,.callout-title{color:#633353;font-weight:700;line-height:1.5}
.reader h2{font-size:clamp(22px,3vw,31px)}
.reader h3{margin-top:32px}
.reader ul,.reader ol{padding-left:24px}
.reader li{margin-bottom:7px}
.reader a{color:#733957;text-underline-offset:4px}
.reader .toc-item{display:flex;gap:12px;border-bottom:1px solid #dfd4db;padding:13px 0}
.reader .toc-num,.reader .chapter-num-circle,.reader .section-tag{font-weight:bold;color:#884a70}
.reader .card,.reader .callout,.reader .stat-card,.reader .cover-card{margin:16px 0;background:white;border-left:4px solid #a56990;padding:18px;border-radius:8px}
.reader .callout,.reader .hl{background:#fff0c6}
.reader .stat-grid,.reader .compare-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:10px}
.reader .stat-val{font-weight:bold;font-size:22px}
.reader .cover-deco{display:none}
.reader svg{max-width:100%;height:auto}
.reader .wide{overflow:auto;max-width:100%;margin:15px 0}
.reader .wide svg{width:100%;min-width:580px}
.reader table{border-collapse:collapse;width:100%;min-width:480px;font-size:16px}
.reader th,.reader td{padding:12px;text-align:left;vertical-align:top;border-bottom:1px solid #d9cfd8}
.reader th{background:#442442;color:white}
.reader tbody tr:nth-child(odd){background:white}
.notebook{position:fixed;right:0;top:0;bottom:0;width:min(44vw,620px);z-index:9;background:#fffdf9;box-shadow:0 8px 42px #30172c33;padding:18px 18px calc(22px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
.noteHead{justify-content:space-between}
.noteHead strong{line-height:1.4}
.notebook small{color:#665669;display:block;margin:6px 0}
.tools{flex-wrap:wrap;margin:12px 0}
.tools button,.noteHead button{min-height:44px;padding:7px 11px}
.tools button[aria-pressed=true]{background:#442442;color:white}
.penOnly{font-weight:400;font-size:14px;margin:8px 0;min-height:36px}
.penOnly input{width:21px;height:21px;accent-color:#653456}
.paper{display:block;width:100%;aspect-ratio:4/3;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background:radial-gradient(#d6cbd4 1px,transparent 1.3px) 0 0/18px 18px,#fff;outline:1px solid #d7c8d2;border-radius:8px;cursor:crosshair;overflow:hidden}
.notebook textarea{width:100%;font:inherit;font-size:16px;min-height:110px;border:1px solid #ccbfc8;border-radius:10px;padding:12px}
@media(min-width:760px){body.writing{padding-right:min(44vw,620px)}}
@media(max-width:759px){.notebook{top:auto;max-height:64dvh;width:100%;border-radius:20px 20px 0 0;padding:14px 18px calc(20px + env(safe-area-inset-bottom))}.writing main{padding-bottom:68vh}.noteHead{position:sticky;top:-14px;background:#fffdf9;padding:8px 0;z-index:2}.noteHead strong{max-width:75%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:590px),(min-width:760px) and (max-width:1080px){.readerBar{flex-wrap:wrap;justify-content:space-between}.readerBar select{order:3;flex-basis:100%;width:100%}.volume{grid-template-columns:50px 1fr 20px;gap:8px}.reader section{font-size:16px}}

