.student-inbox { flex: none; }
.student-inbox-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 8px;
  background: rgb(255 255 255 / .05);
  color: #eef3ff;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.student-inbox-trigger:hover,
.student-inbox-trigger[aria-expanded="true"] {
  background: rgb(255 255 255 / .13);
  border-color: rgb(255 255 255 / .3);
  color: #fff;
}
.student-inbox-count {
  position: absolute;
  inset: -5px -6px auto auto;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 2px solid #0b0f19;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}
.student-inbox-panel {
  position: fixed;
  z-index: 40;
  inset: calc(var(--inbox-top, 68px) + 4px) var(--inbox-right, 12px) auto auto;
  width: min(352px, calc(100vw - 16px));
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgb(15 28 56 / .08), 0 20px 44px -12px rgb(15 28 56 / .22);
  font-family: var(--font-sans, inherit);
}
.student-inbox-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f8;
  background: #fafbfe;
}
.student-inbox-heading h2 { margin: 0; font-size: 14px; font-weight: 650; color: #0f172a; }
.student-inbox-heading h2:focus { outline: none; }
.student-inbox-clear {
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1447e6;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.student-inbox-clear:disabled { color: #8c98ac; cursor: default; }
.student-inbox-clear:hover:not(:disabled) { background: #ebf1ff; }
.student-inbox-list {
  display: grid;
  gap: 2px;
  padding: 6px;
  max-height: min(320px, calc(100vh - var(--inbox-top, 68px) - 64px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.student-inbox-empty { margin: 0; padding: 24px 12px; color: #64748b; font-size: 13px; text-align: center; }
.student-inbox-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.student-inbox-item[data-unread] { background: #f4f8ff; border-color: #e4ecfc; }
.student-inbox-item:hover { background: #ebf1ff; border-color: #d6e2fc; }
.student-inbox-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; }
.student-inbox-item[data-unread] .student-inbox-dot { background: #1447e6; box-shadow: 0 0 0 3px rgb(20 71 230 / .14); }
.student-inbox-item strong,
.student-inbox-item small { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.student-inbox-item strong { font-size: 13px; font-weight: 600; color: #0f172a; }
.student-inbox-item small { margin-top: 3px; font-size: 12px; color: #526077; }
.student-inbox button:focus-visible { outline: 2px solid #1447e6; outline-offset: -2px; }
@media (max-width: 900px) {
  .attempt-banner > .student-inbox { order: 1; }
  .student-inbox-trigger { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  html[data-theme] .attempt-banner:has(> .student-inbox) > .race-day { order: 0; }
}
