/* A connected hierarchy: root → grade → term → chapter → section. */
#curriculum-tree-dialog{width:min(1440px,calc(100vw - 28px));max-width:1440px}
#curriculum-tree-dialog .tree-tools{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin:0 0 20px}
#curriculum-tree-dialog .tree-tools .button{font-size:13px;min-height:44px}
.curriculum-tree-canvas{padding:8px 8px 20px;min-width:0}
.curriculum-tree-canvas>.tree-root{display:flex;position:relative;flex-direction:column;align-items:center;gap:5px;text-align:center;max-width:360px;margin:0 auto 28px;padding:20px;border:2px solid #aa86c3;background:#eee3f7;border-radius:14px}
.curriculum-tree-canvas>.tree-root>b{font:30px/1.2 Georgia,serif;color:#644078}
.curriculum-tree-canvas>.tree-root>span{font-size:15px;font-weight:600;letter-spacing:.12em;color:#644078}
.curriculum-tree-canvas>.tree-root::after{content:'';position:absolute;left:50%;top:100%;height:30px;border-left:2px solid #b59bc8}
.math-tree-branches{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;list-style:none;margin:0;padding:28px 0 0}
.math-tree-branches::before{content:'';position:absolute;top:0;left:calc((100% - 48px)/6);right:calc((100% - 48px)/6);border-top:2px solid #b59bc8}
.math-tree-grade-branch{position:relative;min-width:0}
.math-tree-grade-branch::before{content:'';position:absolute;left:50%;top:-28px;height:28px;border-left:2px solid #b59bc8}
.map-node{display:flex;align-items:center;gap:9px;position:relative;min-height:48px;list-style:none;cursor:pointer;line-height:1.6;border:1px solid #d8c4e5;border-radius:10px;background:white;color:#654779;padding:10px 12px;font-size:14px}
.map-node::-webkit-details-marker{display:none}
.map-node>svg{width:20px;height:20px;flex:none;margin-left:auto;color:#856297}
.map-node:focus-visible,.map-leaf:focus-visible{outline:3px solid #9a74b1;outline-offset:3px}
details[open]>.map-node .map-plus{display:none}
.map-grade-node{background:#eee2f7;border-color:#bba0ce;padding:15px}
.map-grade-node .map-level{font:13px ui-monospace,Consolas,monospace;color:#8d6aa2;border:1px solid #c7b0d7;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;flex:none}
.map-grade-node b{font-size:20px;display:block}.map-grade-node small{font-size:12px;display:block;color:#836992;margin-top:2px}
.map-term-node{background:#f7f1fb;border-color:#d7c4e4}.map-term-node b{font-size:14px}.map-term-node small{font-size:11px;color:#8b7697;margin-left:auto}.map-term-node>svg{margin-left:0}
.map-unit-node{font-weight:500;font-size:13px;gap:7px;border-radius:8px;padding:10px}.map-unit-node>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.map-chapter-no{font:12px ui-monospace,Consolas,monospace;flex:none;color:#9b7fae}
.map-children{list-style:none;margin:0;padding:10px 0 0 13px}
.map-children>li{position:relative;padding:0 0 12px 14px;min-width:0}
.map-children>li::before{content:'';position:absolute;left:0;top:-10px;bottom:0;border-left:2px solid #c8b1d8}
.map-children>li::after{content:'';position:absolute;left:0;top:23px;width:14px;border-top:2px solid #c8b1d8}
.map-children>li:last-child::before{bottom:auto;height:34px}
.map-children>li:last-child{padding-bottom:0}
.map-leaves{padding-left:10px}.map-leaves>li{padding-left:12px;padding-bottom:6px}.map-leaves>li::after{width:12px}.map-leaves>li::before{top:-10px}.map-leaf{width:100%;min-height:46px;display:flex;gap:8px;align-items:baseline;text-align:left;background:#f6f2fa;border:1px solid #e3d7eb;border-radius:7px;color:#735487;padding:10px;font-size:13px;line-height:1.7}.map-leaf>b{font:11px ui-monospace,Consolas,monospace;color:#9777a8;flex:none}.map-leaf>span{min-width:0;overflow-wrap:anywhere}.map-leaf:hover{background:#e9ddf3;border-color:#bda1d0;color:#57386b}
#student-registry-dialog .roster-list-head{align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
#student-registry-dialog .roster-list-head h3{margin:0 auto 0 0}
#roster-data-tools.roster-data-tools{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:10px 14px;border:1px solid #b496c9;border-radius:10px;background:#eee2f7;color:#63427b;font-size:14px;font-weight:600;box-shadow:0 2px 7px #68457b0c}
#roster-data-tools.roster-data-tools:hover{background:#e4d4ef;border-color:#9571ae}
#roster-data-tools svg{width:23px;height:23px;flex:none;stroke-width:1.9}
#roster-data-tools:focus-visible{outline:3px solid #9a74b1;outline-offset:3px}
.student-password-locked{padding:13px 16px;border:1px solid #ddd0e6;background:#f5effa;border-radius:9px}
@media(max-width:1050px){.math-tree-branches{display:block;padding:0 0 0 20px;margin-left:16px}.math-tree-branches::before{left:0;right:auto;top:0;bottom:25px;border-top:0;border-left:2px solid #b59bc8}.math-tree-grade-branch{padding:0 0 22px}.math-tree-grade-branch::before{left:-20px;top:32px;width:20px;height:0;border-left:0;border-top:2px solid #b59bc8}.math-tree-grade-branch:last-child{padding-bottom:0}.math-tree-grade-branch:last-child::after{content:'';position:absolute;left:-21px;top:34px;bottom:0;width:3px;background:#fbf9fd}.curriculum-tree-canvas>.tree-root{margin-left:16px;margin-right:0;margin-bottom:24px;max-width:none;align-items:flex-start;text-align:left}.curriculum-tree-canvas>.tree-root::after{left:0;height:26px}.map-semesters{padding-left:18px}.map-chapters{padding-left:18px}.map-node{font-size:14px}.map-unit-node{font-size:14px}.map-leaf{font-size:14px}.map-leaves{padding-left:14px}}
@media(max-width:520px){.curriculum-tree-canvas{padding-left:0;padding-right:0}.math-tree-branches{margin-left:6px;padding-left:14px}.math-tree-grade-branch::before{left:-14px;width:14px}.math-tree-grade-branch:last-child::after{left:-15px}.curriculum-tree-canvas>.tree-root{margin-left:6px;padding:17px}.map-children{padding-left:8px}.map-children>li{padding-left:11px}.map-children>li::after{width:11px}.map-node{padding:10px 9px;gap:6px}.map-grade-node{padding:13px}.map-grade-node small{font-size:11px}.map-leaf{padding:10px 8px;gap:6px}}
