/* =========================================
   THE VEIL · MEMBERS HALL
   Opens inside the same page shell as THE CITADEL (.ex101-page):
   same position, same staged reveal, top menu and MUSIC/SOUND untouched.
   Matte Black #0B0B0E · Brushed Gold #D4AF37 · Electric Azure #00B5FF
   ========================================= */

:root {
  --mb-matte: #0B0B0E;
  --mb-gold: #D4AF37;
  --mb-gold-bright: #F9E295;
  --mb-gold-dim: rgba(212, 175, 55, 0.35);
  --mb-azure: #00B5FF;
  --mb-cream: #F0E6C8;
  --mb-muted: #B9B09A;
  --mb-bay: 290px;
}

/* ---------- Header (same kicker / title / rule as the other pages) ---------- */

.mb-header {
  flex: 0 0 auto;
  padding-bottom: 14px;
}

.mb-kicker {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #8fdcff;
  text-shadow: 0 1px 4px #000, 0 0 12px rgba(0, 181, 255, 0.6);
}

.mb-title {
  margin: 6px 0 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.16em;
  color: var(--mb-gold-bright);
  text-shadow: 0 2px 10px #000, 0 0 14px rgba(212, 175, 55, 0.35);
}

.mb-line {
  height: 1px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--mb-gold), rgba(212, 175, 55, 0.1) 70%, transparent);
}

/* ---------- View area: roster or profile ---------- */

/* site.css lays the Citadel page out as a grid with !important rules.
   The members page needs a plain column so the hall can fill the space. */
.mb-inner {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  grid-template-rows: none !important;
  row-gap: 0 !important;
}

.mb-view {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

.mb-roster {
  position: absolute;
  inset: 0;
}

.mb-roster[hidden],
.mb-profile[hidden] {
  display: none;
}

/* ---------- Corridor ---------- */

.mb-corridor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--mb-gold-dim);
  background: var(--mb-matte);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8);
}

/* 3D hallway backdrop: a one-point corridor drawn as an SVG.
   Back wall = the middle rectangle, side walls and floor and ceiling
   recede to the vanishing point at the centre. */
.mb-hall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.mb-track {
  position: absolute;
  inset: 0 0 56px 0;
  z-index: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0 calc(50% - var(--mb-bay) / 2);
}

.mb-track::-webkit-scrollbar {
  display: none;
}

.mb-bay {
  position: relative;
  flex: 0 0 var(--mb-bay);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
}

/* Wall sconce beside each frame */
.mb-bay::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 26%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mb-azure);
  box-shadow: 0 0 18px 6px rgba(0, 181, 255, 0.3);
}

/* ---------- Picture frame (button) ---------- */

.mb-frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.mb-frame:hover,
.mb-frame:focus-visible {
  transform: translateY(-4px);
}

.mb-frame:focus-visible {
  outline: 2px solid var(--mb-azure);
  outline-offset: 6px;
}

.mb-frame-art {
  position: relative;
  width: 184px;
  height: 220px;
  padding: 16px;
  background: linear-gradient(145deg, #F9E295 0%, #D4AF37 26%, #8C6D23 50%, #D4AF37 74%, #F9E295 100%);
  box-shadow:
    0 0 0 1px #3d2f0c,
    0 16px 32px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(0, 181, 255, 0.22);
  transition: box-shadow 0.25s ease;
}

.mb-frame-art::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(249, 226, 149, 0.55);
  pointer-events: none;
}

.mb-frame:hover .mb-frame-art,
.mb-frame:focus-visible .mb-frame-art {
  box-shadow:
    0 0 0 1px #3d2f0c,
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 42px rgba(0, 181, 255, 0.45);
}

.mb-frame-mat {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9);
}

.mb-frame-mat img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(0, 181, 255, 0.3);
}

.mb-plate {
  display: block;
  min-width: 150px;
  padding: 7px 16px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-align: center;
  text-transform: uppercase;
  color: var(--mb-gold-bright);
  background: linear-gradient(180deg, #1c170a, #0b0b0e);
  border: 1px solid var(--mb-gold-dim);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
}

/* ---------- Corridor controls ---------- */

.mb-arrow {
  position: absolute;
  top: 44%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  font-size: 30px;
  line-height: 1;
  color: var(--mb-gold);
  background: rgba(11, 11, 14, 0.8);
  border: 1px solid var(--mb-gold-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mb-arrow:hover,
.mb-arrow:focus-visible {
  border-color: var(--mb-azure);
  box-shadow: 0 0 14px rgba(0, 181, 255, 0.35);
}

.mb-arrow-prev {
  left: 12px;
}

.mb-arrow-next {
  right: 12px;
}

.mb-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mb-cream);
  text-transform: uppercase;
  text-shadow: 0 1px 6px #000, 0 0 10px #000;
}

/* ---------- Profile (About template) ---------- */

.mb-profile {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mb-profile.is-revealing {
  animation: ex101Reveal 760ms both;
}

.mb-back {
  align-self: flex-start;
  min-height: 40px;
  margin-bottom: 14px;
  padding: 0 16px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--mb-cream);
  background: rgba(11, 11, 14, 0.8);
  border: 1px solid var(--mb-gold-dim);
  cursor: pointer;
}

.mb-back:hover,
.mb-back:focus-visible {
  border-color: var(--mb-azure);
  color: var(--mb-azure);
}

.mb-profile-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
}

.mb-profile-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mb-frame-large {
  width: 230px;
  height: 264px;
  padding: 16px;
}

.mb-name {
  margin: 0;
  padding: 7px 18px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--mb-gold-bright);
  background: linear-gradient(180deg, #1c170a, #0b0b0e);
  border: 1px solid var(--mb-gold-dim);
}

.mb-sections {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(150px, 1fr);
  gap: 14px;
}

.mb-section {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
  background: rgba(11, 11, 14, 0.8);
  border: 1px solid var(--mb-gold-dim);
}

.mb-section h3 {
  margin: 0 0 10px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--mb-gold);
}

/* Blank fields show a dash until text is added */
.mb-body {
  min-height: 70px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  color: var(--mb-cream);
  white-space: pre-line;
}

.mb-body:empty::before {
  content: "\2014";
  color: #5d5a50;
}

/* ---------- Narrower desktops ---------- */

@media (max-width: 1100px) {
  .mb-profile-grid {
    grid-template-columns: 200px 1fr;
  }

  .mb-frame-large {
    width: 180px;
    height: 208px;
  }
}

@media (max-width: 900px) {
  .mb-profile-grid {
    grid-template-columns: 1fr;
  }

  .mb-sections {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

/* ---------- All members on one screen (A–Z grid) ---------- */

/* Hierarchy: tiers stacked top to bottom, all on one screen */
.mb-grid {
  position: absolute;
  inset: 0 0 46px 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 28px;
  overflow: hidden;
}

.mb-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Connector line from the tier above */
.mb-tier + .mb-tier {
  margin-top: 14px;
}

.mb-tier + .mb-tier::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  height: 14px;
  width: 1px;
  background: var(--mb-gold);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}

.mb-tier-label {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--mb-azure);
  text-shadow: 0 1px 4px #000;
}

.mb-tier-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
}

.mb-cell {
  display: flex;
  justify-content: center;
}

.mb-cell .mb-frame {
  width: min(120px, 12vh);
  gap: 8px;
}

.mb-cell .mb-frame-art {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 0.82 / 1;
  padding: 8px;
}

.mb-cell .mb-frame-art::before {
  inset: 5px;
}

/* Empty frame for a member whose talisman is not ready yet */
.mb-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px dashed var(--mb-gold-dim);
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
}

.mb-cell .mb-plate {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 6px 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .mb-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mb-track {
    scroll-behavior: auto;
  }

  .mb-profile.is-revealing {
    animation: none;
  }
}

/* Shorter screens (laptops): tighten spacing so all three tiers fit */
@media (max-height: 800px) {
  .mb-kicker {
    display: none;
  }

  .mb-title {
    margin-top: 0;
    font-size: 24px;
  }

  .mb-header {
    padding-bottom: 8px;
  }

  .mb-grid {
    padding: 8px 20px;
    inset: 0 0 38px 0;
  }

  .mb-tier + .mb-tier {
    margin-top: 8px;
  }

  .mb-tier + .mb-tier::before {
    top: -8px;
    height: 8px;
  }

  .mb-tier {
    gap: 4px;
  }

  .mb-tier-row {
    gap: 8px 16px;
  }

  .mb-cell .mb-frame {
    width: min(120px, 10.5vh);
    gap: 5px;
  }

  .mb-cell .mb-plate {
    padding: 3px 6px;
    font-size: 9px;
  }
}

/* ---------- Groups: tabs down the left, members in the corridor ---------- */

.mb-split {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 18px;
}

.mb-tabs {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

.mb-tab {
  text-align: left;
  padding: 14px 16px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--mb-cream);
  background: linear-gradient(90deg, rgba(11, 11, 14, 0.92), rgba(11, 11, 14, 0.65));
  border: 1px solid var(--mb-gold-dim);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mb-tab:hover,
.mb-tab:focus-visible {
  border-color: var(--mb-azure);
  color: var(--mb-azure);
}

.mb-tab.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0, 181, 255, 0.28), rgba(0, 181, 255, 0.06));
  border-color: var(--mb-azure);
  border-left-color: var(--mb-azure);
  box-shadow: 0 0 16px rgba(0, 181, 255, 0.25);
}

.mb-split .mb-corridor {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

/* Frames hang flat on the back wall in one even row */
.mb-split .mb-grid {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: 0 26px;
  padding: 18px 24px;
  overflow: visible;
}

.mb-split .mb-cell {
  flex: 0 0 auto;
  width: min(168px, calc((100vw - 520px) / var(--n, 6)), 21vh);
}

.mb-split .mb-cell .mb-frame {
  width: 100%;
  gap: 6px;
}

.mb-split .mb-cell .mb-frame-art {
  padding: 9px;
  box-shadow:
    0 0 0 1px #2a2008,
    0 22px 36px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(212, 175, 55, 0.07);
}

.mb-split .mb-frame:hover .mb-frame-art,
.mb-split .mb-frame:focus-visible .mb-frame-art {
  box-shadow:
    0 0 0 1px #2a2008,
    0 26px 44px rgba(0, 0, 0, 0.9),
    0 0 70px rgba(212, 175, 55, 0.18);
}

.mb-rank {
  display: block;
  padding: 3px 10px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-align: center;
  background: rgba(11, 11, 14, 0.85);
  border: 1px solid;
}

.mb-rank-owner {
  color: var(--mb-gold-bright);
  border-color: var(--mb-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.mb-rank-moderator,
.mb-rank-member {
  color: #8fdcff;
  border-color: var(--mb-azure);
  box-shadow: 0 0 10px rgba(0, 181, 255, 0.3);
}

.mb-empty {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  color: var(--mb-muted);
}

@media (max-width: 900px) {
  .mb-split {
    flex-direction: column;
  }

  .mb-tabs {
    flex: 0 0 auto;
    flex-direction: row;
    padding-top: 0;
  }

  .mb-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 8px;
    font-size: 10px;
  }

  .mb-split .mb-corridor {
    height: auto;
    min-height: 380px;
  }

  /* Phones and tablets: frames wrap in rows */
  .mb-split .mb-grid {
    flex-wrap: wrap;
    gap: 22px 16px;
    position: relative;
    inset: auto;
    min-height: 380px;
  }

  .mb-split .mb-cell {
    width: 120px;
  }
}

/* Members page spans the full width, so the group tabs sit at the far left,
   in the same place as the EXPLORE menu. */
#membersPage {
  left: 26px !important;
  right: 26px !important;
}

#membersPage .mb-inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 22px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  #membersPage {
    left: 16px !important;
    right: 16px !important;
  }

  #membersPage .mb-inner {
    padding: 0 8px;
  }
}

/* ---------- Members hall: talismans set into the painted frames ----------
   The hall picture (assets/images/members-hall.jpg) is the backdrop. Each
   member's talisman, nameplate and rank sit over the frames painted in it.
   Positions are percentages of the picture (set inline by members.js). */

.mb-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #050507;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.mb-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  pointer-events: none;
}

.mb-slots {
  position: absolute;
  inset: 0;
}

.mb-slots .mb-cell {
  position: absolute;
  width: auto;
  height: auto;
}

.mb-slots .mb-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  gap: 0;
  padding: 0;
  transition: none;
}

.mb-slots .mb-frame:hover,
.mb-slots .mb-frame:focus-visible {
  transform: none;
}

/* Dark backing so the painted nameplate and badge never show through */
.mb-under {
  position: absolute;
  background: linear-gradient(180deg, #0d0d12, #07070a);
}

.mb-slot-art {
  position: absolute;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
  box-shadow: 0 0 14px rgba(0, 181, 255, 0.22);
}

.mb-slot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: box-shadow 0.25s ease;
}

.mb-slot-art .mb-placeholder {
  width: 100%;
  height: 100%;
}

.mb-frame:hover .mb-slot-art,
.mb-frame:focus-visible .mb-slot-art {
  box-shadow: 0 0 22px rgba(0, 181, 255, 0.5);
}

.mb-slots .mb-plate {
  position: absolute;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--mb-gold-bright);
  background: linear-gradient(180deg, #1c170a, #0b0b0e);
  border: 1px solid var(--mb-gold-dim);
}

.mb-slots .mb-rank {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.mb-slots .mb-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  text-align: center;
}

/* Phones and tablets: no picture, talismans wrap in rows */
@media (max-width: 900px) {
  .mb-stage {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: auto;
    min-height: 380px;
    background: none;
    box-shadow: none;
  }

  .mb-stage-img {
    display: none;
  }

  .mb-slots {
    position: relative;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px 16px;
    padding: 18px 8px;
  }

  .mb-slots .mb-cell {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 120px !important;
    height: auto !important;
  }

  .mb-slots .mb-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mb-slot-art,
  .mb-slots .mb-plate,
  .mb-slots .mb-rank {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .mb-slot-art {
    aspect-ratio: 1 / 1;
  }

  .mb-slots .mb-plate {
    font-size: 10px;
    padding: 6px 4px;
  }

  .mb-slots .mb-rank {
    font-size: 9px;
    padding: 3px 6px;
  }
}

/* ---------- Members list: one row per member, talisman first ---------- */

.mb-corridor {
  background: #0b0b0e;
}

.mb-list {
  position: absolute;
  inset: 0 0 46px 0;
  overflow-y: auto;
  padding: 22px 28px;
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mb-item {
  list-style: none;
}

.mb-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 10px 12px;
  text-align: left;
  color: var(--mb-cream);
  background: linear-gradient(90deg, rgba(20, 18, 10, 0.9), rgba(11, 11, 14, 0.85));
  border: 1px solid var(--mb-gold-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mb-row:hover,
.mb-row:focus-visible {
  border-color: var(--mb-azure);
  box-shadow: 0 0 16px rgba(0, 181, 255, 0.25);
  outline: none;
}

.mb-row-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
  border: 1px solid var(--mb-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.mb-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mb-row-thumb .mb-placeholder {
  width: 100%;
  height: 100%;
}

.mb-row-name {
  flex: 1 1 auto;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mb-gold-bright);
}

.mb-row .mb-rank {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 5px 12px;
  font-size: 10px;
}

@media (max-width: 900px) {
  .mb-list {
    position: relative;
    inset: auto;
    padding: 14px 12px;
  }

  .mb-row-thumb {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .mb-row-name {
    font-size: 13px;
    letter-spacing: 0.14em;
  }
}

/* =========================================================
   MEMBERS ARCHIVE
   Leadership featured on top, everyone else in a dense A–Z grid.
   Built to hold thousands: only the visible discs are drawn each render.
   ========================================================= */

.mb-archive {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 181, 255, 0.07), transparent 70%),
    #0b0b0e;
}

/* Search row */
.mb-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--mb-gold-dim);
}

.mb-search-wrap {
  position: relative;
  display: block;
  width: min(360px, 60%);
}

.mb-search {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 14px 0 36px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mb-gold-bright);
  background: rgba(5, 5, 8, 0.9);
  border: 1px solid var(--mb-gold-dim);
  border-radius: 0;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.mb-search::placeholder {
  color: #6f6a58;
  letter-spacing: 0.16em;
}

.mb-search:focus {
  border-color: var(--mb-azure);
  box-shadow: 0 0 16px rgba(0, 181, 255, 0.25);
}

.mb-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 11px;
  height: 11px;
  transform: translateY(-50%);
  border: 1.5px solid var(--mb-gold);
  border-radius: 50%;
  pointer-events: none;
}

.mb-search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 1.5px;
  background: var(--mb-gold);
  transform: rotate(45deg);
}

.mb-count {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--mb-azure);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Body: scrolling content + A–Z rail */
.mb-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.mb-scroll {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 18px 22px 46px;
  scrollbar-width: thin;
  scrollbar-color: var(--mb-gold-dim) transparent;
}

.mb-scroll.is-entering {
  animation: mbFadeIn 0.45s ease both;
}

.mb-letters {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 12px 8px 46px 4px;
  border-left: 1px solid var(--mb-gold-dim);
}

.mb-letter {
  width: 22px;
  height: 20px;
  padding: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 20px;
  color: var(--mb-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.mb-letter:hover:not(:disabled),
.mb-letter:focus-visible {
  color: var(--mb-azure);
  transform: translateX(-2px);
  outline: none;
  text-shadow: 0 0 8px rgba(0, 181, 255, 0.7);
}

.mb-letter.is-active {
  color: var(--mb-gold-bright);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.mb-letter:disabled {
  opacity: 0.22;
  cursor: default;
}

/* Section heads */
.mb-feat-row + .mb-sec {
  margin-top: 28px;
}

.mb-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--mb-gold);
  text-transform: uppercase;
}

.mb-sec-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--mb-gold-dim), transparent);
}

/* ---------- Leadership: large talismans with a turning ring ---------- */

.mb-feat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 26px 40px;
  padding: 4px 0 2px;
}

.mb-feat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  animation: mbRise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}

.mb-feat-ring {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mbGlow 4s ease-in-out infinite;
}

.mb-feat-ring::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, var(--ring, #D4AF37) 70%, transparent 86%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: mbSpin 9s linear infinite;
}

.mb-feat-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--ring, #D4AF37);
  opacity: 0.6;
}

.mb-feat-owner { --ring: #F9E295; }
.mb-feat-moderator,
.mb-feat-member { --ring: #00B5FF; }

.mb-feat-disc {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9);
}

.mb-feat-disc img,
.mb-feat-disc .mb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mb-feat-name {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--mb-gold-bright);
  text-transform: uppercase;
  text-shadow: 0 1px 6px #000;
  transition: color 0.2s ease;
}

.mb-feat:hover .mb-feat-name,
.mb-feat:focus-visible .mb-feat-name {
  color: #ffffff;
}

.mb-feat:hover .mb-feat-disc,
.mb-feat:focus-visible .mb-feat-disc {
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9), 0 0 26px var(--ring);
}

.mb-feat:focus-visible {
  outline: none;
}

/* ---------- Dense grid: small talismans, names beneath ---------- */

.mb-dense {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 26px 12px;
}

.mb-dense-item {
  min-width: 0;
}

.mb-disc-btn {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  animation: mbRise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}

.mb-disc {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1d1d27 0%, #0b0b0e 72%);
  border: 1px solid var(--mb-gold-dim);
  box-shadow: 0 0 0 0 rgba(0, 181, 255, 0), inset 0 0 14px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mb-disc img,
.mb-disc .mb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scan line that sweeps over the disc on hover */
.mb-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 181, 255, 0.45) 50%, transparent 60%);
  transform: translateY(-100%);
  pointer-events: none;
}

.mb-disc-btn:hover .mb-disc,
.mb-disc-btn:focus-visible .mb-disc {
  transform: scale(1.07);
  border-color: var(--mb-azure);
  box-shadow: 0 0 22px rgba(0, 181, 255, 0.45);
}

.mb-disc-btn:hover .mb-disc::after,
.mb-disc-btn:focus-visible .mb-disc::after {
  animation: mbScan 0.9s ease-out;
}

.mb-disc-btn:focus-visible {
  outline: none;
}

.mb-disc-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mb-cream);
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.mb-disc-btn:hover .mb-disc-name,
.mb-disc-btn:focus-visible .mb-disc-name {
  color: var(--mb-azure);
}

/* ---------- Motion ---------- */

@keyframes mbRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes mbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mbSpin {
  to { transform: rotate(360deg); }
}

@keyframes mbGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.25)); }
  50% { filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.6)); }
}

@keyframes mbScan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .mb-feat,
  .mb-feat-ring,
  .mb-feat-ring::before,
  .mb-disc-btn,
  .mb-scroll.is-entering {
    animation: none !important;
  }
}

/* ---------- Phones: rail hidden, grid fits narrow screens ---------- */

@media (max-width: 900px) {
  .mb-archive {
    position: relative;
    inset: auto;
    min-height: 480px;
  }

  .mb-tools {
    flex-wrap: wrap;
    padding: 12px 12px 10px;
  }

  .mb-search-wrap {
    width: 100%;
  }

  .mb-scroll {
    padding: 14px 12px 40px;
  }

  .mb-letters {
    display: none;
  }

  .mb-dense {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 18px 8px;
  }

  .mb-disc {
    width: 64px;
    height: 64px;
  }

  .mb-feat-ring {
    width: 104px;
    height: 104px;
  }

  .mb-feat-disc {
    width: 90px;
    height: 90px;
  }
}

/* Profile sits on the same dark panel as the list, so nothing behind it shows through */
.mb-profile {
  padding: 18px 22px 22px;
  background: #0b0b0e;
  border: 1px solid var(--mb-gold-dim);
  box-sizing: border-box;
}

/* A–Z letters run as one bar under the search row */
.mb-archive > .mb-letters {
  flex: 0 0 auto;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  padding: 8px 22px;
  border-left: 0;
  border-bottom: 1px solid var(--mb-gold-dim);
}

.mb-archive > .mb-letters .mb-letter {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 26px;
  line-height: 26px;
  font-size: 11px;
}

.mb-archive > .mb-letters .mb-letter:hover:not(:disabled),
.mb-archive > .mb-letters .mb-letter:focus-visible {
  transform: translateY(-2px);
}

.mb-archive > .mb-body {
  flex-direction: column;
}

@media (max-width: 900px) {
  .mb-archive > .mb-letters {
    display: flex;
    overflow-x: auto;
    padding: 8px 10px;
  }

  .mb-archive > .mb-letters .mb-letter {
    flex: 0 0 auto;
    width: 18px;
    font-size: 10px;
  }
}

/* ---- Count, section spacing, and matching talisman sizes ---- */

.mb-count {
  font-size: 13px;
  letter-spacing: 0.2em;
}

/* Even space between Leadership and Members */
.mb-feat-row {
  padding-bottom: 6px;
}

.mb-sec + .mb-sec {
  margin-top: 40px;
}

/* Owner and moderator talismans are the same size as member talismans (92px).
   The ring, turning glow and entrance animations are kept. */
.mb-feat-ring {
  width: 92px;
  height: 92px;
}

.mb-feat-ring::before {
  inset: -6px;
}

.mb-feat-disc {
  width: 92px;
  height: 92px;
}

@media (max-width: 900px) {
  .mb-sec + .mb-sec {
    margin-top: 28px;
  }

  .mb-feat-ring {
    width: 64px;
    height: 64px;
  }

  .mb-feat-disc {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Left-side buttons match the EXPLORE menu everywhere ----------
   Same size, type, diamond marker, hover and selected states as
   .explore-submenu button in site.css. */
.mb-tabs {
  flex: 0 0 190px;
  width: 190px;
  gap: 7px;
  padding-top: 0;
}

.mb-tabs .mb-tab {
  position: relative;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 14px 0 20px;
  margin: 0;
  border: 1px solid rgba(212, 175, 55, 0.23);
  border-left: 1px solid rgba(212, 175, 55, 0.23);
  background: linear-gradient(90deg, rgba(11, 11, 14, 0.58), rgba(11, 11, 14, 0.34));
  color: rgba(240, 230, 200, 0.88);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  box-shadow: inset 2px 0 0 rgba(0, 181, 255, 0.34);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 260ms cubic-bezier(.16,.84,.32,1);
}

.mb-tabs .mb-tab::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 5px;
  height: 5px;
  background: rgba(0, 181, 255, 0.68);
  box-shadow: 0 0 6px rgba(0, 181, 255, 0.52);
  transform: translateY(-50%) rotate(45deg);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mb-tabs .mb-tab::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: rgb(0, 181, 255);
  box-shadow: 0 0 8px rgba(0, 181, 255, 0.8);
  transition: width 260ms ease;
}

.mb-tabs .mb-tab:hover,
.mb-tabs .mb-tab:focus-visible {
  color: rgb(240, 230, 200);
  border-color: rgba(212, 175, 55, 0.72);
  background: linear-gradient(90deg, rgba(0, 181, 255, 0.63), rgba(11, 11, 14, 0.52));
  box-shadow: inset 3px 0 0 rgba(0, 181, 255, 0.82), 0 0 12px rgba(0, 181, 255, 0.12);
  transform: translateX(5px);
  outline: none;
}

.mb-tabs .mb-tab:hover::before,
.mb-tabs .mb-tab:focus-visible::before {
  background: rgb(0, 181, 255);
  box-shadow: 0 0 8px rgba(0, 181, 255, 0.95);
  transform: translateY(-50%) rotate(225deg) scale(1.2);
}

.mb-tabs .mb-tab:hover::after,
.mb-tabs .mb-tab:focus-visible::after {
  width: 76%;
}

.mb-tabs .mb-tab.is-active {
  color: rgb(240, 230, 200);
  border-color: rgba(212, 175, 55, 0.96);
  background: linear-gradient(90deg, rgba(0, 181, 255, 0.78), rgba(11, 11, 14, 0.72));
  box-shadow: inset 3px 0 0 rgba(0, 181, 255, 0.96), 0 0 12px rgba(0, 181, 255, 0.22), 0 0 22px rgba(0, 181, 255, 0.1);
  transform: translateX(5px);
}

.mb-tabs .mb-tab.is-active::before {
  background: rgb(0, 181, 255);
  box-shadow: 0 0 8px rgba(0, 181, 255, 0.95);
  transform: translateY(-50%) rotate(225deg) scale(1.2);
}

.mb-tabs .mb-tab.is-active::after {
  width: 76%;
}

@media (max-width: 700px) {
  .mb-tabs {
    flex: 0 0 165px;
    width: 165px;
  }

  .mb-tabs .mb-tab {
    height: 33px;
    font-size: 9px;
  }
}

/* ---- Centre talismans and names ---- */

.mb-feat-row {
  justify-content: center;
}

.mb-feat,
.mb-feat-name,
.mb-feat-name + .mb-rank {
  text-align: center;
}

.mb-feat {
  align-items: center;
}

.mb-dense {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 18px;
}

.mb-dense-item {
  width: 118px;
  flex: 0 0 118px;
}

.mb-disc-btn {
  align-items: center;
  text-align: center;
}

.mb-disc-name {
  text-align: center;
  width: 100%;
}

@media (max-width: 900px) {
  .mb-dense-item {
    width: 84px;
    flex: 0 0 84px;
  }
}

/* ---- Talismans and names aligned left (overrides the centring above) ---- */

.mb-feat-row {
  justify-content: flex-start;
}

.mb-feat,
.mb-feat-name,
.mb-feat-name + .mb-rank {
  align-items: flex-start;
  text-align: left;
}

.mb-feat {
  align-items: flex-start;
}

.mb-dense {
  justify-content: flex-start;
}

.mb-disc-btn {
  align-items: flex-start;
  text-align: left;
}

.mb-disc-name {
  text-align: left;
}

/* ---- Names centred under each talisman (talismans stay left) ---- */

.mb-feat {
  width: 92px;
  align-items: center;
  text-align: center;
}

.mb-feat-name {
  text-align: center;
  width: 100%;
}

.mb-feat .mb-rank {
  align-self: center;
}

.mb-disc-btn {
  width: 92px;
  align-items: center;
  text-align: center;
}

.mb-disc-name {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

/* ---- Desktop: left buttons pinned to the same spot as the EXPLORE buttons ----
   Explore uses left 34px / top 126px. The spacer keeps the list panel where it was. */
@media (min-width: 901px) {
  .mb-split::before {
    content: "";
    flex: 0 0 190px;
  }

  /* Header label sits above the list panel, clear of the pinned buttons */
  .mb-header {
    margin-left: 208px;
  }

  .mb-tabs {
    position: fixed;
    left: 34px;
    top: 126px;
    z-index: 40;
    flex: none;
    width: 190px;
    gap: 7px;
  }
}

/* Left buttons hide while a profile is open */
#membersPage.is-profile .mb-tabs {
  display: none;
}
