.book-main { padding-top:25px; }
.book-crumb { display:flex; align-items:center; gap:9px; margin-bottom:22px; color:#8390a4; font-size:.82rem; }
.book-crumb a:hover { color:var(--blue); }
.book-hero { display:grid; grid-template-columns:1.2fr .8fr; align-items:center; gap:36px; min-height:290px; padding:32px 42px; border:1px solid #d8e2f9; border-radius:24px; background:linear-gradient(120deg,#fff 36%,#edf3ff); overflow:hidden; }
.book-eyebrow { color:var(--blue); font-size:.72rem; letter-spacing:.13em; font-weight:850; }
.book-hero h1 { margin:11px 0 12px; font-size:clamp(2rem,5vw,3.5rem); line-height:1.12; }
.book-hero h1 em { font-style:normal; color:var(--blue); }
.book-hero p { max-width:530px; margin:0 0 22px; color:#627188; font-size:.94rem; line-height:1.8; }
.book-primary { padding:11px 18px; border:0; border-radius:11px; background:var(--blue); box-shadow:3px 3px 0 #cad7ff; color:#fff; font:inherit; font-size:.88rem; font-weight:750; cursor:pointer; }
.book-primary:hover { background:var(--blue-dark); }
.book-illustration { position:relative; display:flex; flex-direction:column; justify-content:center; gap:20px; width:min(260px,85%); min-height:204px; margin:0 auto; padding:25px 32px; border:1px solid #d7e1f5; border-radius:16px; background:#fff; box-shadow:15px 15px 0 #cfddfb; transform:rotate(4deg); }
.book-page-line { width:84%; height:8px; border-radius:99px; background:#e3eaf6; }
.book-page-line.short { width:58%; }
.book-check { position:absolute; right:-19px; top:-14px; display:grid; place-items:center; width:55px; height:55px; border-radius:17px; background:#e0f7ec; color:#199663; font-size:1.65rem; font-weight:800; box-shadow:4px 4px 0 #badfcf; }
.book-page-caption { margin-top:8px; color:#7487a6; font-size:.75rem; }
.book-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:20px 0 42px; }
.book-stats > div { display:flex; flex-direction:column; gap:5px; padding:18px 21px; border:1px solid var(--line); border-radius:15px; background:#fff; }
.book-stats span { color:#6d7b91; font-size:.81rem; font-weight:700; }
.book-stats strong { color:var(--ink); font-size:2rem; line-height:1.1; }
.book-stats small { color:#98a4b7; font-size:.73rem; }
.book-section-head { display:flex; align-items:end; justify-content:space-between; gap:14px; margin-bottom:16px; }
.book-section-head h2 { margin:5px 0 0; font-size:1.52rem; }
.book-data-actions { display:flex; flex-wrap:wrap; gap:7px; }
.book-data-actions button,.book-empty button { padding:8px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:#496086; font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; }
.book-data-actions button:hover,.book-empty button:hover { border-color:#a9bbef; color:var(--blue); }
.book-toolbar { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:11px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.book-search { display:flex; align-items:center; gap:8px; min-width:0; padding:0 10px; border:1px solid var(--line); border-radius:9px; }
.book-search span { color:#8191a9; font-size:1.45rem; line-height:1; }
.book-search input { width:100%; min-width:0; padding:9px 0; font-size:.85rem; }
.book-select { display:flex; align-items:center; gap:6px; color:#748198; font-size:.8rem; white-space:nowrap; }
.book-select select { max-width:130px; padding:9px 7px; border:1px solid var(--line); border-radius:9px; background:#fff; color:#334760; font:inherit; }
.book-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-top:15px; }
.mistake-card { min-width:0; padding:19px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 6px 22px rgba(24,43,80,.035); }
.mistake-top { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.mistake-subject,.mistake-status { padding:4px 8px; border-radius:6px; background:#edf2ff; color:#4160a8; font-size:.72rem; font-weight:750; }
.mistake-status { background:#fff4dc; color:#8a651d; }
.mistake-status.mastered { background:#e5f7eb; color:#258454; }
.mistake-date { margin-left:auto; color:#9aa6b9; font-size:.73rem; }
.mistake-card h3 { margin:14px 0 9px; font-size:1.02rem; }
.mistake-question { display:-webkit-box; min-height:3.1em; margin:0 0 12px; overflow:hidden; color:#647188; font-size:.82rem; line-height:1.65; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.mistake-details { border-top:1px solid #edf0f6; }
.mistake-details summary { padding:12px 0; color:var(--blue); font-size:.82rem; font-weight:750; cursor:pointer; }
.mistake-details strong { display:block; margin:11px 0 4px; font-size:.82rem; }
.mistake-details p { margin:0 0 10px; color:#5e6b80; font-size:.82rem; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.mistake-rich { white-space:pre-wrap; overflow-wrap:anywhere; }
.mistake-rich .mistake-math-inline { display:inline-block; max-width:100%; vertical-align:middle; }
.mistake-rich .mistake-math-block { max-width:100%; margin:9px 0; overflow-x:auto; overflow-y:hidden; padding:3px 0; white-space:normal; }
.mistake-rich .katex { font-size:1em; }
.mistake-rich .katex-display { margin:0; text-align:left; }
.mistake-actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:12px; border-top:1px solid #edf0f6; }
.mistake-actions button { padding:6px 9px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#50617c; font:inherit; font-size:.75rem; cursor:pointer; }
.mistake-actions button:hover { border-color:#b8c8f5; color:var(--blue); }
.mistake-actions button.danger { margin-left:auto; color:#b3484c; }
.book-empty { margin-top:15px; padding:52px 20px; border:1px dashed #c6d4eb; border-radius:16px; background:#fff; text-align:center; }
.book-empty[hidden],.book-message[hidden] { display:none; }
.empty-symbol { display:grid; place-items:center; width:54px; height:54px; margin:0 auto; border-radius:15px; background:#edf2ff; color:var(--blue); font-size:1.7rem; }
.book-empty h3 { margin:15px 0 6px; }
.book-empty p { margin:0 0 17px; color:#748197; font-size:.85rem; }
.book-message { padding:10px 12px; border-radius:9px; background:#e9f6ef; color:#25744f; font-size:.82rem; }
.book-message.error { background:#fff2f2; color:#b4232c; }
.book-privacy { margin:18px 0 0; color:#8793a7; font-size:.76rem; line-height:1.7; }
.book-dialog { width:min(640px,calc(100% - 24px)); max-height:min(90vh,840px); padding:0; border:1px solid var(--line); border-radius:19px; box-shadow:0 20px 70px rgba(15,35,80,.25); color:var(--ink); }
.book-dialog::backdrop { background:rgba(20,32,52,.55); }
.dialog-head { display:flex; justify-content:space-between; align-items:start; padding:21px 24px; border-bottom:1px solid var(--line); }
.dialog-head h2 { margin:5px 0 0; font-size:1.32rem; }
.dialog-close { width:29px; height:29px; border:0; background:none; color:#758298; font-size:1.65rem; cursor:pointer; }
.dialog-fields { display:grid; gap:15px; max-height:58vh; padding:20px 24px; overflow:auto; }
.dialog-fields label { display:grid; gap:7px; font-size:.83rem; font-weight:700; }
.dialog-fields input,.dialog-fields select,.dialog-fields textarea { width:100%; min-width:0; padding:11px 12px; border:1px solid var(--line); border-radius:9px; outline:0; background:#fff; color:var(--ink); font:inherit; font-size:.85rem; font-weight:400; line-height:1.55; }
.dialog-fields textarea { resize:vertical; }
.dialog-fields :is(input,select,textarea):focus { border-color:#8eaafa; box-shadow:0 0 0 3px #edf2ff; }
.required { color:#d84950; }
.optional { color:#94a1b3; font-weight:400; }
.dialog-actions { display:flex; justify-content:end; gap:10px; padding:15px 24px 20px; border-top:1px solid var(--line); }
.dialog-actions > button:first-child { padding:9px 15px; border:1px solid var(--line); border-radius:10px; background:#fff; color:#56667d; font:inherit; cursor:pointer; }
@media (max-width:760px) { .book-hero { grid-template-columns:1fr; padding:27px 22px; gap:24px; } .book-illustration { min-height:132px; width:min(260px,80%); margin:0 auto 9px; } .book-toolbar { grid-template-columns:1fr 1fr; } .book-search { grid-column:1/-1; } .book-select select { width:100%; } .book-list { grid-template-columns:1fr; } }
@media (max-width:500px) { .book-stats { gap:8px; margin-bottom:35px; } .book-stats > div { padding:13px 10px; } .book-stats strong { font-size:1.6rem; } .book-stats small { display:none; } .book-section-head { align-items:start; flex-direction:column; } .dialog-fields { max-height:55vh; padding:17px; } .dialog-head,.dialog-actions { padding-left:17px; padding-right:17px; } }
