/* Member-only shell. Safe-area spacing preserves content above fixed navigation. */
body.member-shell {
  --member-top: calc(68px + env(safe-area-inset-top));
  --member-bottom: calc(72px + env(safe-area-inset-bottom));
  padding-top: var(--member-top);
  padding-bottom: var(--member-bottom);
  background: #f3f6fa;
}
.member-shell > header,
.member-shell > footer,
.member-shell > .eyebrow {
  display: none;
}
.member-shell main,
.member-shell:has(#workspace:not([hidden])) main {
  max-width: 780px;
  margin: 24px auto;
  padding: 0 18px;
}
.member-shell main > .eyebrow {
  display: none;
}
.member-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--member-top);
  padding: env(safe-area-inset-top) 16px 0;
  background: #102d50;
  color: #fff;
  z-index: 30;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  box-shadow: 0 1px 12px #102d5018;
}
.member-header h1 {
  font-size: 19px;
  text-align: center;
  letter-spacing: -0.3px;
  margin: 0;
  color: #fff;
}
.member-header img {
  height: 49px;
  width: 52px;
  object-fit: contain;
  display: block;
  margin: auto;
}
.member-icon {
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 9px;
  position: relative;
  color: inherit;
}
.member-icon svg,
.member-tab svg,
.member-section-title svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.member-badge {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 15px;
  background: #c51d36;
  border: 2px solid #102d50;
  border-radius: 10px;
  font-size: 9px;
  padding: 0 3px;
}
.member-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--member-bottom);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -3px 20px #102d5012;
  border-top: 1px solid #d8e1eb;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0;
}
.member-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #56677a;
  font-size: 11px;
  font-weight: 650;
  border-radius: 9px;
  min-height: 54px;
}
.member-tab[aria-current="page"] {
  background: #e7eff8;
  color: #0b4f97;
}
.member-tab svg {
  width: 23px;
  height: 23px;
}
.member-shell .toolbar {
  margin: 0;
}
.member-shell #workspace > .toolbar h1,
.member-shell #workspace > .toolbar #subtitle,
.member-shell #workspace > .toolbar .actions,
.member-shell #memberschedule {
  display: none;
}
.member-shell #workspace > nav {
  margin-top: 0;
}
.member-shell #selectedday {
  display: none;
}
.member-shell #memberview > .sectiontitle h2 {
  font-size: 20px;
}
.member-shell #appnavigation {
  display: none;
}
.member-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  margin: 0;
  width: min(340px, 88vw);
  max-width: 88vw;
  max-height: 100dvh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: calc(22px + env(safe-area-inset-top)) 22px
    calc(22px + env(safe-area-inset-bottom));
  box-shadow: 8px 0 40px #102d5025;
}
.member-drawer::backdrop {
  background: #102d5070;
}
.member-drawer h2 {
  margin: 28px 0 8px;
  font-size: 24px;
}
.member-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #152b43;
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid #e8edf4;
  font-weight: 600;
}
.member-drawer a svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.member-drawer .member-close {
  float: right;
}
.member-signout {
  margin-top: 32px;
  width: 100%;
}
.member-notices {
  width: min(520px, calc(100vw - 28px));
  padding: 22px;
}
.member-notices .sectiontitle {
  align-items: center;
}
.member-welcome {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.member-card {
  background: white;
  border: 1px solid #d8e1eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
}
.member-card h2 {
  font-size: 17px;
  margin: 0;
}
.member-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 13px;
  font-size: 17px;
  font-weight: 750;
}
.member-section-title svg {
  color: #0b4f97;
  width: 21px;
  height: 21px;
}
.member-streak-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
.member-streak-heading strong {
  color: #0b4f97;
  font-size: 15px;
}
.member-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}
.member-day {
  aspect-ratio: 1;
  border: 1px solid #d8e1eb;
  background: #f3f6fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  max-width: 48px;
  margin: auto;
  width: 100%;
  position: relative;
}
.member-day.attended {
  background: #0b4f97;
  color: white;
  border-color: #0b4f97;
}
.member-day.today {
  outline: 2px solid #c51d36;
  outline-offset: 3px;
}
.member-day.attended:after {
  content: "✓";
  position: absolute;
  font-size: 9px;
  bottom: 0;
}
.member-week-caption {
  font-size: 11px;
  color: #56677a;
  margin: 14px 0 0;
}
.member-row {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.member-row > .member-card {
  flex: 0 0 min(290px, 85%);
  scroll-snap-align: start;
  margin-bottom: 0;
}
.member-class-time {
  font-size: 13px;
  color: #56677a;
  margin: 0 0 8px;
}
.member-class-name {
  font-weight: 750;
  font-size: 18px;
  margin: 0 0 7px;
}
.member-class-meta {
  font-size: 12px;
  color: #56677a;
  margin: 0 0 14px;
}
.member-card button,
.member-card .member-link {
  width: 100%;
}
.member-link {
  display: block;
  background: #0b4f97;
  color: #fff;
  text-decoration: none;
  text-align: center;
  border-radius: 7px;
  padding: 11px;
  font-size: 14px;
  font-weight: 650;
}
.member-empty {
  margin: 0;
  color: #56677a;
  font-size: 14px;
}
.member-birthday {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f7;
}
.member-birthday:last-child {
  border: 0;
}
.member-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e7eff8;
  color: #0b4f97;
  display: grid;
  place-items: center;
  font-weight: 750;
}
.member-birthday strong {
  font-size: 14px;
}
.member-birthday small {
  display: block;
  color: #56677a;
}
.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.member-stats strong {
  display: block;
  font-size: 32px;
  color: #0b4f97;
  letter-spacing: -1px;
}
.member-stats span {
  font-size: 12px;
  color: #56677a;
}
.member-attendance-row {
  padding: 15px 0;
  border-bottom: 1px solid #e8edf4;
}
.member-attendance-row p {
  margin: 4px 0;
  font-size: 13px;
  color: #56677a;
}
.member-history-item {
  padding: 17px;
  background: white;
  border: 1px solid #d8e1eb;
  border-radius: 12px;
  margin: 12px 0;
}
.member-history-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.member-history-item p {
  margin: 5px 0;
  font-size: 13px;
}
.member-index-row {
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid #d8e1eb;
  color: #152b43;
  display: flex;
  justify-content: space-between;
  padding: 17px;
  margin: 8px 0;
}
.member-index-row small {
  color: #56677a;
}
.member-shell label {
  font-size: 14px;
}
.member-shell.member-large main {
  font-size: 18px;
}
.member-shell.member-large .member-empty,
.member-shell.member-large .member-class-meta,
.member-shell.member-large label {
  font-size: 16px;
}
.member-shell :focus-visible {
  outline: 3px solid #c51d36;
  outline-offset: 3px;
}
@media (min-width: 780px) {
  .member-bottom {
    left: 50%;
    transform: translateX(-50%);
    max-width: 780px;
    border-left: 1px solid #d8e1eb;
    border-right: 1px solid #d8e1eb;
  }
  .member-row > .member-card {
    flex-basis: calc(50% - 6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .member-row {
    scroll-behavior: auto;
  }
}

.member-index-row:not(:disabled):hover {
  background: #e7eff8;
  color: #152b43;
  border-color: #b7c6d8;
}
.member-index-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.member-index-row small {
  margin-left: 12px;
  flex-shrink: 0;
}
.member-shell #member-history-results {
  scroll-margin-top: calc(var(--member-top) + 16px);
}

@media (max-width: 700px) {
  body.member-shell {
    touch-action: pan-y;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }
  .member-shell input,
  .member-shell select,
  .member-shell textarea {
    font-size: 16px;
  }
  .member-shell .member-row {
    display: grid;
    overflow: visible;
    scroll-snap-type: none;
  }
  .member-shell .member-row > .member-card {
    width: 100%;
  }
}
@media (max-width: 700px) {
  body.member-shell {
    -webkit-tap-highlight-color: transparent;
  }
}
/* Display-mode switch belongs to the member surface, outside the staff quick bar. */
.member-shell #role-mode-toggle {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px auto;
  padding: 9px 12px;
  border: 1px solid #b9cee2;
  border-radius: 8px;
  background: #fff;
  color: #124f86;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.member-shell #role-mode-toggle:focus-visible {
  outline: 3px solid #2379be;
  outline-offset: 3px;
}

/* Own assignments and private notifications share the existing personal shell. */
.personal-section-heading,
.personal-notification-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.personal-task-list,
.personal-notification-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.personal-task-list li,
.personal-notification-list li {
  padding: 16px 0;
  border-top: 1px solid #e0e8f1;
  overflow-wrap: anywhere;
}
.personal-task-list p,
.personal-notification-list p {
  font-size: 13px;
  color: #526477;
  margin: 8px 0;
}
.personal-task-title {
  font-size: 16px;
  font-weight: 700;
  color: #0b4f97;
}
.personal-task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.personal-status,
.personal-unread-count {
  font-size: 12px;
  font-weight: 650;
  background: #edf2f8;
  padding: 4px 8px;
  border-radius: 6px;
  color: #304b68;
}
.personal-status.complete {
  background: #e6f3eb;
  color: #22603a;
}
.personal-overdue {
  font-size: 12px;
  font-weight: 700;
  color: #9b2437;
  padding: 4px 0;
}
.personal-notification-list .is-unread {
  border-left: 3px solid #0b4f97;
  padding-left: 12px;
}
.personal-notification-list .is-read {
  padding-left: 15px;
}
.personal-notification-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.personal-notification-actions button {
  width: auto;
  min-height: 44px;
}
#member-tasks h2,
#assignment-notifications h2,
#class-notifications h2 {
  margin: 0;
}
@media (max-width: 430px) {
  .personal-notification-heading strong {
    flex-basis: 100%;
  }
  .personal-notification-actions {
    gap: 12px;
  }
}

.personal-notification-body {
  white-space: pre-wrap;
}

/* Owner 2026-11-03 (n-prs): PRs list on Personal history. */
.member-prs h2 {
  margin: 0 0 8px;
}
/* Name on its own line, score · scaling · date underneath, so long names don't break mid-word on phones. */
.member-prs .member-index-row {
  flex-direction: column;
  gap: 4px;
}
.member-prs .member-index-row span {
  overflow-wrap: normal;
}
.member-prs .member-index-row small {
  margin-left: 0;
  flex-shrink: 1;
}
/* Gym announcements in the Inbox (Run 8): plain text, pinned first, "New" until seen. */
.member-announcements[hidden] {
  display: none;
}
.member-announcement-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.member-announcement {
  padding: 14px 0 14px 15px;
  border-top: 1px solid #e0e8f1;
  overflow-wrap: anywhere;
}
.member-announcement.is-new {
  border-left: 3px solid #0b4f97;
  padding-left: 12px;
}
.member-announcement-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.member-announcement-heading h3 {
  margin: 0;
  font-size: 16px;
  color: #0b2f55;
  flex: 1 1 12em;
  min-width: 0;
}
.member-announcement-tag {
  font-size: 12px;
  font-weight: 650;
  background: #edf2f8;
  color: #304b68;
  padding: 3px 8px;
  border-radius: 6px;
}
.member-announcement-tag.is-new {
  background: #0b4f97;
  color: #fff;
}
.member-announcement-date {
  font-size: 12px;
  color: #526477;
  margin: 4px 0 8px;
}
.member-announcement-body {
  white-space: pre-line;
  margin: 0;
  font-size: 15px;
  color: #1d2f43;
}
.member-announcement-link {
  margin: 10px 0 0;
}
/* Your class changes in the Inbox (Run 9): moved up from the waitlist, cancelled, moved. Plain facts. */
.member-class-changes {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.member-class-change {
  padding: 12px 0 12px 12px;
  border-top: 1px solid #e0e8f1;
  border-left: 3px solid #0b4f97;
  overflow-wrap: anywhere;
}
.member-class-change h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #0b2f55;
}
.member-class-change p {
  margin: 0;
  font-size: 15px;
  color: #1d2f43;
}
.member-class-change .member-announcement-date {
  font-size: 12px;
  color: #526477;
  margin-top: 4px;
}
