#bnwLibraryModal .bnw-library-modal{height:min(760px,calc(100dvh - 96px));max-height:min(760px,calc(100dvh - 96px));overflow:hidden;display:flex;flex-direction:column}
#bnwLibraryModal .bnw-library-head{flex:0 0 auto}
#bnwLibraryModal .bnw-library-tabs{display:flex;gap:8px;padding:14px 24px 14px;border-bottom:1px solid #e7eeee;flex:0 0 auto;position:relative;z-index:6;overflow:visible!important}
#bnwLibraryModal .bnw-library-tab{appearance:none;position:relative;border:1px solid #dbe7e8;background:#f7fbfb;color:#5b7078;border-radius:999px;padding:9px 15px;font:inherit;font-size:13px;font-weight:800;cursor:pointer;transition:.18s ease}
#bnwLibraryModal .bnw-library-tab:hover{transform:translateY(-1px);border-color:#b9d5d2}
#bnwLibraryModal .bnw-library-tab[aria-selected="true"]{background:#0f766e;border-color:#0f766e;color:#fff;box-shadow:0 7px 18px rgba(15,118,110,.18)}
#bnwLibraryModal .bnw-library-panels{min-height:0;flex:1 1 auto;overflow:hidden}
#bnwLibraryModal .bnw-library-panel{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;padding:20px 24px 24px}
#bnwLibraryModal .bnw-library-panel[hidden]{display:none!important}
#bnwLibraryModal .bnw-library-grid{padding:0!important}
#bnwLibraryModal #bnwMemberAttendancePanel{min-height:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
@media(min-width:701px){
  #bnwLibraryModal .bnw-library-panels{display:flex;flex-direction:column;min-height:0;overflow:hidden!important}
  #bnwLibraryModal #bnwLibraryContentPanel{flex:1 1 auto;height:auto!important;max-height:100%;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y}
  #bnwLibraryModal #bnwLibraryContentPanel .bnw-library-grid{overflow:visible!important;max-height:none!important;min-height:min-content}
  #bnwLibraryModal #bnwMemberAttendancePanel{flex:1 1 auto;height:auto!important;max-height:100%;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y}
  #bnwLibraryModal #bnwMemberAttendancePanel .bnw-member-attendance{min-height:min-content}
}
#bnwLibraryModal .bnw-profile-wrap{max-width:760px;margin:0 auto}
#bnwLibraryModal .bnw-profile-intro{display:flex;align-items:center;gap:12px;padding:14px 16px;margin-bottom:16px;border:1px solid #e2eded;border-radius:18px;background:#f8fbfb}
#bnwLibraryModal .bnw-profile-photos{display:flex;align-items:center;flex:0 0 auto}
#bnwLibraryModal .bnw-profile-photo-slot{position:relative;width:50px;height:50px;flex:0 0 auto}
#bnwLibraryModal .bnw-profile-photo-slot-personnel{margin-left:-10px}
#bnwLibraryModal .bnw-profile-photo-slot-personnel:before{content:'';position:absolute;inset:-3px;border-radius:50%;background:#f8fbfb;z-index:0}
#bnwLibraryModal .bnw-profile-photo-slot-personnel>*{position:relative;z-index:1}
#bnwLibraryModal .bnw-profile-photo{width:50px;height:50px;border-radius:50%;object-fit:cover;background:#e8f3f2;flex:0 0 auto}
#bnwLibraryModal .bnw-profile-photo-fallback{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:#0f766e;color:#fff;font-size:10px;font-weight:900;flex:0 0 auto}
#bnwLibraryModal .bnw-profile-photo-slot .bnw-profile-photo-fallback{display:none!important}
#bnwLibraryModal .bnw-profile-photo-fallback-personnel{background:#e8f3f2;color:#48646c;border:1px solid #d8e7e7}
#bnwLibraryModal .bnw-profile-intro strong{display:block;color:#16323b;font-size:15px}
#bnwLibraryModal .bnw-profile-intro small{display:block;color:#768990;font-size:11px;margin-top:3px}
#bnwLibraryModal .bnw-profile-form{display:grid;gap:16px}
#bnwLibraryModal .bnw-profile-card{border:1px solid #e1ebec;border-radius:20px;background:#fff;padding:18px}
#bnwLibraryModal .bnw-profile-card h3{margin:0 0 12px;color:#16323b;font-size:16px}
#bnwLibraryModal .bnw-profile-type{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#bnwLibraryModal .bnw-profile-type label{cursor:pointer}
#bnwLibraryModal .bnw-profile-type input{position:absolute;opacity:0;pointer-events:none}
#bnwLibraryModal .bnw-profile-type span{display:grid;place-items:center;min-height:46px;padding:8px 10px;border:1px solid #dce8e9;border-radius:14px;background:#f8fbfb;color:#50666f;font-size:13px;font-weight:800;text-align:center;transition:.18s ease}
#bnwLibraryModal .bnw-profile-type input:checked+span{background:#e7f7f4;border-color:#78c8bc;color:#0b6b63;box-shadow:inset 0 0 0 1px #78c8bc}
#bnwLibraryModal .bnw-profile-fields{display:grid;gap:12px;margin-top:14px}
#bnwLibraryModal .bnw-profile-fields[hidden]{display:none!important}
#bnwLibraryModal .bnw-profile-field{display:grid;gap:6px;color:#5d7179;font-size:12px;font-weight:700}
#bnwLibraryModal .bnw-profile-field input{width:100%;min-height:46px;border:1px solid #dbe6e8;border-radius:13px;padding:10px 12px;background:#fff;color:#15313a;font:inherit;outline:none;box-sizing:border-box}
#bnwLibraryModal .bnw-profile-field input:focus{border-color:#5dbbae;box-shadow:0 0 0 3px rgba(20,184,166,.10)}
#bnwLibraryModal .bnw-profile-help{margin:7px 0 0;color:#829399;font-size:11px;line-height:1.55}
#bnwLibraryModal .bnw-student-list{display:grid;gap:9px}
#bnwLibraryModal .bnw-student-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
#bnwLibraryModal .bnw-student-entry{display:grid;gap:7px;min-width:0}
#bnwLibraryModal .bnw-student-row.is-verified .bnw-student-id{border-color:#9fd5c7;background:#fbfffd}
#bnwLibraryModal .bnw-student-verified{display:grid;gap:2px;padding:10px 12px;border:1px solid #bfe3d9;border-radius:12px;background:#f0fbf7}
#bnwLibraryModal .bnw-student-verified[hidden]{display:none!important}
#bnwLibraryModal .bnw-student-verified strong{color:#0b7468;font-size:13px;line-height:1.35}
#bnwLibraryModal .bnw-student-verified span{color:#627c7d;font-size:11px;line-height:1.35}
#bnwLibraryModal .bnw-student-remove{appearance:none;border:1px solid #eadfe1;background:#fff8f8;color:#a83a4a;border-radius:12px;min-height:44px;padding:0 12px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
#bnwLibraryModal .bnw-add-student{appearance:none;border:1px dashed #84c9bf;background:#f1fbf9;color:#0d756b;border-radius:13px;min-height:44px;padding:9px 13px;font:inherit;font-size:12px;font-weight:850;cursor:pointer}
#bnwLibraryModal .bnw-personnel-compact{display:grid;gap:12px;margin-top:14px}
#bnwLibraryModal .bnw-personnel-compact[hidden]{display:none!important}
#bnwLibraryModal .bnw-personnel-section{padding:13px 14px;border:1px solid #e0e9ea;border-radius:15px;background:linear-gradient(180deg,#fff,#f9fcfc)}
#bnwLibraryModal .bnw-personnel-section h4{margin:0 0 9px;padding-bottom:8px;border-bottom:1px solid #edf2f2;color:#0f766e;font-size:11px;font-weight:900;letter-spacing:.02em}
#bnwLibraryModal .bnw-personnel-section-grid{display:flex;flex-wrap:wrap;gap:8px}
#bnwLibraryModal .bnw-personnel-item{display:flex;align-items:baseline;gap:7px;min-width:0;max-width:100%;padding:8px 10px;border:1px solid #e4ebec;border-radius:11px;background:#fff;color:#536970;font-size:11px;line-height:1.45;box-shadow:0 1px 0 rgba(15,39,45,.02)}
#bnwLibraryModal .bnw-personnel-item b{color:#17363d;font-size:10px;font-weight:850;white-space:nowrap}
#bnwLibraryModal .bnw-personnel-item span{color:#586f76;overflow-wrap:anywhere}
#bnwLibraryModal .bnw-personnel-item.is-wide{flex:1 1 100%;align-items:flex-start}
#bnwLibraryModal .bnw-personnel-section:nth-of-type(1){background:linear-gradient(135deg,#f8fcfb,#fff)}
#bnwLibraryModal .bnw-personnel-section:nth-of-type(2){background:linear-gradient(135deg,#f9fbff,#fff)}
#bnwLibraryModal .bnw-personnel-section:nth-of-type(3),#bnwLibraryModal .bnw-personnel-section:nth-of-type(4){background:linear-gradient(135deg,#fffdf8,#fff)}
#bnwLibraryModal .bnw-personnel-section:nth-last-of-type(1){border-color:#cfe3df;background:linear-gradient(135deg,#f4fbf9,#fff)}
#bnwLibraryModal .bnw-personnel-map{margin-top:2px;padding:12px;border:1px solid #d7e6e5;border-radius:16px;background:linear-gradient(180deg,#fbfefd,#f5faf9);box-shadow:0 8px 22px rgba(27,71,75,.06)}
#bnwLibraryModal .bnw-personnel-map-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
#bnwLibraryModal .bnw-personnel-map-head>div{display:grid;gap:3px;min-width:0}
#bnwLibraryModal .bnw-personnel-map-head b{color:#16363c;font-size:12px;font-weight:900}
#bnwLibraryModal .bnw-personnel-map-head span{color:#6e8187;font-size:10px;line-height:1.45;overflow-wrap:anywhere}
#bnwLibraryModal .bnw-personnel-map-head a{flex:0 0 auto;text-decoration:none;border:1px solid #bcded8;border-radius:999px;padding:7px 10px;background:#fff;color:#0f766e;font-size:10px;font-weight:850;white-space:nowrap}
#bnwLibraryModal .bnw-personnel-map-frame{overflow:hidden;border:1px solid #dce8e7;border-radius:13px;background:#edf5f4}
#bnwLibraryModal .bnw-personnel-map-frame iframe{display:block;width:100%;height:240px;border:0}
#bnwLibraryModal .bnw-line-linked{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid #cfe9df;border-radius:16px;background:linear-gradient(135deg,#f1fcf7,#f8fffb)}
#bnwLibraryModal .bnw-line-linked.is-unlinked{border-color:#e1e8ea;background:#f8fafb}
#bnwLibraryModal .bnw-line-linked-icon{width:50px;height:50px;border-radius:15px;display:grid;place-items:center;overflow:hidden;background:#06c755;color:#fff;font-size:10px;font-weight:900;flex:0 0 auto}
#bnwLibraryModal .bnw-line-linked-icon img{width:100%;height:100%;object-fit:cover}
#bnwLibraryModal .bnw-line-linked-copy{min-width:0;display:grid;gap:2px}
#bnwLibraryModal .bnw-line-linked-label{font-size:10px;font-weight:800;color:#6f8585;letter-spacing:.02em}
#bnwLibraryModal .bnw-line-linked-copy strong{font-size:14px;color:#17373a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bnwLibraryModal .bnw-line-linked-copy small{font-size:10px;color:#7b9090;line-height:1.4}
#bnwLibraryModal .bnw-line-linked-badge{justify-self:end;border-radius:999px;padding:6px 9px;background:#def8e8;color:#087a3b;font-size:10px;font-weight:900;white-space:nowrap}
#bnwLibraryModal .bnw-line-linked.is-unlinked .bnw-line-linked-badge{background:#eef2f3;color:#738389}
#bnwLibraryModal .bnw-line-notify-box{margin-top:12px;padding:13px 14px;border:1px solid #dbeae6;border-radius:15px;background:#fbfefd;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;align-items:center}
#bnwLibraryModal .bnw-line-notify-box>div{display:grid;gap:3px}
#bnwLibraryModal .bnw-line-notify-box strong{font-size:13px;color:#17373a}
#bnwLibraryModal .bnw-line-notify-box small{font-size:10px;line-height:1.45;color:#76898d}
#bnwLibraryModal .bnw-line-notify-box.is-disabled{opacity:.65;background:#f8fafb}
#bnwLibraryModal .bnw-notify-switch{position:relative;width:48px;height:28px;display:block;cursor:pointer}
#bnwLibraryModal .bnw-notify-switch input{position:absolute;opacity:0;pointer-events:none}
#bnwLibraryModal .bnw-notify-switch span{position:absolute;inset:0;border-radius:999px;background:#cad6d8;transition:.18s ease}
#bnwLibraryModal .bnw-notify-switch span:after{content:'';position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(15,39,45,.18);transition:.18s ease}
#bnwLibraryModal .bnw-notify-switch input:checked+span{background:#06c755}
#bnwLibraryModal .bnw-notify-switch input:checked+span:after{transform:translateX(20px)}
#bnwLibraryModal .bnw-notify-switch input:disabled+span{cursor:not-allowed}
#bnwLibraryModal .bnw-line-friend-link{grid-column:1/-1;justify-self:start;text-decoration:none;border-radius:11px;padding:8px 11px;background:#06c755;color:#fff;font-size:11px;font-weight:850}
#bnwLibraryModal .bnw-line-contact-separator{display:flex;align-items:center;gap:10px;margin:17px 0 13px;color:#8a9a9f;font-size:10px;font-weight:800}
#bnwLibraryModal .bnw-line-contact-separator:before,#bnwLibraryModal .bnw-line-contact-separator:after{content:'';height:1px;background:#e5eded;flex:1}
#bnwLibraryModal .bnw-profile-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#bnwLibraryModal .bnw-profile-save{min-width:150px}
#bnwLibraryModal .bnw-profile-status{font-size:12px;color:#60747c;min-height:18px}
#bnwLibraryModal .bnw-profile-status.ok{color:#087f70}
#bnwLibraryModal .bnw-profile-status.bad{color:#b43f53}
@media(max-width:700px){#bnwLibraryModal .bnw-library-modal{height:min(92dvh,900px);max-height:92dvh}#bnwLibraryModal .bnw-library-tabs{padding:12px 14px 12px}#bnwLibraryModal .bnw-library-panel{padding:16px 14px max(34px,calc(20px + env(safe-area-inset-bottom)));scroll-padding-bottom:max(48px,calc(34px + env(safe-area-inset-bottom)))}#bnwLibraryModal .bnw-profile-wrap{padding-bottom:max(20px,env(safe-area-inset-bottom))}#bnwLibraryModal .bnw-profile-form{padding-bottom:max(18px,env(safe-area-inset-bottom))}#bnwLibraryModal .bnw-profile-actions{position:relative;z-index:2;padding-bottom:max(14px,env(safe-area-inset-bottom));margin-bottom:max(8px,env(safe-area-inset-bottom))}#bnwLibraryModal .bnw-profile-save{width:100%;min-height:52px}#bnwLibraryModal .bnw-profile-type{grid-template-columns:1fr}#bnwLibraryModal .bnw-profile-card{padding:15px;border-radius:17px}#bnwLibraryModal .bnw-personnel-compact{gap:10px}#bnwLibraryModal .bnw-personnel-section{padding:12px}#bnwLibraryModal .bnw-personnel-item{flex:1 1 calc(50% - 7px)}#bnwLibraryModal .bnw-personnel-item.is-wide{flex-basis:100%}#bnwLibraryModal .bnw-personnel-map{padding:10px}#bnwLibraryModal .bnw-personnel-map-head{display:grid;gap:8px}#bnwLibraryModal .bnw-personnel-map-head a{justify-self:start}#bnwLibraryModal .bnw-personnel-map-frame iframe{height:220px}#bnwLibraryModal .bnw-line-linked{grid-template-columns:auto minmax(0,1fr)}#bnwLibraryModal .bnw-line-linked-badge{grid-column:2;justify-self:start;margin-top:3px}}
@media(max-width:700px) and (display-mode:standalone){#bnwLibraryModal .bnw-library-modal{height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)));max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)))}#bnwLibraryModal .bnw-library-panel{padding-bottom:calc(44px + env(safe-area-inset-bottom));scroll-padding-bottom:calc(60px + env(safe-area-inset-bottom))}}
/* Parent student verification UI; no visual change from retry marker. */
#bnwLibraryModal .bnw-notification-unread-badge,#bnwLibraryModal .bnw-official-books-tab-badge{z-index:30!important;isolation:isolate}

/* BNW mobile account attendance: reserve bottom clearance for embedded app toolbars and iOS home indicator. */
@media(max-width:700px){
  #bnwLibraryModal:has(#bnwMemberAttendancePanel:not([hidden])) #bnwMemberAttendancePanel{
    scroll-padding-bottom:max(108px,calc(76px + env(safe-area-inset-bottom)))!important;
  }
  #bnwLibraryModal:has(#bnwMemberAttendancePanel:not([hidden])) #bnwMemberAttendancePanel .bnw-member-attendance{
    padding-bottom:max(108px,calc(76px + env(safe-area-inset-bottom)))!important;
  }
}
