:root {
  --nb-help-navy: #0b3557;
  --nb-help-teal: #0a9697;
  --nb-help-gold: #f4b942;
  --nb-help-paper: #fffdf8;
}

.nb-teacher-dock {
  position: fixed;
  z-index: 9800;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(11, 53, 87, .14);
  background: rgba(255, 253, 248, .96);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(11, 53, 87, .18);
  backdrop-filter: blur(12px);
}

.nb-teacher-dock button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  color: var(--nb-help-navy);
  border: 0;
  background: transparent;
  border-radius: 999px;
  font: 800 .78rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.nb-teacher-dock button:first-child {
  color: #fff;
  background: var(--nb-help-teal);
}

.nb-teacher-dock button:hover,
.nb-teacher-dock button:focus-visible {
  outline: 3px solid rgba(10, 150, 151, .18);
  outline-offset: 2px;
}

.nb-teacher-dock span {
  font-size: 1rem;
}

.nb-teacher-help {
  width: min(720px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden auto;
  color: var(--nb-help-navy);
  border: 0;
  background: var(--nb-help-paper);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(5, 38, 61, .34);
}

.nb-teacher-help::backdrop {
  background: rgba(5, 33, 52, .68);
  backdrop-filter: blur(5px);
}

.nb-help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 27px 21px;
  color: #fff;
  background: linear-gradient(135deg, #0b3557, #0b6270);
}

.nb-help-head small,
.nb-help-privacy small {
  display: block;
  color: #9be1db;
  font: 900 .68rem/1.2 system-ui, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.nb-help-head h2 {
  margin: 6px 0 0;
  color: #fff;
  font: 850 clamp(1.55rem, 4vw, 2.15rem)/1.06 system-ui, sans-serif;
  letter-spacing: -.035em;
}

.nb-help-close {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
  font: 600 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.nb-help-body {
  padding: 25px 27px 28px;
}

.nb-help-reassure {
  margin: 0 0 21px;
  color: #35566a;
  font: 550 1rem/1.58 system-ui, sans-serif;
}

.nb-help-reassure strong { color: var(--nb-help-navy); }

.nb-help-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: nb-help-step;
}

.nb-help-steps li {
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid #d4e3e5;
  background: #fff;
  border-radius: 15px;
  counter-increment: nb-help-step;
}

.nb-help-steps li::before {
  display: grid;
  width: 31px;
  height: 31px;
  margin-bottom: 11px;
  place-items: center;
  color: var(--nb-help-navy);
  background: #dff2f0;
  border-radius: 9px;
  content: counter(nb-help-step);
  font: 900 .76rem/1 system-ui, sans-serif;
}

.nb-help-steps strong,
.nb-help-steps span {
  display: block;
  font-family: system-ui, sans-serif;
}

.nb-help-steps strong { font-size: .87rem; }
.nb-help-steps span { margin-top: 5px; color: #587180; font-size: .74rem; line-height: 1.45; }

.nb-help-page-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px;
  margin-top: 14px;
  border: 1px solid #f0d489;
  background: #fff7df;
  border-radius: 16px;
}

.nb-help-page-action small,
.nb-help-page-action strong { display: block; font-family: system-ui, sans-serif; }
.nb-help-page-action small { color: #7d6121; font-size: .7rem; font-weight: 800; }
.nb-help-page-action strong { margin-top: 3px; font-size: .94rem; }

.nb-help-page-action button,
.nb-help-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  color: #fff;
  border: 0;
  background: var(--nb-help-navy);
  border-radius: 11px;
  font: 850 .75rem/1.2 system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.nb-help-privacy {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  padding: 17px;
  margin-top: 14px;
  color: #fff;
  background: #0b405b;
  border-radius: 16px;
}

.nb-help-privacy > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--nb-help-navy);
  background: #8fdad4;
  border-radius: 12px;
  font: 900 1rem/1 system-ui, sans-serif;
}

.nb-help-privacy p {
  margin: 5px 0 0;
  color: #e3f1f3;
  font: 500 .78rem/1.52 system-ui, sans-serif;
}

.nb-help-links {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.nb-help-links a:first-child { background: var(--nb-help-teal); }
.nb-help-links a:last-child { color: var(--nb-help-navy); border: 1px solid #cadcdf; background: #fff; }

.nb-help-toast {
  position: fixed;
  z-index: 9900;
  right: 24px;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  max-width: min(380px, calc(100% - 32px));
  padding: 13px 16px;
  color: #fff;
  background: var(--nb-help-navy);
  border-radius: 12px;
  box-shadow: 0 13px 35px rgba(7, 39, 61, .25);
  font: 700 .78rem/1.45 system-ui, sans-serif;
}

@media (max-width: 680px) {
  .nb-teacher-dock { right: 10px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .nb-help-toast { right: 10px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .nb-teacher-dock button { min-height: 40px; padding: 8px 11px; }
  .nb-teacher-dock button:last-child { width: 42px; padding: 0; }
  .nb-teacher-dock button:last-child b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .nb-help-head, .nb-help-body { padding-right: 19px; padding-left: 19px; }
  .nb-help-steps { grid-template-columns: 1fr; }
  .nb-help-steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; }
  .nb-help-steps li::before { grid-row: 1 / 3; margin: 0; }
  .nb-help-page-action { grid-template-columns: 1fr; }
  .nb-help-page-action button { width: 100%; }
}

@media print {
  .nb-teacher-dock,
  .nb-teacher-help,
  .nb-help-toast { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .nb-teacher-dock,
  .nb-teacher-help { scroll-behavior: auto; }
}
