.staff-trigger {
  gap: 8px !important;
}
.staff-trigger > span:first-child {
  font-size: 15px;
  line-height: 1;
}
.staff-modal {
  max-width: 560px;
}
.staff-modal h2 {
  font-size: 38px;
}
.staff-owner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(115deg, #c5f27312, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px;
  margin: 24px 0;
}
.staff-owner > div {
  flex: 1;
  min-width: 0;
}
.staff-owner strong {
  font-size: 15px;
}
.staff-owner small {
  font-size: 11px;
  margin: 3px 0 0;
}
.staff-emblem {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #c5f27318;
  border: 1px solid #c5f27335;
  border-radius: 12px;
  color: var(--lime);
  font-size: 25px;
}
.staff-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 27px 0 12px;
}
.staff-list-heading h3 {
  font-size: 15px;
}
.staff-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.staff-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.staff-entry:last-child {
  border-bottom: 0;
}
.staff-entry .avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}
.staff-entry-info {
  flex: 1;
  min-width: 0;
}
.staff-entry-info strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.staff-entry-info small {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  margin: 4px 0 0;
}
.staff-entry-info .offline-dot {
  background: var(--muted);
}
.staff-remove {
  font-size: 11px;
  padding: 7px 10px;
  gap: 6px;
}
.staff-storage-note {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.staff-storage-note .tag {
  font-size: 9px;
  display: inline-block;
}
.staff-storage-note p {
  font-size: 12px;
  margin: 10px 0 0;
  line-height: 1.8;
}
.staff-repository-help {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.staff-repository-help h3 {
  font-size: 14px;
}
.staff-repository-help p {
  font-size: 12px;
  margin-bottom: 0;
}
.staff-repository-help code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.staff-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.staff-modal #moderator-form {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.staff-modal #moderator-form h3 {
  font-size: 16px;
}
[data-theme="light"] .staff-emblem {
  color: #4c701d;
}
.toolbar-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.staff-trigger > span:first-child {
  display: flex;
  align-items: center;
}
@media (max-width: 768px) {
  .staff-trigger-label {
    display: none;
  }
  .topbar .staff-trigger {
    width: 34px;
    height: 34px;
    padding: 7px !important;
    gap: 0 !important;
  }
  .topbar .staff-trigger > span:first-child {
    font-size: 16px;
  }
}
@media (max-width: 570px) {
  .staff-modal {
    padding: 30px 22px;
  }
  .staff-modal h2 {
    font-size: 34px;
  }
  .staff-owner {
    gap: 10px;
    padding: 14px;
  }
  .staff-owner .role-badge {
    font-size: 8px;
  }
  .staff-entry {
    padding: 14px 12px;
  }
  .staff-entry-info strong {
    font-size: 13px;
  }
  .staff-modal .staff-storage-note p,
  .staff-modal .staff-repository-help p {
    font-size: 12px;
  }
}

/* Announcements, channel notices, staff matrix & scoped admin/mod modals */
.announcement-banner:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(168, 223, 110, 0.38);
  background: linear-gradient(135deg, rgba(168, 223, 110, 0.14), rgba(168, 223, 110, 0.04));
  font-size: 13px;
  line-height: 1.45;
}
.announcement-banner strong {
  color: var(--accent, #a8df6e);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
}
.announcement-meta {
  font-size: 11px;
  opacity: 0.72;
}

.channel-notice:not([hidden]) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 193, 94, 0.35);
  background: rgba(255, 193, 94, 0.09);
  font-size: 12.5px;
}
.channel-notice.is-locked {
  border-color: rgba(235, 97, 97, 0.45);
  background: rgba(235, 97, 97, 0.12);
}

.staff-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.staff-matrix-col {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}
.staff-matrix-col ul {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.9;
}

.admin-modal {
  max-width: min(560px, calc(100vw - 24px));
}
#admin-dialog.is-mod-scope .founder-only {
  display: none !important;
}
.admin-section {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-section h3 {
  margin: 0;
  font-size: 13.5px;
}
.admin-control-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-control-row label {
  flex: 1 1 170px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.admin-control-row input,
.admin-control-row select {
  width: 100%;
  min-width: 0;
}
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.muted-users-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}
.muted-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  font-size: 12.5px;
}
.muted-user-row small {
  display: block;
  opacity: 0.72;
  font-size: 11px;
}

.user-actions-meta {
  margin: 0 0 10px;
  font-size: 12.5px;
  opacity: 0.8;
}
.mute-options-box:not([hidden]) {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}
.mute-options-box label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

@media (max-width: 570px) {
  .staff-matrix,
  .admin-actions-grid {
    grid-template-columns: 1fr;
  }
}
