.student-facebook-contact {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 600;
  width: 220px;
  max-width: calc(100vw - 100px);
  font: 13px/1.5 var(--font-sans, system-ui, sans-serif);
  color-scheme: light;
}
.sfc-card {
  overflow: hidden;
  border: 1px solid #b8d3ff;
  border-top: 3px solid #f5c85c;
  border-radius: 11px;
  background: #f5f9ff;
  box-shadow: 0 10px 35px #123d7a30, 0 2px 8px #123d7a14;
}
.sfc-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  list-style: none;
  cursor: pointer;
  background: #0866df;
  color: #fff;
}
.sfc-heading::-webkit-details-marker { display: none; }
.sfc-heading:hover { background: #075bc5; }
.sfc-facebook-icon { flex-shrink: 0; font-size: 20px; }
.sfc-heading-copy strong { color: #fff; font-size: 13px; line-height: 1.25; }
.sfc-toggle { display: grid; place-items: center; width: 22px; height: 22px; margin-left: auto; border-radius: 50%; background: #ffffff26; font-size: 9px; }
.sfc-card:not([open]) .sfc-toggle { transform: rotate(180deg); }
.sfc-body { padding: 9px; }
.sfc-body p { margin: 0 0 7px; color: #455571; font-size: 11px; line-height: 1.45; }
.sfc-body p strong { color: #174f99; }
.sfc-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #ccdfff;
  border-radius: 6px;
  background: #fff;
  color: #0958bd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.sfc-profile + .sfc-profile { margin-top: 5px; }
.sfc-profile i { font-size: 10px; }
.sfc-profile:hover { border-color: #0866df; background: #e7f0ff; color: #064797; }
.sfc-profile:focus-visible, .sfc-heading:focus-visible { outline: 3px solid #d5a323; outline-offset: -4px; }
/* Keep the last rows and form actions scrollable above the expanded card. */
body:has(.sfc-card[open]) #pageDashboard .d-main,
body:has(.sfc-card[open]) #pageLanding .l-results-content { padding-bottom: max(210px, calc(190px + env(safe-area-inset-bottom))) !important; }
body.theme-dark .sfc-card { border-color: #345d98; background: #192b45; box-shadow: 0 10px 35px #0005; }
body.theme-dark .sfc-body p { color: #d0dcf0; }
body.theme-dark .sfc-body p strong { color: #a9ccff; }
body.theme-dark .sfc-profile { border-color: #3d6091; background: #223c61; color: #e4efff; }
body.theme-dark .sfc-profile:hover { border-color: #a9ccff; background: #2d4e7a; color: #fff; }
@media (max-width: 600px) {
  .student-facebook-contact { left: max(12px, env(safe-area-inset-left)); bottom: max(15px, env(safe-area-inset-bottom)); width: 210px; max-width: calc(100vw - 94px); }
  .sfc-profile { min-height: 36px; }
}
@media (max-height: 450px) {
  .sfc-body { max-height: calc(100dvh - 110px); overflow-y: auto; }
}
@media print {
  .student-facebook-contact { display: none; }
  body:has(.sfc-card[open]) #pageDashboard .d-main,
  body:has(.sfc-card[open]) #pageLanding .l-results-content { padding-bottom: 48px !important; }
}
