/* MCN 机构榜 */
#bdMcnRank {
  width: 100%;
  min-height: calc(100vh - var(--bd-topbar-h, 56px));
}

.bd-main:has(> #bdMcnRank:not([hidden])),
html.bd-view-mcn-rank .bd-main {
  padding: 12px 16px 24px;
  overflow: auto;
  max-height: calc(100vh - var(--bd-topbar-h, 56px));
}

.mr-root {
  padding: 0;
  width: 100%;
  max-width: none;
  font-size: 12px;
}

.mr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mr-snapshot-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 32px;
  padding: 0 4px;
}

.mr-head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.mr-updated {
  font-size: 11px;
  color: #94a3b8;
}

.mr-filters {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.mr-period-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mr-period-tabs {
  display: inline-flex;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  overflow: hidden;
}

.mr-period-tab {
  height: 32px;
  padding: 0 14px;
  border: none;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.mr-period-tab + .mr-period-tab {
  border-left: 1px solid #e8ecf3;
}

.mr-period-tab.is-active {
  background: #f5f3ff;
  color: #7c3aed;
  font-weight: 600;
}

.mr-date-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  background: #fff;
}

.mr-date-wrap {
  position: relative;
}

.mr-date-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.mr-date-wrap.is-open .mr-date-trigger {
  border-color: #7c3aed;
  color: #7c3aed;
}

.mr-date-cal-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.mr-date-trigger-label {
  white-space: nowrap;
}

.mr-date-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: 280px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.mr-date-pop::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #e8ecf3;
  border-top: 1px solid #e8ecf3;
  transform: rotate(45deg);
}

.mr-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 10px;
}

.mr-cal-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.mr-cal-nav {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.mr-cal-nav:hover {
  background: #f5f3ff;
  color: #7c3aed;
}

.mr-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}

.mr-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}

.mr-cal-day {
  height: 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
  position: relative;
}

.mr-cal-day.is-out {
  color: #cbd5e1;
}

.mr-cal-day.is-disabled {
  color: #dbe2ea;
  cursor: not-allowed;
}

.mr-cal-day.is-in-week {
  background: #ede9fe;
  color: #5b21b6;
}

.mr-cal-day.is-in-week.is-out {
  color: #a78bfa;
}

.mr-cal-day.is-week-edge,
.mr-cal-day.is-selected {
  background: #7c3aed;
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}

.mr-cal-day.is-in-week:not(.is-week-edge):not(.is-selected) {
  border-radius: 0;
}

.mr-cal-day:not(.is-disabled):hover:not(.is-selected):not(.is-week-edge) {
  background: #f5f3ff;
  color: #7c3aed;
}

.mr-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mr-month-cell {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
}

.mr-month-cell.is-disabled {
  color: #dbe2ea;
  cursor: not-allowed;
}

.mr-month-cell.is-selected {
  background: #7c3aed;
  color: #fff;
  font-weight: 600;
}

.mr-month-cell:not(.is-disabled):not(.is-selected):hover {
  background: #f5f3ff;
  color: #7c3aed;
}

.mr-search-wrap {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mr-search-input {
  width: 220px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  font-size: 12px;
}

.mr-search-btn {
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.mr-scroll-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px 20px;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.mr-scroll-hint {
  font-size: 12px;
  color: #94a3b8;
}

.mr-scroll-hint.is-done {
  color: #64748b;
}

.mr-scroll-hint.is-error {
  color: #ef4444;
}

.mr-scroll-sentinel {
  width: 100%;
  height: 1px;
}

.mr-table-wrap {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px 8px 0 0;
  overflow: auto;
}

.mr-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.mr-table th,
.mr-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.mr-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.mr-th-rank {
  width: 72px;
}

.mr-th-agency {
  min-width: 180px;
}

.mr-td-rank {
  white-space: nowrap;
}

.mr-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  font-weight: 600;
  color: #334155;
}

.mr-rank-num.is-top3 {
  color: #d97706;
}

.mr-rank-change {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}

.mr-rank-change.is-up {
  color: #ef4444;
}

.mr-rank-change.is-down {
  color: #22c55e;
}

.mr-agency {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mr-agency-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.mr-agency-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.mr-agency-name {
  font-weight: 600;
  color: #1e293b;
}

.mr-metric {
  font-weight: 600;
  color: #2563eb;
  white-space: nowrap;
}

.mr-category-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
}

.mr-mcn-type {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.mr-mcn-type-comprehensive_affiliate {
  color: #6d28d9;
  background: #f3e8ff;
}

.mr-mcn-type-comprehensive {
  color: #2563eb;
  background: #eff6ff;
}

.mr-mcn-type-vertical_head,
.mr-mcn-type-vertical {
  color: #c2410c;
  background: #ffedd5;
}

.mr-mcn-type-vertical_growth {
  color: #b45309;
  background: #fef3c7;
}

.mr-mcn-type-waist {
  color: #0f766e;
  background: #ccfbf1;
}

.mr-mcn-type-growth {
  color: #15803d;
  background: #dcfce7;
}

.mr-mcn-type-tail {
  color: #64748b;
  background: #f1f5f9;
}

.mr-mcn-type-unknown {
  color: #94a3b8;
  background: #f8fafc;
}

.mr-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.mr-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.mr-bloggers {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mr-blogger-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e8ecf3;
}

.mr-blogger-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.mr-empty,
.mr-loading,
.mr-error {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.mr-boot-placeholder {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mr-error {
  color: #ef4444;
}

.mr-pagination {
  display: none;
}
