body { min-height: 100vh; }
[hidden], .hidden { display: none !important; }
.library-shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 56px; }
.library-header { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 20px; padding: 10px 0; background: rgba(244,247,251,.9); backdrop-filter: blur(14px); }
.back-link { color: #45658f; font-size: 13px; text-decoration: none; }
.library-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.library-title h1 { margin: 0; color: #1d3558; font-size: 22px; }
.library-title p { margin: 3px 0 0; color: #758398; font-size: 11px; }
.mini-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #2d68dd, #7548d8); color: #fff; }
.account-mini { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: #65758a; font-size: 12px; }
.login-notice { max-width: 460px; margin: 90px auto; padding: 34px; border: 1px solid #dbe5f3; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 18px 55px rgba(25,48,81,.1); }
.login-notice strong { color: #233f68; font-size: 20px; }
.login-notice p { margin: 9px 0 20px; color: #758398; font-size: 13px; }
.primary-link { display: inline-block; border-radius: 10px; padding: 10px 20px; background: linear-gradient(100deg, #2864dc, #6849d8); color: #fff; text-decoration: none; font-weight: 700; }
.library-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.space-sidebar, .space-content { border: 1px solid #dce5f2; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 8px 28px rgba(23,45,80,.06); }
.space-sidebar { position: sticky; top: 86px; padding: 13px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 3px 10px; }
.sidebar-head > div { display: grid; gap: 2px; }
.sidebar-head strong { color: #263f65; font-size: 14px; }
.sidebar-head span { color: #8a96a6; font-size: 10px; }
.storage-usage { display: grid; gap: 6px; margin: 0 2px 11px; padding: 10px; border-radius: 10px; background: #f3f6fb; color: #6d7e94; }
.storage-usage > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; }
.storage-usage strong { color: #315784; font-size: 10px; }
.storage-usage i { height: 5px; overflow: hidden; border-radius: 99px; background: #dfe7f2; }
.storage-usage i b { display: block; width: 0; height: 100%; border-radius: inherit; background: #3975dc; transition: width .2s ease; }
.storage-usage small { color: #8794a5; font-size: 9px; line-height: 1.45; }
.storage-usage.warning i b { background: #dfa02d; }
.storage-usage.critical i b { background: #d95454; }
.icon-button { width: 32px; height: 32px; border: 1px solid #ccd8ea; border-radius: 9px; background: #f7f9fd; color: #315b9a; font-size: 20px; line-height: 1; }
.create-space { margin-bottom: 9px; padding: 9px; border-radius: 10px; background: #f3f6fb; }
.create-space input { height: 36px; }
.create-space > div { display: flex; gap: 5px; margin-top: 7px; }
.compact { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: 11px; }
.space-list { display: grid; gap: 5px; }
.space-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; width: 100%; border: 0; border-radius: 10px; padding: 10px; background: transparent; color: #526279; text-align: left; }
.space-item:hover { background: #f4f7fc; }
.space-item.active { background: #eaf1ff; color: #2859aa; font-weight: 700; }
.space-item span:last-child { color: #8795a8; font-size: 10px; font-weight: 500; }
.space-content { min-width: 0; padding: 18px; }
.collection-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-bottom: 17px; padding: 4px; border-radius: 11px; background: #edf2fa; }
.collection-tabs button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #6d7b8e; font-weight: 700; }
.collection-tabs button.active { background: #fff; color: #2859aa; box-shadow: 0 3px 10px rgba(35,67,113,.1); }
.library-layout.memory-mode { grid-template-columns: 1fr; }
.space-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.space-head h2 { margin: 0; color: #213b60; font-size: 20px; }
.space-head p { margin: 5px 0 0; color: #7a8799; font-size: 11px; }
.space-manage { display: flex; gap: 6px; }
.collection-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin: 16px 0 12px; }
.collection-actions button { min-height: 42px; }
.strong-button { border-color: #bdcce7; color: #2e5ba2; font-weight: 700; }
.ai-output { margin: 0 0 13px; padding: 14px; border: 1px solid #ccdafa; border-radius: 13px; background: #f7f9ff; }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: #2d5084; }
#aiOutputBody { color: #35445a; font-size: 13px; line-height: 1.72; white-space: pre-wrap; }
.quiz-output { display: grid; gap: 7px; }
.quiz-output details { padding: 9px 10px; border: 1px solid #dbe4f2; border-radius: 9px; background: #fff; }
.quiz-output summary { cursor: pointer; color: #2d476e; font-weight: 700; }
.quiz-output p { margin: 8px 0 0; white-space: pre-wrap; }
.knowledge-toolbar { margin: 12px 0; }
.knowledge-toolbar input { height: 42px; }
.document-groups { display: grid; gap: 10px; }
.document-group { overflow: hidden; border: 1px solid #dfe7f2; border-radius: 12px; background: #fff; }
.document-group > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 13px 14px; cursor: pointer; list-style: none; background: #f8fafc; }
.document-group > summary::-webkit-details-marker { display: none; }
.document-group h3 { margin: 0; color: #29466f; font-size: 14px; overflow-wrap: anywhere; }
.document-meta { color: #7a8798; font-size: 10px; white-space: nowrap; }
.document-question { padding:8px 14px; border-top:1px solid #e8eef6; background:#fbfcff; }
.document-question-toggle { border:0; padding:6px 0; color:#315f9f; background:transparent; font-size:11px; font-weight:750; }
.document-question-form { display:grid; grid-template-columns:1fr auto; gap:7px; padding:7px 0 5px; }
.document-question-form input { min-height:36px; }
.document-question-answer { grid-column:1/-1; padding:10px 11px; border-left:3px solid #4677d6; border-radius:0 9px 9px 0; background:#eef4ff; color:#3d506c; font-size:11px; line-height:1.7; white-space:pre-wrap; }
.knowledge-list { display: grid; gap: 0; padding: 0 14px; }
.knowledge-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid #edf1f6; }
.knowledge-row:first-child { border-top: 0; }
.knowledge-term { color: #203f70; font-size: 13px; }
.knowledge-page { display: inline-block; margin-left: 7px; border-radius: 999px; padding: 2px 6px; background: #eef3fb; color: #6d7f97; font-size: 9px; vertical-align: 1px; }
.knowledge-row p { margin: 4px 0 0; color: #596577; font-size: 11px; line-height: 1.55; }
.knowledge-controls { display: flex; align-items: center; gap: 5px; }
.knowledge-controls select { max-width: 130px; height: 31px; border: 1px solid #d0dae8; border-radius: 7px; background: #fff; color: #53647b; font-size: 10px; }
.remove-point { border: 0; background: transparent; color: #a35852; font-size: 10px; }
.filtered-out { display: none !important; }
.empty-library, .page-message { margin: 35px 0; color: #8793a4; font-size: 13px; text-align: center; }
.page-message.error { color: #b43c34; }
.page-bookmark { padding: 0; border-top: 1px solid #edf1f6; }
.page-bookmark:first-child { border-top: 0; }
.page-bookmark-toggle { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 42px 14px 14px; cursor: pointer; list-style: none; }
.page-bookmark-toggle::-webkit-details-marker { display: none; }
.page-bookmark-toggle::after { content: "⌄"; position: absolute; right: 16px; top: 50%; translate: 0 -55%; color: #71839b; font-size: 18px; transition: rotate .18s ease; }
.page-bookmark[open] > .page-bookmark-toggle::after { rotate: 180deg; }
.page-bookmark[open] > .page-bookmark-toggle { background: #f8faff; }
.page-bookmark-counts { color: #71839a; font-size: 10px; white-space: nowrap; }
.page-bookmark-body { display: grid; gap: 13px; padding: 14px; border-top: 1px solid #e5ebf4; background: #fff; }
.page-bookmark-body > section { padding: 12px; border: 1px solid #e1e8f2; border-radius: 10px; background: #fbfcfe; }
.page-bookmark-body h5 { margin: 0 0 8px; color: #294a78; font-size: 12px; }
.page-bookmark-body section > p, .page-bookmark-body li { color: #536176; font-size: 11px; line-height: 1.65; }
.page-bookmark-body section > p { margin: 0; }
.saved-page-points { display: grid; gap: 7px; }
.saved-page-points article { padding: 9px 10px; border-radius: 8px; background: #fff; }
.saved-page-points strong { color: #24497f; font-size: 11px; }
.saved-page-points p { margin: 4px 0 0; color: #56657a; font-size: 11px; line-height: 1.6; }
.empty-inline { color: #8390a1 !important; }
.saved-page-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.saved-page-actions button, .saved-page-actions select { min-height: 34px; }
.saved-page-actions select { max-width: 190px; border: 1px solid #d0dae8; border-radius: 8px; padding: 0 8px; background: #fff; color: #53647b; font-size: 10px; }
.saved-page-output { padding: 12px; border: 1px solid #d8e3f4; border-radius: 10px; background: #f7faff; color: #3f5068; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.saved-page-output details + details { margin-top: 7px; }
.saved-page-output summary { cursor: pointer; color: #294a78; font-weight: 700; }
.page-bookmark-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.page-bookmark h4 { margin: 0; color: #27466f; font-size: 13px; }
.page-bookmark .page-summary { margin: 6px 0 9px; color: #586679; font-size: 11px; line-height: 1.6; }
.page-knowledge-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.page-knowledge-preview span { border-radius: 999px; padding: 3px 7px; background: #eef3fb; color: #587092; font-size: 9px; }
.page-original { max-height: 260px; margin: 9px 0 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; border: 1px solid #e0e7f1; border-radius: 8px; background: #f8fafc; color: #48566a; font: 10px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.memory-view { min-height: 420px; }
.memory-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.memory-head h2 { margin: 0; color: #213b60; font-size: 20px; }
.memory-head p { margin: 5px 0 0; color: #7a8799; font-size: 11px; }
.memory-head > span { color: #78879a; font-size: 11px; }
.analysis-memory-list { display: grid; gap: 9px; }
.analysis-memory-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 13px 14px; border: 1px solid #dfe7f2; border-radius: 11px; background: #fff; }
.analysis-memory-card h3 { margin: 0; color: #29466f; font-size: 14px; }
.analysis-memory-card p { margin: 5px 0 0; color: #7b8899; font-size: 10px; }
.memory-actions { display: flex; align-items: center; gap: 6px; }
.modal-open { overflow:hidden; }
.memory-modal { position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:18px; background:rgba(18,29,48,.56); backdrop-filter:blur(9px); }
.memory-modal-card { width:min(1080px,96vw); height:min(92vh,920px); overflow:auto; border:1px solid rgba(255,255,255,.72); border-radius:22px; background:#f6f8fc; box-shadow:0 32px 100px rgba(15,31,56,.36); }
.memory-modal-head { position:sticky; top:0; z-index:3; display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:20px 22px; border-bottom:1px solid #dce5f2; background:rgba(255,255,255,.96); backdrop-filter:blur(12px); }
.memory-modal-head span { color:#3970c8; font-size:10px; font-weight:850; letter-spacing:.12em; }
.memory-modal-head h2 { margin:3px 0 5px; color:#203b63; font-size:clamp(20px,3vw,30px); }
.memory-modal-head p { margin:0; color:#77869a; font-size:11px; }
.memory-modal-toolbar { display:grid; grid-template-columns:1fr auto auto auto; gap:8px; padding:16px 18px 8px; }
.memory-modal-toolbar input { min-height:42px; }
.memory-modal-question { display:grid; gap:9px; margin:8px 18px 12px; padding:14px; border:1px solid #d9e4f2; border-radius:13px; background:#fff; }
.memory-modal-question>div:first-child { display:grid; gap:3px; }
.memory-modal-question>div:first-child span { color:#78869a; font-size:10px; }
.memory-modal-question>div:nth-child(2) { display:grid; grid-template-columns:1fr auto; gap:8px; }
.memory-modal-question input { min-height:40px; }
.memory-answer { padding:11px 12px; border-left:3px solid #4777d7; border-radius:0 9px 9px 0; background:#eff5ff; color:#3c506d; font-size:12px; line-height:1.75; white-space:pre-wrap; }
.memory-modal-status { margin:14px 18px; padding:13px; border-radius:10px; background:#fff; color:#75849a; text-align:center; }
.memory-modal-results { display:grid; gap:10px; padding:0 18px 22px; }
.memory-result-card { padding:0; overflow:hidden; border-radius:14px; }
.memory-result-card>.page-card-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding:16px 18px; cursor:pointer; list-style:none; background:#fff; transition:background .18s ease; }
.memory-result-card>.page-card-summary::-webkit-details-marker { display:none; }
.memory-result-card>.page-card-summary:hover { background:#f8faff; }
.memory-result-card>.page-card-summary h3 { margin:0 0 5px; color:#29466d; font-size:16px; }
.memory-result-card>.page-card-summary p { display:-webkit-box; overflow:hidden; margin:0; -webkit-box-orient:vertical; -webkit-line-clamp:2; color:#68778a; font-size:12px; line-height:1.65; }
.memory-result-card .page-summary-meta { padding:6px 9px; border-radius:999px; background:#edf3ff; color:#496a9d; font-size:11px; white-space:nowrap; }
.memory-result-card[open]>.page-card-summary { border-bottom:1px solid #e7edf5; background:#f9fbff; }
.memory-result-card .page-card-body { padding:16px 18px 18px; }
.memory-result-card .page-card-body>.slide-title-row { justify-content:flex-end; flex-wrap:wrap; margin-bottom:14px; }
.memory-result-card .slide-title-row button,.memory-result-card .knowledge-actions button { min-height:32px; padding:7px 10px; }
.memory-result-card .page-overview-title { display:block; margin-bottom:6px; color:#38527a; font-size:12px; }
.memory-result-card .page-overview { padding:12px 14px; border-radius:10px; background:#f7f9fc; }
.memory-result-card .page-section-fold { margin-top:12px; overflow:hidden; border:1px solid #e1e8f1; border-radius:11px; background:#fff; }
.memory-result-card .page-section-fold>summary { padding:11px 13px; cursor:pointer; color:#35527b; font-size:13px; font-weight:700; background:#f8fafc; }
.memory-result-card .page-section-fold[open]>summary { border-bottom:1px solid #e7edf5; }
.memory-result-card .page-section-fold .point-section { margin:0; padding:12px 14px; border:0; }
.memory-result-card .source-compare { white-space:pre-wrap; overflow-wrap:anywhere; max-height:290px; overflow:auto; padding:11px; border:1px solid #d9e4f5; border-radius:9px; background:#f8fbff; color:#34445c; font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; }
.memory-result-card .page-exercise { margin-top:10px; padding:10px; border-left:3px solid #5875c9; border-radius:8px; background:#f5f8ff; color:#29394e; }
.memory-result-card .page-exercise details+details { margin-top:8px; }
.memory-result-card .page-exercise summary { cursor:pointer; font-weight:700; }
.question-module-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; }
.question-module-head strong { color:#25446f; font-size:.95rem; }
.question-refresh-button { flex:0 0 auto; border:1px solid #b9cae7; border-radius:9px; background:#fff; color:#315c98; padding:7px 11px; font-weight:700; cursor:pointer; }
.question-refresh-button:hover:not(:disabled) { border-color:#5875c9; background:#edf3ff; }
.question-refresh-button:disabled { cursor:wait; opacity:.6; }
.question-module-status { margin:0; color:#66758b; }
.question-head-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.memory-result-card .translation-panel { display:grid; gap:9px; margin-top:12px; padding:12px; border:1px solid #cbdcf6; border-radius:12px; background:#f7faff; }
.memory-result-card .translation-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#274b81; }
.memory-result-card .translation-pair { display:grid; grid-template-columns:1fr 1fr; gap:0; overflow:hidden; border:1px solid #dce6f3; border-radius:10px; background:#fff; }
.memory-result-card .translation-pair>div { min-width:0; max-height:520px; overflow:auto; padding:11px 12px; }
.memory-result-card .translation-pair>div+div { border-left:1px solid #dce6f3; background:#f8fbff; }
.memory-result-card .translation-pair b { color:#3e6090; font-size:11px; }
.memory-result-card .translation-pair p { margin:5px 0 0; color:#344054; font-size:13px; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; }
.page-explanation-content { margin-top:10px; white-space:pre-wrap; line-height:1.82; color:#233f68; background:#f7faff; border:1px solid #dce6f3; border-radius:12px; padding:14px 16px; overflow-wrap:anywhere; }
.memory-result-card .memory-page-favorite.active { border-color:#e0b957; background:#fff8dd; color:#8a6510; }
.memory-folder-chooser { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:18px; background:rgba(18,29,48,.48); backdrop-filter:blur(5px); }
.memory-folder-card { width:min(470px,100%); padding:18px; border:1px solid #dbe5f3; border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(20,37,62,.24); }
.memory-folder-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.memory-folder-head span { color:#3970c8; font-size:10px; font-weight:800; letter-spacing:.08em; }
.memory-folder-head h3 { margin:3px 0 0; color:#27466f; }
.memory-folder-card>p { margin:10px 0 0; color:#75849a; font-size:11px; }
.memory-folder-list { display:grid; gap:7px; margin-top:13px; }
.memory-folder-choice { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:42px; padding:9px 11px; border:1px solid #dbe4f1; border-radius:10px; background:#f9fbfe; color:#35527b; text-align:left; }
.memory-folder-choice.active { border-color:#87a8e8; background:#edf3ff; color:#2859aa; font-weight:700; }
.memory-folder-choice small { color:#8491a3; font-weight:400; }

.collection-review-modal { position:fixed; inset:0; z-index:130; display:grid; place-items:center; padding:18px; background:rgba(18,29,48,.56); backdrop-filter:blur(8px); }
.collection-review-modal.hidden { display:none !important; }
.collection-review-card { display:grid; grid-template-rows:auto auto auto minmax(0,1fr); width:min(1120px,100%); height:min(860px,calc(100dvh - 36px)); overflow:hidden; border:1px solid rgba(216,227,243,.96); border-radius:22px; background:#fff; box-shadow:0 30px 90px rgba(17,35,61,.3); }
.collection-review-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:20px 23px 14px; border-bottom:1px solid #e5ebf3; }
.collection-review-head span { color:#3970c8; font-size:11px; font-weight:800; letter-spacing:.06em; }
.collection-review-head h2 { margin:3px 0; color:#203d67; font-size:23px; }
.collection-review-head p { margin:0; color:#76869b; font-size:12px; }
.collection-review-progress { padding:13px 23px 7px; }
.collection-review-progress>div { display:flex; justify-content:space-between; gap:18px; color:#526b8c; font-size:13px; }
.collection-review-progress i { display:block; height:6px; margin-top:8px; overflow:hidden; border-radius:99px; background:#e8edf5; }
.collection-review-progress i b { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#3476df,#6847d9); transition:width .2s ease; }
.collection-review-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) repeat(3,auto); gap:8px; padding:8px 23px 14px; border-bottom:1px solid #e7edf5; }
.collection-review-toolbar input { min-width:0; }
.collection-review-toolbar button.active { border-color:#86a6e5; background:#edf3ff; color:#2859ae; }
.collection-review-content { min-height:0; overflow:auto; padding:15px 23px 24px; background:#f7f9fc; }
.collection-review-content section+section { margin-top:18px; }
.collection-review-content h3 { margin:0 0 9px; color:#526b8c; font-size:14px; }
.collection-review-entry-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.collection-review-group+.collection-review-group { margin-top:18px; }
.collection-review-item { display:grid; gap:10px; padding:12px 13px; border:1px solid #e2e9f2; border-radius:12px; background:#fff; color:#2f496d; transition:border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.collection-review-item.expanded { grid-column:1/-1; }
.collection-review-item:hover { border-color:#a9bfe5; box-shadow:0 7px 20px rgba(42,77,126,.07); }
.collection-review-item-heading { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:10px; }
.collection-review-item input { width:18px; height:18px; margin-top:2px; accent-color:#4773d8; cursor:pointer; }
.collection-review-item-toggle { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:10px; min-width:0; min-height:0; padding:0; border:0; background:transparent; color:inherit; text-align:left; white-space:normal; cursor:pointer; }
.collection-review-item-toggle:hover { background:transparent; }
.collection-review-item-toggle>span { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; min-width:0; }
.collection-review-item-toggle>span>.must-know-badge { grid-row:1; justify-self:end; }
.collection-review-item-toggle>span>strong { grid-row:1; }
.collection-review-item-toggle>span>small { grid-column:1/-1; }
.collection-review-chevron { display:block; width:9px; height:9px; margin:5px 4px 0 0; border-right:2px solid #7186a4; border-bottom:2px solid #7186a4; transform:rotate(45deg); transition:transform .18s ease; }
.collection-review-item.expanded .collection-review-chevron { transform:rotate(225deg); }
.collection-review-item strong { color:#294c7b; font-size:15px; line-height:1.5; overflow-wrap:anywhere; }
.collection-review-item-toggle small { display:block; color:#8190a3; font-size:11px; line-height:1.45; }
.collection-review-details { display:none; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 16px; margin-left:28px; padding-top:10px; border-top:1px solid #edf1f6; }
.collection-review-item.expanded .collection-review-details { display:grid; }
.collection-review-detail { min-width:0; }
.collection-review-detail.core,.collection-review-detail.context { grid-column:1/-1; }
.collection-review-detail.prerequisites,.collection-review-detail.steps,.collection-review-detail.pitfalls { grid-column:1/-1; }
.collection-review-detail b { display:block; margin-bottom:5px; color:#3f6498; font-size:11px; letter-spacing:.04em; }
.collection-review-detail ul { display:grid; gap:5px; margin:0; padding-left:18px; color:#5d6d81; font-size:13px; line-height:1.7; }
.collection-review-detail.core ul { color:#344f73; font-size:14px; }
.collection-review-detail.sections ul { display:flex; flex-wrap:wrap; gap:5px; padding:0; list-style:none; }
.collection-review-detail.sections li { padding:4px 9px; border-radius:999px; background:#eef3fb; color:#557096; font-size:11px; }
.collection-review-detail.material { grid-column:1/-1; min-width:0; padding:10px 11px; border:1px solid #cddbef; border-radius:10px; background:#f4f7fc; }
.collection-review-item.difficulty { border-color:#f0dfb8; background:#fffbf1; color:#755a1c; }
.collection-review-item.difficulty strong,.collection-review-item.difficulty .collection-review-detail b { color:#76591d; }
.collection-review-item.difficulty .collection-review-detail.sections li { background:#f8edcf; color:#7b642e; }
.collection-review-item.reviewed { background:#f8fafc; }
.collection-review-item.reviewed .collection-review-item-heading strong { color:#77869b; text-decoration:line-through; }
.collection-review-empty { margin:18px 23px; padding:22px; border:1px dashed #cbd7e7; border-radius:12px; color:#718096; text-align:center; }

@media (max-width: 760px) {
  .library-shell { width: min(100% - 16px, 680px); padding-top: 12px; }
  .library-header { grid-template-columns: 1fr auto; gap: 10px; }
  .library-title { grid-row: 1; grid-column: 1 / -1; justify-content: flex-start; }
  .back-link { grid-row: 2; }
  .library-header .header-controls { grid-row: 2; grid-column: 2; gap: 6px; }
  .account-mini { grid-row: 2; }
  .library-layout { grid-template-columns: 1fr; }
  .collection-tabs { position: sticky; top: 102px; z-index: 3; }
  .space-sidebar { position: static; padding: 10px; }
  .space-list { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .space-item { flex: 0 0 auto; width: auto; min-width: 115px; }
  .space-content { padding: 13px; }
  .space-head { align-items: stretch; flex-direction: column; }
  .space-manage button { flex: 1; min-height: 36px; }
  .collection-actions { grid-template-columns: 1fr; }
  .knowledge-row { grid-template-columns: 1fr; }
  .document-question-form { grid-template-columns:1fr; }
  .document-question-answer { grid-column:1; }
  .page-bookmark-toggle { grid-template-columns: 1fr; gap: 6px; padding-right: 38px; }
  .page-bookmark-counts { white-space: normal; }
  .saved-page-actions > * { flex: 1 1 calc(50% - 7px); }
  .knowledge-controls { align-items: stretch; }
  .knowledge-controls select { flex: 1; max-width: none; min-height: 36px; }
  .remove-point { min-width: 52px; }
  .analysis-memory-card { grid-template-columns: 1fr; }
  .memory-actions button { flex: 1; min-height: 36px; }
  .memory-modal { place-items:end center; padding:7px; }
  .memory-modal-card { width:100%; height:96vh; border-radius:18px 18px 9px 9px; }
  .memory-modal-head { padding:15px; }
  .memory-modal-toolbar { grid-template-columns:repeat(3,minmax(0,1fr)); padding:12px 12px 6px; }
  .memory-modal-toolbar input { grid-column:1/-1; }
  .memory-modal-question { margin:7px 12px 10px; }
  .memory-modal-question>div:nth-child(2) { grid-template-columns:1fr; }
  .memory-modal-results { padding:0 12px 16px; }
  .memory-result-card>.page-card-summary { grid-template-columns:1fr; gap:9px; padding:14px; }
  .memory-result-card .page-summary-meta { justify-self:start; white-space:normal; }
  .memory-result-card .page-card-body { padding:13px; }
  .memory-result-card .page-card-body>.slide-title-row { flex-direction:row; }
  .memory-result-card .page-card-body>.slide-title-row button { flex:1 1 calc(50% - 6px); min-height:38px; }
  .memory-result-card .knowledge-actions button { flex:1 1 auto; min-height:38px; }
  .memory-result-card .translation-pair { grid-template-columns:1fr; }
  .memory-result-card .translation-pair>div { max-height:none; }
  .memory-result-card .translation-pair>div+div { border-top:1px solid #dce6f3; border-left:0; }
  .memory-folder-chooser { place-items:end center; padding:9px; }
  .memory-folder-card { max-height:calc(100vh - 18px); overflow-y:auto; border-radius:18px 18px 12px 12px; }
  .collection-review-modal { place-items:end center; padding:7px; }
  .collection-review-card { width:100%; height:calc(100dvh - 14px); border-radius:18px 18px 9px 9px; }
  .collection-review-head { padding:15px 14px 11px; }
  .collection-review-head h2 { font-size:19px; }
  .collection-review-progress { padding:11px 14px 6px; }
  .collection-review-progress>div { align-items:flex-start; flex-direction:column; gap:3px; }
  .collection-review-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); padding:8px 14px 11px; }
  .collection-review-toolbar input { grid-column:1/-1; }
  .collection-review-toolbar button { min-height:40px; padding-inline:8px; font-size:11px; }
  .collection-review-content { padding:10px 10px 18px; }
  .collection-review-entry-grid { grid-template-columns:1fr; }
  .collection-review-details { grid-template-columns:1fr; }
  .collection-review-detail.core,.collection-review-detail.context,.collection-review-detail.prerequisites,.collection-review-detail.steps,.collection-review-detail.pitfalls { grid-column:auto; }
}

/* 3.38 rich saved knowledge */
.knowledge-row .knowledge-detail-grid,.saved-page-points .knowledge-detail-grid { margin-top:9px; }
.knowledge-row > div:first-child { min-width:0; }
.saved-page-points article { border:1px solid #e1e8f2; }

/* 3.45 per-page learning guide inside analysis memory */
.learning-guide { margin-top:12px; overflow:hidden; border:1px solid #d9e5f5; border-radius:12px; background:linear-gradient(135deg,#f7faff,#fff); }
.learning-guide-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; border-bottom:1px solid #e2eaf5; }
.learning-guide-heading strong { color:#294f82; font-size:13px; }
.learning-guide-heading span { padding:4px 8px; border-radius:999px; background:#e8f0ff; color:#3d66a5; font-size:10px; font-weight:800; }
.learning-guide>.learning-guide-heading { cursor:pointer; list-style:none; border-bottom:0; }
.learning-guide>.learning-guide-heading::-webkit-details-marker { display:none; }
.learning-guide>.learning-guide-heading::after { content:"▸"; flex:none; color:#58739b; }
.learning-guide[open]>.learning-guide-heading { border-bottom:1px solid #e2eaf5; }
.learning-guide[open]>.learning-guide-heading::after { content:"▾"; }
.learning-guide>.learning-guide-heading:focus-visible { outline:2px solid #5276e8; outline-offset:-3px; }
.learning-guide-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:11px; }
.learning-guide-block { min-width:0; padding:10px 11px; border-radius:10px; background:#fff; box-shadow:inset 0 0 0 1px #e7edf5; }
.learning-guide-block b { display:block; margin-bottom:4px; color:#4b6d9d; font-size:10px; }
.learning-guide-block p,.learning-guide-block ol { margin:0; color:#3d4f68; font-size:12px; line-height:1.72; }
.learning-guide-block ol { padding-left:20px; }
.learning-guide-block.steps { grid-column:1/-1; }
.learning-guide-block.takeaway { background:#f2f7ff; }
.learning-guide-block.example { background:#f3faf7; }
.learning-guide-block.exercise { background:#fff8ee; }
.learning-guide-purpose { margin:11px 11px 0; padding:11px 13px; border:1px solid #d7e5f7; border-radius:10px; background:#eef5ff; }
.learning-guide-purpose b { display:block; margin-bottom:4px; color:#315c95; font-size:11px; }
.learning-guide-purpose p { margin:0; color:#3f5675; font-size:13px; line-height:1.7; }
.must-know-badge { display:inline-flex; align-items:center; width:max-content; padding:3px 8px; border-radius:999px; background:#fff1cf; color:#8b5b08; font-size:10px; font-style:normal; font-weight:800; line-height:1.4; white-space:nowrap; }
.knowledge-concept-card.must-know { border-color:#ead49a; background:linear-gradient(135deg,#fffdf7,#fff); }
.knowledge-concept-head { align-items:center; }

/* Incremental cross-document knowledge network */
.knowledge-network-view { min-height:520px; }
.network-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.network-head span { color:#3970c8; font-size:10px; font-weight:850; letter-spacing:.1em; }
.network-head h2 { margin:3px 0 5px; color:#203d67; font-size:24px; }
.network-head p { max-width:700px; margin:0; color:#748399; font-size:12px; line-height:1.65; }
.network-stats { margin:10px 0 8px; }
.network-summary-line { display:flex; flex-wrap:wrap; gap:6px 16px; padding:8px 11px; border:1px solid #e2e8f1; border-radius:10px; background:#f7f9fc; color:#748399; font-size:10px; }
.network-summary-line span { white-space:nowrap; }
.network-summary-line b { color:#315b91; font-size:12px; }
.network-stat { padding:12px 13px; border:1px solid #dfe7f2; border-radius:11px; background:linear-gradient(145deg,#f7faff,#fff); }
.network-stat strong { display:block; color:#264d80; font-size:21px; }
.network-stat span { color:#7b899b; font-size:10px; }
.network-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:7px; margin-bottom:8px; }
.network-toolbar input { min-height:36px; }
.network-toolbar>div { display:flex; gap:5px; padding:4px; border-radius:10px; background:#eef2f8; }
.network-toolbar button { min-height:34px; border:0; background:transparent; color:#6c7c91; font-size:11px; }
.network-toolbar button.active { background:#fff; color:#2c5fa9; box-shadow:0 2px 8px rgba(41,72,113,.1); }
.network-status { padding:28px; border:1px dashed #ccd8e8; border-radius:12px; color:#7a899d; text-align:center; }
.network-courses { display:grid; gap:7px; }
.network-course { overflow:hidden; border:1px solid #dce5f1; border-radius:11px; background:#fff; }
.network-course>summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 12px; cursor:pointer; list-style:none; background:linear-gradient(135deg,#f5f8fe,#fff); }
.network-course>summary::-webkit-details-marker { display:none; }
.network-course>summary h3 { margin:0; color:#26466f; font-size:14px; }
.network-course>summary p { margin:4px 0 0; color:#7b899b; font-size:10px; }
.network-course>summary>span { padding:5px 9px; border-radius:999px; background:#eaf1ff; color:#42689f; font-size:10px; white-space:nowrap; }
.network-course-body { display:grid; gap:8px; padding:9px; border-top:1px solid #e8edf4; }
.network-path { display:flex; align-items:center; gap:6px; overflow-x:auto; padding:2px 0 4px; }
.network-path-label { flex:none; color:#61748e; font-size:10px; font-weight:800; }
.network-document { flex:none; max-width:220px; overflow:hidden; padding:6px 9px; border:1px solid #d5dfed; border-radius:999px; background:#f8faff; color:#486382; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.network-path-arrow { flex:none; color:#9aa8b9; font-size:11px; }
.network-node-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.network-node { min-width:0; overflow:hidden; border:1px solid #e0e7f1; border-radius:12px; background:#fff; }
.network-node.must-know { border-color:#e6cf91; background:#fffefa; }
.network-node.placeholder { border-style:dashed; background:#fbfcfe; }
.network-node>summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:center; padding:12px 13px; cursor:pointer; list-style:none; }
.network-node>summary::-webkit-details-marker { display:none; }
.network-node-title { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }
.network-node-title strong { color:#294b78; font-size:13px; overflow-wrap:anywhere; }
.network-node-title em { padding:2px 6px; border-radius:999px; background:#fff1cf; color:#865b0e; font-size:9px; font-style:normal; font-weight:800; }
.network-node.placeholder .network-node-title em { background:#eef2f7; color:#6f7f92; }
.network-node-progress { display:grid; grid-template-columns:48px auto; align-items:center; gap:6px; color:#708198; font-size:9px; }
.network-node-progress i { display:block; width:48px; height:5px; overflow:hidden; border-radius:99px; background:#e5ebf3; }
.network-node-progress b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#3b78dc,#6850d8); }
.network-node-body { display:grid; gap:10px; padding:0 13px 13px; border-top:1px solid #edf1f6; }
.network-node-section { padding-top:10px; }
.network-node-section b { display:block; margin-bottom:4px; color:#4c6d99; font-size:10px; }
.network-node-section p { margin:0; color:#43536a; font-size:12px; line-height:1.7; white-space:pre-wrap; }
.network-relations,.network-sources { display:flex; flex-wrap:wrap; gap:5px; }
.network-relation,.network-source { min-height:29px; padding:5px 8px; border:1px solid #d6e0ee; border-radius:8px; background:#f7f9fd; color:#46658d; font-size:10px; }
.network-relation:is(button) { cursor:pointer; text-align:left; }
.network-relation:is(button):hover { border-color:#819dca; background:#eaf2ff; }
.network-source:hover { border-color:#8ca9d8; background:#edf4ff; }
.network-course-empty { margin:0; padding:18px; color:#8491a2; text-align:center; }
.mindmap-shell { position:relative; min-width:0; }
.mindmap-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.mindmap-hint { margin:0 0 5px 2px; color:#7d8b9e; font-size:9px; line-height:1.4; }
.knowledge-route-overview { display:grid; gap:5px; margin:0 0 7px; padding:8px 10px; border:1px solid #dce5f1; border-radius:10px; background:#f7f9fd; }
.knowledge-route-overview>b { color:#4c668b; font-size:9px; letter-spacing:.04em; }
.knowledge-route-steps { position:relative; display:flex; align-items:flex-start; gap:3px; min-width:0; }
.knowledge-route-steps::before { content:""; position:absolute; top:10px; right:4%; left:4%; height:2px; background:linear-gradient(90deg,#26966f 0 48%,#5b67d6 52% 100%); }
.knowledge-route-step { position:relative; z-index:1; display:grid; flex:1 1 0; min-width:0; justify-items:center; gap:3px; padding:0 2px; border:0; background:transparent; color:#536882; }
.knowledge-route-step span { display:grid; place-items:center; width:21px; height:21px; border:2px solid #fff; border-radius:50%; background:#6e89ae; color:#fff; box-shadow:0 0 0 1px #9eb0c8; font-size:7px; font-weight:850; }
.knowledge-route-step strong { display:-webkit-box; max-width:100%; overflow:hidden; color:#526780; font-size:7px; font-weight:750; line-height:1.25; text-align:center; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.knowledge-route-step.current span { background:#5a60d4; box-shadow:0 0 0 2px #c9cdfa; }
.knowledge-route-step.current strong { color:#343f9b; }
.knowledge-route-step:hover strong { color:#24599e; }
.knowledge-route-branches { margin-top:2px; border-top:1px solid #e1e7f0; padding-top:6px; }
.knowledge-route-branches>summary { color:#58708f; font-size:9px; font-weight:800; cursor:pointer; }
.knowledge-route-branches>div { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.knowledge-route-branches button { min-height:25px; padding:4px 7px; border:1px solid #d3deec; border-radius:7px; background:#fff; color:#506b8e; font-size:8px; text-align:left; }
.knowledge-route-branches button:hover { border-color:#8ea8cd; background:#edf4ff; }
.mindmap-tools { position:absolute; top:8px; right:8px; z-index:6; display:flex; align-items:center; gap:2px; flex:none; padding:3px; border:1px solid #dae3ef; border-radius:8px; background:rgba(255,255,255,.94); box-shadow:0 3px 12px rgba(34,60,96,.08); }
.mindmap-tools button { min-width:27px; min-height:26px; padding:4px 6px; border:0; border-radius:6px; background:transparent; color:#476589; font-size:9px; }
.mindmap-tools button:hover { background:#edf3fc; }
.mindmap-tools span { min-width:42px; color:#687b94; font-size:9px; text-align:center; }
.mindmap-viewport { position:relative; height:370px; overflow:auto; border:1px solid #d9e3f0; border-radius:10px; background-color:#f9fbfe; background-image:radial-gradient(#ccd8e8 1px,transparent 1px); background-size:18px 18px; cursor:grab; overscroll-behavior:contain; }
.mindmap-viewport.dragging { cursor:grabbing; user-select:none; }
.mindmap-stage { position:relative; display:grid; grid-template-columns:166px minmax(560px,1fr); align-items:center; min-width:820px; min-height:100%; padding:24px 32px; transform-origin:left center; }
.mindmap-connections { position:absolute; inset:0; z-index:0; overflow:visible; pointer-events:none; }
.mindmap-connections path { fill:none; stroke-width:2.5; stroke-linecap:round; opacity:.72; }
.mindmap-connections path.relation-before { stroke:#2a9d76; }
.mindmap-connections path.relation-after { stroke:#7b61d7; }
.mindmap-root { position:relative; z-index:2; display:grid; gap:3px; width:148px; padding:11px 12px; border:2px solid #4d73d8; border-radius:13px; background:linear-gradient(135deg,#376fe0,#704bd8); color:#fff; box-shadow:0 10px 24px rgba(58,84,174,.2); }
.mindmap-root::after { content:""; position:absolute; top:50%; left:100%; width:45px; height:2px; background:#6f8fd0; }
.mindmap-root small { opacity:.78; font-size:9px; font-weight:800; letter-spacing:.08em; }
.mindmap-root strong { font-size:13px; overflow-wrap:anywhere; }
.mindmap-root span { opacity:.86; font-size:9px; }
.mindmap-branches { position:relative; z-index:1; display:grid; gap:8px; padding-left:40px; }
.mindmap-branches::before { content:""; position:absolute; top:24px; bottom:24px; left:22px; width:2px; border-radius:9px; background:#91a8d2; }
.mindmap-branch { --branch-color:hsl(var(--branch-hue) 56% 53%); position:relative; display:grid; grid-template-columns:205px minmax(260px,1fr); align-items:center; gap:30px; min-height:45px; }
.mindmap-branch::before { content:""; position:absolute; top:26px; left:-23px; width:45px; height:2px; background:var(--branch-color); }
.mindmap-lesson { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; min-height:42px; padding:7px 9px; border:2px solid color-mix(in srgb,var(--branch-color) 70%,white); border-radius:10px; background:#fff; cursor:pointer; list-style:none; box-shadow:0 4px 12px rgba(37,65,104,.07); }
.mindmap-lesson::-webkit-details-marker { display:none; }
.mindmap-lesson::after { content:""; position:absolute; top:50%; left:100%; width:38px; height:2px; background:var(--branch-color); }
.mindmap-lesson span { display:grid; min-width:0; }
.mindmap-lesson strong { overflow:hidden; color:#304f75; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.mindmap-lesson small { margin-top:2px; color:#8491a2; font-size:8px; }
.mindmap-lesson i { width:7px; height:7px; border-right:2px solid #71849d; border-bottom:2px solid #71849d; rotate:45deg; transition:rotate .18s ease; }
.mindmap-branch:not([open]) .mindmap-lesson::after { display:none; }
.mindmap-branch:not([open]) .mindmap-lesson i { rotate:-45deg; }
.mindmap-leaves { position:relative; display:grid; gap:5px; padding-left:16px; border-left:2px solid color-mix(in srgb,var(--branch-color) 54%,white); }
.mindmap-leaf { position:relative; display:grid; gap:1px; width:min(290px,100%); min-height:36px; padding:6px 8px; border:1px solid #d9e2ee; border-left:3px solid var(--branch-color); border-radius:8px; background:#fff; color:#354f71; text-align:left; white-space:normal; box-shadow:0 2px 8px rgba(38,65,103,.04); }
.mindmap-leaf::before { content:""; position:absolute; top:50%; right:100%; width:20px; height:2px; background:color-mix(in srgb,var(--branch-color) 54%,white); }
.mindmap-leaf:hover,.mindmap-leaf.active { border-color:var(--branch-color); background:color-mix(in srgb,var(--branch-color) 8%,white); box-shadow:0 6px 18px color-mix(in srgb,var(--branch-color) 15%,transparent); }
.mindmap-leaf.related { box-shadow:0 0 0 2px #fff,0 0 0 4px #8aa0c6; }
.mindmap-leaf.relation-before { box-shadow:0 0 0 2px #fff,0 0 0 4px #2a9d76; }
.mindmap-leaf.relation-after { box-shadow:0 0 0 2px #fff,0 0 0 4px #7b61d7; }
.mindmap-leaf>span { display:flex; align-items:center; gap:6px; }
.mindmap-leaf strong { font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.mindmap-leaf small { color:#8491a2; font-size:8px; }
.mindmap-leaf em { flex:none; padding:1px 5px; border-radius:999px; background:#fff0c9; color:#8a5c0e; font-size:7px; font-style:normal; font-weight:800; }
.mindmap-leaf.placeholder { border-style:dashed; border-left-style:dashed; background:#fafbfd; }
.mindmap-leaf.mindmap-extra { display:none; }
.mindmap-leaves.show-all .mindmap-leaf.mindmap-extra { display:grid; }
.mindmap-more { width:min(290px,100%); min-height:30px; padding:5px 8px; border:1px dashed #cbd7e6; border-radius:8px; background:#f4f7fb; color:#58708f; font-size:9px; text-align:center; }
.mindmap-more:hover { border-color:#93a9c6; background:#edf3fa; }
.mindmap-inspector { position:absolute; top:28px; right:12px; z-index:12; width:min(430px,calc(100% - 24px)); max-height:330px; overflow:auto; margin:0; padding:9px; border:1px solid #cedaea; border-radius:11px; background:#f8faff; box-shadow:0 16px 40px rgba(33,55,88,.2); }
.mindmap-inspector-head { position:sticky; top:-9px; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:-9px -9px 8px; padding:8px 10px; border-bottom:1px solid #dde5f0; background:#f8faff; color:#526d91; font-size:10px; }
.mindmap-inspector-head button { width:27px; height:27px; padding:0; border:0; border-radius:7px; background:#e9eff7; color:#55708f; font-size:18px; line-height:1; }
.mindmap-inspector-label { margin:0 0 7px; color:#607796; font-size:9px; font-weight:850; letter-spacing:.08em; }
.mindmap-selected-node { background:#fff; }
.mindmap-selected-node>summary { cursor:default; }
.mindmap-shell:fullscreen { padding:18px; overflow:auto; background:#f4f7fb; }
.mindmap-shell:fullscreen .mindmap-viewport { height:calc(100vh - 190px); }
.knowledge-graph-viewport { height:400px; }
.knowledge-graph-stage { position:relative; display:block; padding:0; }
.knowledge-graph-edges { position:absolute; inset:0; z-index:0; overflow:visible; pointer-events:none; }
.knowledge-graph-edges path { fill:none; stroke:#a8b5c7; stroke-width:1.45; stroke-linecap:round; opacity:.48; }
.knowledge-graph-edges path.relation-before { stroke:#26966f; stroke-width:2.5; opacity:.9; }
.knowledge-graph-edges path.relation-after { stroke:#735bd2; stroke-width:2.5; opacity:.9; }
.knowledge-graph-edges marker path { fill:#8294ad; stroke:none; opacity:1; }
.knowledge-graph-nodes { position:absolute; inset:0; z-index:1; }
.knowledge-graph-column-label { position:absolute; top:7px; width:190px; color:#647892; font-size:9px; font-weight:800; text-align:center; }
.knowledge-graph-node { position:absolute; display:grid; gap:3px; width:190px; min-height:48px; padding:8px 10px; border:1px solid #ccd8e7; border-radius:10px; background:#fff; color:#304f75; text-align:left; white-space:normal; box-shadow:0 4px 13px rgba(38,65,103,.08); }
.knowledge-graph-node:hover { border-color:#7895c2; background:#f4f8ff; }
.knowledge-graph-node strong { font-size:10px; line-height:1.35; overflow-wrap:anywhere; }
.knowledge-graph-node span { color:#8290a3; font-size:8px; }
.knowledge-graph-node.must-know { border-left:4px solid #e5ab3f; }
.knowledge-graph-node.placeholder { border-style:dashed; background:#fafbfd; }
.knowledge-graph-node.route-branch { border-style:dashed; background:#f8fbff; }
.knowledge-graph-node.route-branch.incoming { border-color:#72bba4; }
.knowledge-graph-node.route-branch.outgoing { border-color:#9788d9; }
.knowledge-graph-node.active { border:2px solid #5a69d7; background:#eef1ff; box-shadow:0 0 0 4px rgba(90,105,215,.13),0 8px 22px rgba(48,64,140,.18); }
.knowledge-graph-node.expanded { z-index:3; display:block; width:290px; height:220px; overflow:auto; padding:12px 13px; cursor:default; }
.knowledge-graph-node.expanded>strong { display:block; padding-right:4px; font-size:12px; }
.knowledge-graph-node.expanded>span { display:block; margin-top:3px; }
.knowledge-graph-expanded-content { display:grid; gap:8px; margin-top:9px; padding-top:9px; border-top:1px solid #dce4f1; }
.knowledge-graph-expanded-content section b { display:block; margin-bottom:3px; color:#4b6790; font-size:9px; }
.knowledge-graph-expanded-content section p { margin:0; color:#3e506a; font-size:10px; line-height:1.55; }
.knowledge-graph-expanded-actions { position:sticky; bottom:-12px; display:flex; gap:6px; padding:7px 0 2px; background:#eef1ff; }
.knowledge-graph-expanded-actions button { min-height:28px; padding:4px 8px; border:1px solid #c7d4e7; border-radius:7px; background:#fff; color:#46658d; font-size:9px; }
@media (max-width: 760px) {
  .learning-guide-grid { grid-template-columns:1fr; }
  .learning-guide-block.steps { grid-column:auto; }
  .collection-tabs { grid-template-columns:repeat(2,1fr); }
  .network-head { flex-direction:column; }
  .network-head button { width:100%; }
  .network-summary-line { gap:5px 10px; }
  .network-toolbar { grid-template-columns:1fr; }
  .network-toolbar>div { display:grid; grid-template-columns:repeat(3,1fr); }
  .network-node-grid { grid-template-columns:1fr; }
  .network-course>summary { grid-template-columns:1fr; }
  .network-course>summary>span { justify-self:start; }
  .mindmap-head { align-items:flex-start; flex-direction:column; }
  .mindmap-tools { max-width:calc(100% - 16px); overflow-x:auto; }
  .mindmap-hint { font-size:9px; }
  .mindmap-viewport { height:350px; }
  .mindmap-stage { grid-template-columns:155px minmax(590px,1fr); min-width:790px; padding:25px 28px; }
  .mindmap-root { width:138px; padding:11px; }
  .mindmap-branch { grid-template-columns:190px minmax(250px,1fr); gap:30px; }
  .mindmap-lesson::after { width:32px; }
  .mindmap-inspector { position:fixed; top:auto; right:8px; bottom:8px; left:8px; width:auto; max-height:68dvh; z-index:160; }
  .knowledge-graph-viewport { height:360px; }
}
