.redactor-token img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.emblem-sigil-image {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
nav a.live-anchor {
  color: var(--fg);
  border-left-color: var(--leaf);
  background: var(--plane);
}

.recruit-tile-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--edge);
  color: var(--fg-soft);
  font-size: 12px;
}
.hub-busy, .hub-blank {
  padding: 40px;
  color: var(--fg-soft);
}

/* Hub side nav: match the staff sidebar look + bigger targets */
.hub-flank-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-flank-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--fg-soft);
  text-align: left;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
}
.hub-flank-menu button:hover {
  background: var(--plane);
  color: var(--fg);
  border-left-color: var(--leaf);
}
.hub-flank-menu button.live-anchor {
  background: var(--plane);
  color: var(--fg);
  border-left-color: var(--leaf);
}
.hub-flank-menu button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 auto;
}
.hub-flank-menu button .menu-pic-stub {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--plane-up);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

/* ===== WTI Nexus hub shell: full-bleed topbar + fixed-left sidebar ===== */
.member-hub-view {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  background: var(--canvas);
}

.hub-inner-frame {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 59px);
}

/* Collapsed (icons-only) sidebar — a desktop feature. Scoped so a saved
   "collapsed" preference can never squash the phone layout, where the strip
   has its own rules below. */

.hub-flank-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

/* Phones — same idea as the staff sidebar: turn the sidebar into a compact
   horizontal scrolling bar at the top instead of a tall pinned column,
   since there's no room for a 230px-wide rail next to real content. The
   collapse toggle doesn't apply here, so it's hidden. */
@media (max-width: 900px) {
  .hub-inner-frame {
    flex-direction: column;
    min-height: auto;
  }
  /* The whole strip — section tabs, then the Staff panel / Log out
     actions — is ONE horizontally scrollable row (the sidebar itself is the
     scroller, so nothing overlaps or gets clipped off-screen). */

  
  .hub-flank-menu {
    flex: 0 0 auto;
    flex-direction: row;
    overflow: visible;
    gap: 6px;
    min-height: 0;
  }
  /* Active tab keeps its text label so the person always knows which
     section they're on — others stay icon-only to keep the bar compact. */
  .hub-flank-menu button:not(.live-anchor) .menu-tag {
    display: none;
  }
  .hub-flank-menu button.live-anchor {
    font-weight: 800;
  }

    

  

  

    

  

  

    
}

/* Visibly grey out disabled chip controls (e.g. guild-scoped edit lock) */
.redactor-token:disabled,button.redactor-token[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Event signup name chips (class icon + nickname) */
.evt-join-stacks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.evt-join-stacks > div > small {
  display: block;
  color: var(--fg-violet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}
.evt-join-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.evt-join-token {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--edge-violet);
  border-radius: 999px;
  background: var(--plane-violet);
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
}
.evt-join-token img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* Group Builder — banner showing which event the current parties belong to */
.run-evt-pennant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 6px;
  border: 1px solid var(--tint-base);
  border-radius: 8px;
  background: var(--plane-violet);
}

.run-evt-pennant h2 {
  margin: 2px 0 0;
  font-size: 18px;
  color: var(--fg);
}

.run-screen-cluster-nm {
  color: var(--fg-violet);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  flex-shrink: 1;
  min-width: 0;
}
.run-screen-cluster-nm strong {
  color: var(--fg);
  font-weight: 800;
}

/* Staff sidebar — pin it to the viewport so Log out never scrolls off a
   long page. The nav list scrolls internally if it ever gets that tall.
   Desktop only (min-width:901px) — site.css's own @media (max-width:900px)
   rule turns the sidebar into a horizontal scrolling top bar on phones,
   and pinning/height:100vh/the collapse toggle would only fight that. */
@media (min-width: 901px) {
  .rail {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow: hidden;
  }
  .rail nav {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
  }
  .rail-base {
    flex: 0 0 auto;
  }
}
.rail nav a .menu-pic-stub,
.rail-step-away .menu-pic-stub {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--plane-up-violet);
  font-size: 11px;
  font-weight: 900;
}
.rail nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rail-step-away {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 901px) {
  .rail-flip {
    align-self: flex-end;
    width: 24px;
    height: 24px;
    border: 1px solid var(--edge-violet);
    border-radius: 50%;
    background: var(--plane-violet);
    color: var(--fg-violet);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    margin: -8px 0 4px;
  }
  .rail-flip:hover {
    border-color: var(--tint-base);
    color: var(--fg);
  }
  .rail.st-tucked {
    width: 84px;
    padding-left: 8px;
    padding-right: 8px;
    gap: 10px;
    overflow-x: hidden;
  }
  .rail.st-tucked .menu-tag {
    display: none;
  }
  .rail.st-tucked .emblem,
  .rail.st-tucked nav a,
  .rail.st-tucked .rail-step-away {
    justify-content: center;
    padding-left: 4px;
    padding-right: 4px;
  }
  .rail.st-tucked nav a {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .rail.st-tucked nav {
    gap: 2px;
    overflow-x: hidden;
  }
  .rail.st-tucked .rail-base {
    padding: 10px 4px;
  }
  /* Scoped to exclude the hub page — /hub renders through the same
     renderLayout() as every staff page, so it still carries a hidden
     .rail/.site-frame it doesn't use (see site.css's rule that hides it
     for .member-hub-view). Without this guard, this rule's grid-columns
     would win over that hiding rule (it loads later) whenever a staff
     member's persisted sidebar-collapsed state gets applied to that hidden
     sidebar, breaking the hub's own layout entirely. */
  body:not(:has(.member-hub-view)) .site-frame:has(.rail.st-tucked) {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}
/* On phones, hide the desktop-only toggle button entirely — the sidebar
   already becomes a compact horizontal bar via site.css, so there's
   nothing to collapse/expand. The letter-fallback icons (added for the
   desktop collapsed view) are hidden too — there's room for real text
   labels in the horizontal scroll bar, so showing both was redundant and
   inflated each link's height. */
@media (max-width: 900px) {
  .rail-flip {
    display: none;
  }
  /* Active tab keeps its text label so the person always knows which
     section they're on — the rest stay icon-only to keep the bar compact
     and scrollable. */
  .rail nav a:not(.live-anchor) .menu-tag {
    display: none;
  }
  .rail nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .rail nav a.live-anchor {
    font-weight: 800;
    color: var(--fg);
  }
  /* .site-frame keeps min-height:100vh from site.css so short pages still
     fill the screen, but CSS Grid's default align-content:stretch then
     shares that height out across BOTH auto-sized rows — inflating the
     compact mobile nav bar into a tall empty box. Anchor rows to their own
     content height instead; any leftover space just sits below row 2. */
  .site-frame {
    align-content: start;
  }
  /* Back to my profile / Log out share the SAME horizontal strip as the
     section tabs instead of a separate row underneath — a left border
     marks them as actions, not more sections. The plain "Signed in as X"
     text is dropped here; it doesn't fit and isn't actionable. */
  .rail {
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  .rail-base {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin: 0 0 0 4px;
    padding: 0 6px 0 12px;
    border-left: 1px solid var(--edge);
  }
  .rail-base > span {
    display: none;
  }
  .rail-base form {
    margin: 0;
  }
  .rail-step-away {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--plane-up-violet);
    color: var(--fg);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  a.rail-step-away {
    border-color: var(--tint-base);
    background: #2a3125;
    color: #e0f2cb;
  }
  button.rail-step-away {
    border-color: #8fb574;
    background: #2f3629;
    color: #e0f2cb;
  }
}

/* Log History rows. Desktop uses three fixed columns;
   on phones each entry stacks: when + who, then what happened. */
.recruit-lane.journal-lane {
  grid-template-columns: 150px 160px minmax(200px, 1fr);
}
@media (max-width: 900px) {
  .recruit-lane.journal-lane {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }
  .recruit-lane.journal-lane > span:first-child {
    color: var(--fg-soft);
    font-size: 12px;
  }
  .recruit-lane.journal-lane > span:last-child {
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
}

/* "+" (new raid tab) had no border/background of its own, so the browser drew

/* Public raid board (/raid-display/:id): desktop columns as before; on a phone the columns keep a
   readable width and the board scrolls sideways with the role column pinned (same pattern as the builder grid). */
.run-screen-view .run-screen-mesh { grid-template-columns: 100px repeat(var(--squad-count, 4), minmax(0, 1fr)); }
@media (max-width: 900px) {
  .run-screen-view .run-screen-wall { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .run-screen-view .run-screen-mesh {
    grid-template-columns: 78px repeat(var(--squad-count, 4), minmax(150px, 1fr));
    min-width: calc(78px + var(--squad-count, 4) * 150px);
  }
  .run-screen-view .run-screen-mesh > .duty-cap,
  .run-screen-view .run-screen-mesh > .run-duty-box { position: sticky; left: 0; z-index: 2; }
}

/* Иконки на доске крупнее (без текста уровней) */
.run-screen-view .pb-entry { width: auto; }
.run-screen-view .pb-pic { width: 48px !important; height: 48px !important; }
